import java.awt.BorderLayout;
public abstract class BasicSourceCodeEditorProvider extends BasicTextEditorProvider implements DumbAware {
@NotNull
public FileEditor createEditor(@NotNull Project project, @NotNull VirtualFile file) {
DatabaseEditableObjectFile databaseFile;
if (file instanceof SourceCodeFile) {
SourceCodeFile sourceCodeFile = (SourceCodeFile) file;
databaseFile = sourceCodeFile.getDatabaseFile();
} else {
databaseFile = (DatabaseEditableObjectFile) file;
}
SourceCodeFile sourceCodeFile = getSourceCodeFile(databaseFile);
boolean isMainEditor = sourceCodeFile.getContentType() == databaseFile.getMainContentType();
/*
BasicTextEditor openEditor = lookupExistingEditor(project, databaseFile);
if (openEditor != null) return openEditor;
*/