Example #1
0
  /*
   * @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());
  }
Example #2
0
  /*
   * @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();
  }
Example #3
0
 /*
  * @see org.eclipse.compare.contentmergeviewer.ContentMergeViewer#getTitle()
  */
 public String getTitle() {
   return XMLPlugin.getResourceString("HTMLMergeViewer.title"); // $NON-NLS-1$
 }
Example #4
0
 /*
  * @see org.eclipse.ui.texteditor.AbstractTextEditor#affectsTextPresentation(PropertyChangeEvent)
  */
 protected boolean affectsTextPresentation(PropertyChangeEvent event) {
   return XMLPlugin.getDefault().getXMLTextTools().affectsBehavior(event);
 }
Example #5
0
 public XMLEditor() {
   setPreferenceStore(XMLPlugin.getDefault().getPreferenceStore());
 }