Examples of canExecute()


Examples of org.eclipse.emf.common.command.Command.canExecute()

                if (initialObjectCreationPage.immediateChildrenButton.getSelection()) {
                  createChildrenCommand = new CreateChildrenFromJavaModelCommand(pack, Flags.AccPublic, false);
                } else if (initialObjectCreationPage.recursiveChildrenButton.getSelection()) {
                  createChildrenCommand = new CreateChildrenFromJavaModelCommand(pack, Flags.AccPublic, true);
                }
                if (createChildrenCommand != null && createChildrenCommand.canExecute()) {
                  createChildrenCommand.execute();
                }
              }
              // Save the contents of the resource to the file system.
              //
View Full Code Here

Examples of org.eclipse.emf.common.command.CompoundCommand.canExecute()

    CompoundCommand cmd = new CompoundCommand(getLabel());
    for (EObject element : elements) {
      createCreateLinkCommand(cmd, element);
    }
    setOverride(cmd);
    if (cmd.canExecute())
      cmd.execute();
  }

  /**
   * Adds to the provided compound command to create a link from a proxy for
View Full Code Here

Examples of org.eclipse.emf.edit.command.RemoveCommand.canExecute()

   * @return true if value was deleted, and false otherwise.
   */
  private boolean handleRemoveMetaInfFile( final KeyValuePair value ) {
    if ( MessageDialog.openConfirm( getSite().getShell(), "Confirm delete", "Would really like to remove the selected META-INF file" ) ) {
      RemoveCommand cmd = new RemoveCommand( editingDomain, getTask().getFiles(), value );
      if ( cmd.canExecute() ) {
        cmd.execute();
        return true;
      }
    }
    return false;
View Full Code Here

Examples of org.eclipse.emf.edit.command.SetCommand.canExecute()

                }
                if ( template != null ) {
                  if ( getTask().getDeploy().getTemplate() == null ) {
                    Command cmd = new SetCommand( editingDomain, getTask().getDeploy(), DEPLOY__TEMPLATE, ParametersFactory.eINSTANCE
                        .createTemplate() );
                    if ( cmd.canExecute() ) {
                      cmd.execute();
                    }
                  }
                  Command cmd = new SetCommand( editingDomain, getTask().getDeploy().getTemplate(), TEMPLATE__FILE, template );
                  if ( cmd.canExecute() ) {
View Full Code Here

Examples of org.eclipse.gef.commands.Command.canExecute()

      ccr.setSourceEditPart(sourceEditPart);
      sourceEditPart.getCommand(ccr);
      ccr.setTargetEditPart(targetEditPart);
      ccr.setType(RequestConstants.REQ_CONNECTION_END);
      Command cmd = targetEditPart.getCommand(ccr);
      if (cmd != null && cmd.canExecute()) {
        executeCommand(cmd);
        IAdaptable viewAdapter = (IAdaptable) ccr.getNewObject();
        if (viewAdapter != null) {
          adapters.add(viewAdapter);
        }
View Full Code Here

Examples of org.eclipse.gmf.runtime.common.core.command.ICommand.canExecute()

    configureRequest.setClientContext(((CreateElementRequest) getRequest())
        .getClientContext());
    configureRequest.addParameters(getRequest().getParameters());
    ICommand configureCommand = elementType
        .getEditCommand(configureRequest);
    if (configureCommand != null && configureCommand.canExecute()) {
      configureCommand.execute(monitor, info);
    }
  }

}
View Full Code Here

Examples of org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand.canExecute()

    Command cmd = getCreateViewCommand(request);
    if (cmd != null && cmd.canExecute()) {
      SetViewMutabilityCommand.makeMutable(
          new EObjectAdapter(host().getNotationView())).execute();
      executeCommand(cmd);
      if (boundsCommand.canExecute()) {
        executeCommand(new ICommandProxy(boundsCommand.reduce()));
      }
      @SuppressWarnings("unchecked")
      List<IAdaptable> nl = (List<IAdaptable>) request.getNewObject();
      createdViews.addAll(nl);
View Full Code Here

Examples of org.eclipse.graphiti.features.IDirectEditingFeature.canExecute()

          pes[0], pes[0].getGraphicsAlgorithm());
      IDirectEditingFeature f =
          getFeatureProvider().getDirectEditingFeature(con);
     
      if (f != null) {
        return f.canExecute(con);
      }
    }
    return false;
  }
 
View Full Code Here

Examples of org.eclipse.graphiti.features.custom.ICustomFeature.canExecute()

   
    ICustomFeature customFeature =
        new DoubleClickFeature(getFeatureProvider());
    // canExecute() tests especially if the context contains a EClass

    if (customFeature.canExecute(context)) {
      return customFeature;
    }

    return super.getDoubleClickFeature(context);
View Full Code Here

Examples of org.eclipse.jgit.util.FS.canExecute()

      channel.close();
    }
    FS fs = repo.getFS();
    if (opt.isFileMode() && fs.supportsExecute()) {
      if (FileMode.EXECUTABLE_FILE.equals(entry.getRawMode())) {
        if (!fs.canExecute(tmpFile))
          fs.setExecute(tmpFile, true);
      } else {
        if (fs.canExecute(tmpFile))
          fs.setExecute(tmpFile, false);
      }
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.