Package org.eclipse.wst.sse.ui

Examples of org.eclipse.wst.sse.ui.StructuredTextEditor$StructuredSelectionProvider


    if(root.exists(filepath))
    {
      try
      {
        FileEditorInput htmlEditorInput = new FileEditorInput(root.getFile(filepath));
        htmlEditor = new StructuredTextEditor();
       
        htmlEditorIndex = addPage(htmlEditor, htmlEditorInput);
        setPageText(htmlEditorIndex, htmlEditor.getTitle());
      } catch (PartInitException e) {
        ErrorDialog.openError(getSite().getShell(), "Error creating Html editor", null, e.getStatus());
View Full Code Here


    if(root.exists(filepath))
    {
      try
      {
        FileEditorInput cssEditorInput = new FileEditorInput(root.getFile(filepath));
        cssEditor = new StructuredTextEditor();
       
        cssEditorIndex = addPage(cssEditor, cssEditorInput);
        setPageText(cssEditorIndex, cssEditor.getTitle());
      } catch (PartInitException e) {
        ErrorDialog.openError(getSite().getShell(), "Error creating CSS editor", null, e.getStatus());
View Full Code Here

    ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
  }

  public void createPages() {
    try {
      sourceEditor = new StructuredTextEditor();
      addPage(0, sourceEditor, getEditorInput());
      setPageText(0, ClickPlugin.getString("editor.clickXML.source"));
    } catch(Exception ex){
      ClickPlugin.log(ex);
    }
View Full Code Here

    ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
  }

  public void createPages() {
    try {
      sourceEditor = new StructuredTextEditor();
      addPage(0, sourceEditor, getEditorInput());
      setPageText(0, ClickPlugin.getString("editor.clickXML.source"));
    } catch(Exception ex){
      ClickPlugin.log(ex);
    }
View Full Code Here

  protected abstract IStructuredCleanupProcessor getCleanupProcessor();

  public void run() {
    if (getTextEditor() instanceof StructuredTextEditor) {
      final StructuredTextEditor editor = (StructuredTextEditor) getTextEditor();
      Dialog cleanupDialog = getCleanupDialog(editor.getSite().getShell());
      if (cleanupDialog != null) {
        if (cleanupDialog.open() == Window.OK) {
          // setup runnable
          Runnable runnable = new Runnable() {
            public void run() {
              IStructuredCleanupProcessor cleanupProcessor = getCleanupProcessor();
              if (cleanupProcessor != null)
                cleanupProcessor.cleanupModel(editor.getModel());
            }
          };

          // TODO: make independent of 'model'.
          IStructuredModel model = editor.getModel();
          if (model != null) {
            try {
              // begin recording
              ITextSelection selection = (ITextSelection) editor.getSelectionProvider().getSelection();
              model.beginRecording(this, SSEUIMessages.Cleanup_Document_UI_, SSEUIMessages.Cleanup_Document_UI_, selection.getOffset(), selection.getLength()); //$NON-NLS-1$ //$NON-NLS-2$

              // tell the model that we are about to make a big
              // model change
              model.aboutToChangeModel();

              // run
              BusyIndicator.showWhile(editor.getTextViewer().getControl().getDisplay(), runnable);
            } finally {
              // tell the model that we are done with the big
              // model
              // change
              model.changedModel();

              // end recording
              ITextSelection selection = (ITextSelection) editor.getSelectionProvider().getSelection();
              model.endRecording(this, selection.getOffset(), selection.getLength());
            }
          }
        }
View Full Code Here

   * @deprecated - not to be used
   */
  protected IStructuredModel getModelForEditorPart(IEditorPart targetEditor) {
    IStructuredModel result = null;
    if (editorPart instanceof XMLMultiPageEditorPart) {
      StructuredTextEditor textEditor = ((XMLMultiPageEditorPart) targetEditor).getTextEditor();
      result = (textEditor != null) ? textEditor.getModel() : null;
    }
    return result;
  }
View Full Code Here

   * Method createTextEditor.
   *
   * @return StructuredTextEditor
   */
  private StructuredTextEditor createTextEditor() {
    return new StructuredTextEditor();
  }
View Full Code Here

  }

  @Override
  protected void addPages() {
    try {
      sourceEditor = new StructuredTextEditor();
      sourceEditor.setEditorPart(this);
     
      configPropertyFormPage = new ConfigPropertyFormPage(this, ConfigPropertyFormPage.ID, "Config Property Page");
      configPageIndex = addPage(configPropertyFormPage);
      setPageText(configPageIndex, "Config Property Page");
View Full Code Here

    }
   
    @Override
    protected final void createSourcePages() throws PartInitException
    {
        this.sourcePage = new StructuredTextEditor();
        this.sourcePage.setEditorPart( this );
       
        final int index = addPage( this.sourcePage, getEditorInput() );
        setPageText( index, sourcePageTitle.text() );
    }
View Full Code Here

    @Override
    protected void createEditorPages() throws PartInitException
    {
        addDeferredPage( "Diagram", "DiagramPage" );
       
        this.sourceEditorPage = new StructuredTextEditor();
        this.sourceEditorPage.setEditorPart( this );
       
        int index = addPage( this.sourceEditorPage, getEditorInput() );
        setPageText( index, "Source" );
    }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.sse.ui.StructuredTextEditor$StructuredSelectionProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.