Examples of beginRecording()


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

  public void applyQuickFix(IDocument document) {
    IStructuredModel model = null;
    try {
      if (document instanceof IStructuredDocument) {
        model = StructuredModelManager.getModelManager().getModelForEdit((IStructuredDocument) document);
        model.beginRecording(this);
      }

      Document ownerDocument = beanNode.getOwnerDocument();

      AttrImpl attrNode = (AttrImpl) ownerDocument.createAttribute(BeansSchemaConstants.ATTR_FACTORY_METHOD);
View Full Code Here

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

  public void applyQuickFix(IDocument document) {
    IStructuredModel model = null;
    try {
      if (document instanceof IStructuredDocument) {
        model = StructuredModelManager.getModelManager().getModelForEdit((IStructuredDocument) document);
        model.beginRecording(this);
      }

      NodeList childNodes = beanNode.getChildNodes();
      int numRemoved = 0;
      for (int i = childNodes.getLength() - 1; i >= 0; i--) {
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager.beginRecording()

        fRecorder = StructuredModelManager.getModelManager().getExistingModelForEdit(document);
      // Prepare for Undo
      if (fRecorder != null) {
        IStructuredTextUndoManager um = fRecorder.getUndoManager();
        if (um != null) {
          um.beginRecording(this, ((IAction) this.obj).getText(), ((IAction) this.obj).getDescription());
        }
      }
    }
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager.beginRecording()

      // undo after paste in document with folds - wrong behavior
      IRegion widgetSelection = new Region(cursorPosition, selectionLength);
      IRegion documentSelection = widgetRange2ModelRange(widgetSelection);
      if (documentSelection == null)
        documentSelection = widgetSelection;
      undoManager.beginRecording(this, label, description, documentSelection.getOffset(), documentSelection.getLength());
    }
    else {
      // TODO: how to handle other document types?
    }
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager.beginRecording()

      // Prepare for Undo
      if (fRecorder != null) {
        IStructuredTextUndoManager um = fRecorder.getUndoManager();
        if (um != null) {
          if (this.obj instanceof IAction)
            um.beginRecording(this, ((IAction) this.obj).getText(), ((IAction) this.obj).getDescription());
          else
            um.beginRecording(this);
        }
      }
    }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager.beginRecording()

        IStructuredTextUndoManager um = fRecorder.getUndoManager();
        if (um != null) {
          if (this.obj instanceof IAction)
            um.beginRecording(this, ((IAction) this.obj).getText(), ((IAction) this.obj).getDescription());
          else
            um.beginRecording(this);
        }
      }
    }
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager.beginRecording()

      // undo after paste in document with folds - wrong behavior
      IRegion widgetSelection = new Region(cursorPosition, selectionLength);
      IRegion documentSelection = widgetRange2ModelRange(widgetSelection);
      if (documentSelection == null)
        documentSelection = widgetSelection;
      undoManager.beginRecording(this, label, description, documentSelection.getOffset(), documentSelection.getLength());
    }
    else {
      // TODO: how to handle other document types?
    }
  }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager.beginRecording()

              "Cann't resolve file name")); //$NON-NLS-1$
          return;
        }

        undoManager = structuredDocument.getUndoManager();
        undoManager.beginRecording(this, "php format document", //$NON-NLS-1$
            "format PHP document", 0, document.getLength()); //$NON-NLS-1$

        // html format
        HTMLFormatProcessorImpl htmlFormatter = new HtmlFormatterForPhpCode();
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager.beginRecording()

              "Cann't resolve file name")); //$NON-NLS-1$
          return;
        }

        undoManager = structuredDocument.getUndoManager();
        undoManager.beginRecording(this, "php format document", //$NON-NLS-1$
            "format PHP document", 0, document.getLength()); //$NON-NLS-1$

        // html format
        HTMLFormatProcessorImpl htmlFormatter = new HtmlFormatterForPhpCode();
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.undo.IStructuredTextUndoManager.beginRecording()

    IDocument doc = getDocument();
    if (doc instanceof IStructuredDocument) {
      IStructuredDocument structuredDocument = (IStructuredDocument) doc;
      IStructuredTextUndoManager undoManager = structuredDocument
          .getUndoManager();
      undoManager.beginRecording(this, label, description,
          cursorPosition, selectionLength);
    } else {
      // TODO: how to handle other document types?
    }
  }
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.