Examples of aboutToChangeModel()


Examples of org.eclipse.wst.sse.core.internal.provisional.IStructuredModel.aboutToChangeModel()

            ITextSelection selection = (ITextSelection) editor.getSelectionProvider().getSelection();
            model.beginRecording(this, SSEUIMessages.Cleanup_Document_UI_, SSEUIMessages.Cleanup_Document_UI_, selection.getOffset(), selection.getLength());

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

            // run
            BusyIndicator.showWhile(fEditor.getEditorSite().getWorkbenchWindow().getShell().getDisplay(), runnable);
          }
        }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.IStructuredModel.aboutToChangeModel()

  }

  private IStructuredModel aboutToSaveModel() {
    IStructuredModel model = getInternalModel();
    if (model != null) {
      model.aboutToChangeModel();
    }
    return model;
  }

  protected void addSourceMenuActions(IMenuManager menu) {
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.IStructuredModel.aboutToChangeModel()

      if (model != null) {
        //makes it so one undo will undo all the edits to the document
        model.beginRecording(this, SSEUIMessages.ToggleComment_label, SSEUIMessages.ToggleComment_description);
       
        //keeps listeners from doing anything until updates are all done
        model.aboutToChangeModel();
        if(document instanceof IDocumentExtension4) {
          session = ((IDocumentExtension4)document).startRewriteSession(DocumentRewriteSessionType.UNRESTRICTED);
        }
        changed = true;
       
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.IStructuredModel.aboutToChangeModel()

              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
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.IStructuredModel.aboutToChangeModel()

  }

  private IStructuredModel aboutToSaveModel() {
    IStructuredModel model = getInternalModel();
    if (model != null) {
      model.aboutToChangeModel();
    }
    return model;
  }

  protected void addSourceMenuActions(IMenuManager menu) {
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.IStructuredModel.aboutToChangeModel()

        //makes it so one undo will undo all the edits to the document
        model.beginRecording(this, SSEUIMessages.RemoveBlockComment_label,
            SSEUIMessages.RemoveBlockComment_label);
       
        //keeps listeners from doing anything until updates are all done
        model.aboutToChangeModel();
        if(document instanceof IDocumentExtension4) {
          session = ((IDocumentExtension4)document).startRewriteSession(
              DocumentRewriteSessionType.UNRESTRICTED);
        }
        changed = true;
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.IStructuredModel.aboutToChangeModel()

      if(model != null) {
        //makes it so one undo will undo all the edits to the document
        model.beginRecording(this, SSEUIMessages.AddBlockComment_label, SSEUIMessages.AddBlockComment_description);
       
        //keeps listeners from doing anything until updates are all done
        model.aboutToChangeModel();
        if(document instanceof IDocumentExtension4) {
          session = ((IDocumentExtension4)document).startRewriteSession(DocumentRewriteSessionType.UNRESTRICTED);
        }
        changed = true;
       
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.IStructuredModel.aboutToChangeModel()

          if (model != null) {
            try {
              TextEdit edit = formatter.format(model, fRegion.getOffset(), fRegion.getLength());
              if (edit != null) {
                try {
                  model.aboutToChangeModel();
                  edit.apply(document);
                }
                finally {
                  model.changedModel();
                }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.IStructuredModel.aboutToChangeModel()

            ITextSelection selection = (ITextSelection) textEditor.getSelectionProvider().getSelection();
            model.beginRecording(this, SSEUIMessages.Cleanup_Document_UI_, SSEUIMessages.Cleanup_Document_UI_, selection.getOffset(), selection.getLength());

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

            // run
            BusyIndicator.showWhile(textEditor.getEditorSite().getWorkbenchWindow().getShell().getDisplay(), runnable);
          }
        }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.provisional.IStructuredModel.aboutToChangeModel()

  private void processAction(IDocument document, int selectionStartLine, int selectionEndLine) {
    IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForEdit(document);
    if (model != null) {
      try {
        model.beginRecording(this, XMLUIMessages.ToggleComment_tooltip);
        model.aboutToChangeModel();

        for (int i = selectionStartLine; i <= selectionEndLine; i++) {
          try {
            if (document.getLineLength(i) > 0) {
              if (isCommentLine(document, i)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.