CppToProtobufMapping createMappingFromSelectionOf(IEditorPart editor) {
final int offset = editors.selectionOffsetOf(editor);
if (offset < 0) {
return null;
}
IWorkingCopy workingCopy = CUIPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(editor.getEditorInput());
if (workingCopy == null) {
return null;
}
final AtomicReference<CppToProtobufMapping> mappingReference = new AtomicReference<CppToProtobufMapping>();
ASTProvider astProvider = ASTProvider.getASTProvider();