/* * @see org.eclipse.ui.editors.text.TextEditor#initializeEditor() */ protected void initializeEditor() { super.initializeEditor(); XMLTextTools xmlTextTools = XMLPlugin.getDefault().getXMLTextTools(); setSourceViewerConfiguration(new XMLConfiguration(xmlTextTools)); setDocumentProvider(new XMLDocumentProvider()); }
/* * @see TextMergeViewer#configureTextViewer() */ protected void configureTextViewer(TextViewer textViewer) { XMLPlugin plugin = XMLPlugin.getDefault(); preferenceStore = plugin.getPreferenceStore(); if (preferenceStore != null) { propertyChangeListener = new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { handlePreferenceStoreChanged(event); } }; preferenceStore.addPropertyChangeListener(propertyChangeListener); } textTools = plugin.getXMLTextTools(); if (textViewer instanceof SourceViewer) { SourceViewer sourceViewer = (SourceViewer) textViewer; sourceViewer.configure(new XMLConfiguration(textTools)); } updateBackgroundColor(); }
/* * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#getTitle() */ public String getTitle() { return XMLPlugin.getResourceString("HTMLMergeViewer.title"); // $NON-NLS-1$ }
/* * @see org.eclipse.ui.texteditor.AbstractTextEditor#affectsTextPresentation(PropertyChangeEvent) */ protected boolean affectsTextPresentation(PropertyChangeEvent event) { return XMLPlugin.getDefault().getXMLTextTools().affectsBehavior(event); }
public XMLEditor() { setPreferenceStore(XMLPlugin.getDefault().getPreferenceStore()); }