Examples of BasicCommandStack


Examples of org.eclipse.emf.common.command.BasicCommandStack

    adapterFactory.addAdapterFactory(new UniverseItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

    // Create the command stack that will notify this editor as commands are executed.
    //
    BasicCommandStack commandStack = new BasicCommandStack();

    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    //
    commandStack.addCommandStackListener
      (new CommandStackListener() {
         public void commandStackChanged(final EventObject event) {
           getContainer().getDisplay().asyncExec
             (new Runnable() {
                public void run() {
View Full Code Here

Examples of org.eclipse.emf.common.command.BasicCommandStack

    adapterFactory.addAdapterFactory(new Fd2ItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

    // Create the command stack that will notify this editor as commands are executed.
    //
    BasicCommandStack commandStack = new BasicCommandStack();

    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    //
    commandStack.addCommandStackListener
      (new CommandStackListener()
       {
         public void commandStackChanged(final EventObject event)
         {
           getContainer().getDisplay().asyncExec
View Full Code Here

Examples of org.eclipse.emf.common.command.BasicCommandStack

    adapterFactory.addAdapterFactory(new JadexItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

    // Create the command stack that will notify this editor as commands are executed.
    //
    BasicCommandStack commandStack = new BasicCommandStack();

    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    //
    commandStack.addCommandStackListener
      (new CommandStackListener() {
         public void commandStackChanged(final EventObject event) {
           getContainer().getDisplay().asyncExec
             (new Runnable() {
                public void run() {
View Full Code Here

Examples of org.eclipse.emf.common.command.BasicCommandStack

    adapterFactory.addAdapterFactory(new EclipseJadexItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

    // Create the command stack that will notify this editor as commands are executed.
    //
    BasicCommandStack commandStack = new BasicCommandStack();

    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    //
    commandStack.addCommandStackListener
      (new CommandStackListener() {
         public void commandStackChanged(final EventObject event) {
           getContainer().getDisplay().asyncExec
             (new Runnable() {
                public void run() {
View Full Code Here

Examples of org.eclipse.emf.common.command.BasicCommandStack

    adapterFactory.addAdapterFactory(new EclipseJadexItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

    // Create the command stack that will notify this editor as commands are executed.
    //
    BasicCommandStack commandStack = new BasicCommandStack();

    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    //
    commandStack.addCommandStackListener
      (new CommandStackListener() {
         public void commandStackChanged(final EventObject event) {
           getContainer().getDisplay().asyncExec
             (new Runnable() {
                public void run() {
View Full Code Here

Examples of org.eclipse.emf.common.command.BasicCommandStack

    adapterFactory.addAdapterFactory(new JadexItemProviderAdapterFactory());
    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

    // Create the command stack that will notify this editor as commands are executed.
    //
    BasicCommandStack commandStack = new BasicCommandStack();

    // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
    //
    commandStack.addCommandStackListener
      (new CommandStackListener() {
         public void commandStackChanged(final EventObject event) {
           getContainer().getDisplay().asyncExec
             (new Runnable() {
                public void run() {
View Full Code Here

Examples of org.eclipse.emf.common.command.BasicCommandStack

    adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());

    // Create the command stack that will notify this editor as commands are
    // executed.
    //
    BasicCommandStack commandStack = new TransactionalCommandStack();
    commandStack.addCommandStackListener(new CommandStackListener() {

      @Override
      public void commandStackChanged(final EventObject event) {
        getViewSite().getShell().getDisplay().asyncExec(new Runnable() {
View Full Code Here

Examples of org.eclipse.emf.common.command.BasicCommandStack

    }
    if (getDocument() instanceof IStructuredDocument) {
      CommandStack commandStack = ((IStructuredDocument) getDocument())
          .getUndoManager().getCommandStack();
      if (commandStack instanceof BasicCommandStack) {
        BasicCommandStack bcs = (BasicCommandStack) commandStack;
        return bcs.isSaveNeeded();
      }
    }
    return result;
  }
View Full Code Here

Examples of org.eclipse.emf.common.command.BasicCommandStack

    super.setInput(input);
   
    // Hook a transaction exception handler so we can get diagnostics about EMF validation errors.
    getEditingDomainListener();
   
    BasicCommandStack basicCommandStack = (BasicCommandStack) getEditingDomain().getCommandStack();

    if (input instanceof DiagramEditorInput) {
      ResourceSet resourceSet = getEditingDomain().getResourceSet();
      Bpmn2ResourceImpl bpmnResource = (Bpmn2ResourceImpl) resourceSet.createResource(modelUri,
          "org.eclipse.bpmn2.content-type.xml");

      resourceSet.setURIConverter(new ProxyURIConverterImplExtension());

      modelHandler = ModelHandlerLocator.createModelHandler(modelUri, bpmnResource);
      ModelHandlerLocator.put(diagramUri, modelHandler);

      try {
        if (modelFile.exists()) {
          bpmnResource.load(null);
        } else {
          doSave(null);
        }
      } catch (IOException e) {
        Status status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
        ErrorUtils.showErrorWithLogging(status);
      }
      basicCommandStack.execute(new RecordingCommand(getEditingDomain()) {

        @Override
        protected void doExecute() {
          importDiagram();
        }
      });
    }
    basicCommandStack.saveIsDone();
  }
View Full Code Here

Examples of org.eclipse.emf.common.command.BasicCommandStack

            //
            eFactory.addAdapterFactory(new EFeatureTestsItemProviderAdapterFactory());
            //
            // Create a command stack
            //
            BasicCommandStack commandStack = new BasicCommandStack();
            //
            // Create and return the editing domain
            //
            eDomain = new AdapterFactoryEditingDomain(eFactory,commandStack);
        }
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.