use of org.eclipse.wst.xsd.ui.internal.adt.editor.EditorMode in project webtools.sourceediting by eclipse.
the class InternalXSDMultiPageEditor method createEditorModeManager.
// private boolean isInitializing = false;
protected EditorModeManager createEditorModeManager() {
final ProductCustomizationProvider productCustomizationProvider = (ProductCustomizationProvider) getAdapter(ProductCustomizationProvider.class);
EditorModeManager manager = new EditorModeManager(XSD_EDITOR_MODE_EXTENSION_ID) {
public void init() {
if (productCustomizationProvider == null || productCustomizationProvider.isEditorModeApplicable(TypeVizEditorMode.ID)) {
addMode(new TypeVizEditorMode());
}
super.init();
}
protected EditorMode getDefaultMode() {
String defaultModeId = XSDEditorPlugin.getPlugin().getPreferenceStore().getString(DEFAULT_EDITOR_MODE_ID);
if (defaultModeId != null) {
EditorMode editorMode = getEditorMode(defaultModeId);
if (editorMode != null) {
return editorMode;
}
}
return super.getDefaultMode();
}
};
manager.setProductCustomizationProvider(productCustomizationProvider);
return manager;
}
Aggregations