Examples of canExecute()


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

    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);
      }
    }
    if (!tmpFile.renameTo(f)) {
      // tried to rename which failed. Let' delete the target file and try
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.itemcreation.command.ElementCustomizationCommand.canExecute()

    public final void applyCustomization(IDOMModel model, Element tagElement)
    {
        ElementCustomizationCommand command =
            getElementCustomizationCommand(model, tagElement);
       
        if (command != null && command.canExecute())
        {
            command.execute();
        }
    }
View Full Code Here

Examples of org.eclipse.sapphire.ui.swt.gef.commands.DoubleClickNodeCommand.canExecute()

          Command cmd = new DoubleClickNodeCommand(getCastedModel().getNodePresentation());
          // If executing the command from edit domain's command stack, we'd get an
          // invalid cursor before the double click cmd is executed.
          // Bypassing the command stack
          //this.getViewer().getEditDomain().getCommandStack().execute(cmd);
          if (cmd.canExecute())
          {
            cmd.execute();
          }
        }
      }
View Full Code Here

Examples of org.eclipse.wst.xml.ui.internal.dnd.DragNodeCommand.canExecute()

             * the other direction as well)
             */
            float feedbackFloat = getHeightInItem(event);

            final DragNodeCommand command = new DragNodeCommand(event.item.getData(), feedbackFloat, event.operations, event.detail, selection.toList(), XMLTableTreeViewer.this);
            if (command != null && command.canExecute()) {
              SafeRunnable.run(new SafeRunnable() {
                public void run() throws Exception {
                  command.execute();
                }
              });
View Full Code Here

Examples of org.gephi.datalab.spi.ContextMenuItemManipulator.canExecute()

                    final ContextMenuItemManipulator item = nodesActionMappings.get(evt.getKeyCode());
                    if (item != null) {
                        Node[] nodes = nodeTable.getNodesFromSelectedRows();
                        if (nodes.length > 0) {
                            ((NodesManipulator) item).setup(nodes, nodes[0]);
                            if (item.isAvailable() && item.canExecute()) {
                                DataLaboratoryHelper.getDefault().executeManipulator(item);
                            }
                        }
                        evt.consume();
                    }
View Full Code Here

Examples of org.gephi.datalab.spi.ContextMenuItemManipulator.canExecute()

                    final ContextMenuItemManipulator item = edgesActionMappings.get(evt.getKeyCode());
                    if (item != null) {
                        Edge[] edges = edgeTable.getEdgesFromSelectedRows();
                        if (edges.length > 0) {
                            ((EdgesManipulator) item).setup(edges, edges[0]);
                            if (item.isAvailable() && item.canExecute()) {
                                DataLaboratoryHelper.getDefault().executeManipulator(item);
                            }
                        }
                        evt.consume();
                    }
View Full Code Here

Examples of org.gephi.datalab.spi.ContextMenuItemManipulator.canExecute()

        if (evt.getID() == KeyEvent.KEY_RELEASED && (evt.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) == KeyEvent.CTRL_DOWN_MASK) {
            final ContextMenuItemManipulator item = keyActionMappings.get(evt.getKeyCode());
            if (item != null) {
                ((GraphContextMenuItem) item).setup(eventBridge.getGraph(), eventBridge.getSelectedNodes());
                if (item.isAvailable() && item.canExecute()) {
                    DataLaboratoryHelper.getDefault().executeManipulator(item);
                }
                evt.consume();
            }
        }
View Full Code Here

Examples of org.gephi.datalab.spi.edges.EdgesManipulator.canExecute()

                    Edge[] selectedEdges = getEdgesFromSelectedRows();
                    if (selectedEdges.length > 0) {
                        EdgesManipulator del = dlh.getEdgesManipulatorByName("DeleteEdges");
                        if (del != null) {
                            del.setup(selectedEdges, null);
                            if (del.canExecute()) {
                                dlh.executeManipulator(del);
                            }
                        }
                    }
                }
View Full Code Here

Examples of org.gephi.datalab.spi.nodes.NodesManipulator.canExecute()

                    Node[] selectedNodes = getNodesFromSelectedRows();
                    if (selectedNodes.length > 0) {
                        NodesManipulator del = dlh.getNodesManipulatorByName("DeleteNodes");
                        if (del != null) {
                            del.setup(selectedNodes, null);
                            if (del.canExecute()) {
                                dlh.executeManipulator(del);
                            }
                        }
                    }
                }
View Full Code Here

Examples of org.gephi.datalab.spi.rows.merge.AttributeRowsMergeStrategy.canExecute()

        Object value;
        for (int i = 0; i < columns.length; i++) {
            mergeStrategy = mergeStrategies[i];
            if (mergeStrategy != null) {
                mergeStrategy.setup(rows, selectedRow, columns[i]);
                if (mergeStrategy.canExecute()) {
                    mergeStrategy.execute();
                    value = mergeStrategy.getReducedValue();
                } else {
                    value = selectedRow.getValue(columns[i].getIndex());
                }
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.