Examples of Tool


Examples of org.apache.hadoop.util.Tool

     * Invalid arguments for program entry.
     * @throws Exception if failed
     */
    @Test
    public void run_invalid() throws Exception {
        Tool exec = new DirectIoAbortTransaction(repo);
        assertThat(ToolRunner.run(conf, exec, new String[] { }), is(not(0)));
        assertThat(ToolRunner.run(conf, exec, new String[] {"1", "2"}), is(not(0)));
    }
View Full Code Here

Examples of org.apache.oodt.cas.workflow.gui.toolbox.Tool

    this.setLayout(new BorderLayout());
    this.setPreferredSize(new Dimension(1000, 800));

    Vector<Tool> tools = new Vector<Tool>();
    Tool editTool = new Tool(IconLoader.getIcon(IconLoader.EDIT),
        IconLoader.getIcon(IconLoader.EDIT_SELECTED)) {
      private static final long serialVersionUID = 1682845263796161282L;

      @Override
      public void onClick() {
        WorkflowGUI.this.perspective.setMode(View.Mode.EDIT);
      }
    };
    tools.add(editTool);
    Tool deleteTool = new Tool(IconLoader.getIcon(IconLoader.DELETE),
        IconLoader.getIcon(IconLoader.DELETE_SELECTED)) {
      private static final long serialVersionUID = 5050127713254634783L;

      @Override
      public void onClick() {
        WorkflowGUI.this.perspective.setMode(View.Mode.DELETE);
      }
    };
    tools.add(deleteTool);
    Tool moveTool = new Tool(IconLoader.getIcon(IconLoader.MOVE),
        IconLoader.getIcon(IconLoader.MOVE_SELECTED)) {
      private static final long serialVersionUID = 1682845263796161282L;

      @Override
      public void onClick() {
        WorkflowGUI.this.perspective.setMode(View.Mode.MOVE);
      }
    };
    tools.add(moveTool);
    Tool zoomInTool = new Tool(IconLoader.getIcon(IconLoader.ZOOM_IN),
        IconLoader.getIcon(IconLoader.ZOOM_IN_SELECTED)) {
      private static final long serialVersionUID = 1682845263796161282L;

      @Override
      public void onClick() {
        WorkflowGUI.this.perspective.setMode(View.Mode.ZOOM_IN);
      }
    };
    tools.add(zoomInTool);
    Tool zoomOutTool = new Tool(IconLoader.getIcon(IconLoader.ZOOM_OUT),
        IconLoader.getIcon(IconLoader.ZOOM_OUT_SELECTED)) {
      private static final long serialVersionUID = 1682845263796161282L;

      @Override
      public void onClick() {
View Full Code Here

Examples of org.eclipse.gef.Tool

    /**
     * @generated
     */
    public Tool createTool() {
      Tool tool = new UnspecifiedTypeCreationTool(elementTypes);
      tool.setProperties(getToolProperties());
      return tool;
    }
View Full Code Here

Examples of org.enhydra.shark.xpdl.elements.Tool

              e.printStackTrace();
              throw new BaseException(e);
        }

         while (tools.hasNext()) {
            Tool tool = (Tool)tools.next();
            cus.info("Activity"+activity.toString()+" - Executing tool [id="+tool.getId()+"]");
            // implement me
            /*if (tool.get("Type").toValue().toString().equals("APPLICATION")) {
             } else {*/
            try {
               invokeApplication(tool);
               // if some application is not executed, throw an exception
            } catch (Throwable ex) {
               cus.error("Activity"+activity.toString()+" - failed to execute tool [id="+tool.getId()+"]");
               if (ex instanceof ToolAgentGeneralException) {
                  throw (ToolAgentGeneralException)ex;
               } else {
                  throw new BaseException(ex);
               }
View Full Code Here

Examples of org.gephi.tools.spi.Tool

        });

        //Create toolbar
        final Toolbar toolbar = new Toolbar();
        for (final ToolUI toolUI : toolsUI) {
            final Tool tool = toolMap.get(toolUI);
            JToggleButton btn;
            if (toolUI.getIcon() != null) {
                btn = new JToggleButton(toolUI.getIcon());
            } else {
                btn = new JToggleButton(new ImageIcon(getClass().getResource("/org/gephi/desktop/tools/tool.png")));
View Full Code Here

Examples of org.getspout.spoutapi.material.Tool

          if (!(item instanceof Tool)) {
            return def;
          }

          Tool tool = (Tool) item;

          float modifier = tool.getStrengthModifier(block);

          return modifier / hardness / (modifier > 1F ? 30F : 100F);
        }
      }
    } else if (method.getName().equals("remove")) {
View Full Code Here

Examples of org.gradle.nativeplatform.Tool

        task.source(sourceSet.getSource());

        final Project project = task.getProject();
        task.setObjectFileDir(project.file(project.getBuildDir() + "/objs/" + binary.getNamingScheme().getOutputDirectoryBase() + "/" + sourceSet.getFullName()));

        Tool assemblerTool = (Tool) ((ExtensionAware) binary).getExtensions().getByName("assembler");
        task.setAssemblerArgs(assemblerTool.getArgs());

        binary.getTasks().getCreateOrLink().source(task.getOutputs().getFiles().getAsFileTree().matching(new PatternSet().include("**/*.obj", "**/*.o")));
    }
View Full Code Here

Examples of org.h2.util.Tool

        try {
            String toolName = (String) attributes.get("tool");
            session.put("tool", toolName);
            String args = (String) attributes.get("args");
            String[] argList = StringUtils.arraySplit(args, ',', false);
            Tool tool = null;
            if ("Backup".equals(toolName)) {
                tool = new Backup();
            } else if ("Restore".equals(toolName)) {
                tool = new Restore();
            } else if ("Recover".equals(toolName)) {
                tool = new Recover();
            } else if ("DeleteDbFiles".equals(toolName)) {
                tool = new DeleteDbFiles();
            } else if ("ChangeFileEncryption".equals(toolName)) {
                tool = new ChangeFileEncryption();
            } else if ("Script".equals(toolName)) {
                tool = new Script();
            } else if ("RunScript".equals(toolName)) {
                tool = new RunScript();
            } else if ("ConvertTraceFile".equals(toolName)) {
                tool = new ConvertTraceFile();
            } else if ("CreateCluster".equals(toolName)) {
                tool = new CreateCluster();
            } else {
                throw DbException.throwInternalError(toolName);
            }
            ByteArrayOutputStream outBuff = new ByteArrayOutputStream();
            PrintStream out = new PrintStream(outBuff, false, "UTF-8");
            tool.setOut(out);
            try {
                tool.runTool(argList);
                out.flush();
                String o = new String(outBuff.toByteArray(), "UTF-8");
                String result = PageParser.escapeHtml(o);
                session.put("toolResult", result);
            } catch (Exception e) {
View Full Code Here

Examples of org.jboss.errai.workspaces.client.api.Tool

    if (null == deck)
      throw new IllegalArgumentException("No such toolSet: " + toolSetId);

    // select tool
    ToolSet selectedToolSet = deck.toolSet;
    Tool selectedTool = null;
    if (toolId != null// particular tool
    {
      for (Tool t : selectedToolSet.getAllProvidedTools()) {
        if (toolId.equals(t.getId())) {
          selectedTool = t;
          break;
        }
      }
    }
    else  // default tool, the first one
    {
      Tool[] availableTools = selectedToolSet.getAllProvidedTools();
      if (availableTools == null || availableTools.length == 0)
        throw new IllegalArgumentException("Empty toolset: " + toolSetId);

      selectedTool = availableTools[0];
    }

    // is it already open?
    boolean isOpen = false;
    for (int i = 0; i < deck.tabLayout.getWidgetCount(); i++)
    {
      ToolTabPanel toolTab = (ToolTabPanel) deck.tabLayout.getWidget(i);
      if (toolTab.toolId.equals(selectedTool.getId())) {
        isOpen = true;
        deck.tabLayout.selectTab(i);
      }
    }

    if (!isOpen) // & selectedTool.multipleAllowed()==false
    {
      final ToolTabPanel panelTool = new ToolTabPanel(toolSetId, selectedTool);
      panelTool.invalidate();

      ResourceFactory resourceFactory = GWT.create(ResourceFactory.class);
      ErraiImageBundle erraiImageBundle = GWT.create(ErraiImageBundle.class);
      ImageResource resource = resourceFactory.createImage(selectedTool.getName()) != null ?
          resourceFactory.createImage(selectedTool.getName()) : erraiImageBundle.application();

      deck.tabLayout.add(
          panelTool,
          AbstractImagePrototype.create(resource).getHTML() + "&nbsp;" + selectedTool.getName(),
          true
      );


      deck.tabLayout.selectTab(
View Full Code Here

Examples of org.kite9.tool.Tool

   
    // add specific maven configuration overrides
    propsToUse.putAll(userProperties);
    getLog().info("Using Properties: " + propsToUse);

    Tool t = new Tool();
    GenericXmlApplicationContext context = t.createSpringContext(propsToUse, this.getClass().getClassLoader());
    BasicKite9Runner runner = (BasicKite9Runner) context.getBean(BasicKite9Runner.class);
    Kite9Context kite9Context = (Kite9Context) context.getBean(Kite9Context.class);

    boolean addMap = new File(propsToUse.getProperty("javadoc-listener.docRoot")).exists();
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.