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