Examples of Action


Examples of org.drools.spi.Action

       
        final List<String> myList = new ArrayList<String>();
        ActionNode actionNode = new ActionNode();
        actionNode.setName("Print");
        DroolsAction action = new DroolsConsequenceAction("java", null);
        action.setMetaData("Action", new Action() {
            public void execute(KnowledgeHelper knowledgeHelper, WorkingMemory workingMemory, ProcessContext context) throws Exception {
              System.out.println("Detected event for person " + ((Person) context.getVariable("event")).getName());
                myList.add("Executed action");
            }
        });
View Full Code Here

Examples of org.eclipse.birt.report.engine.api.impl.Action

                try {
                    IReportRunnable runnable = services.getReportRunnable();
                    String systemId = runnable == null ? null
                            : runnable.getReportName();

                    Action act = new Action(systemId, hlAction);

                    String link = null;
                    String tooltip = EngineUtil.getActionTooltip(hlAction);

                    Object ac = services.getOption(RenderOption.ACTION_HANDLER);
View Full Code Here

Examples of org.eclipse.jface.action.Action

       
    }   
   
    private void makeActions (){

    _startWGARuntime = new Action() {
        public void run() {
            if (_table.getTable().getItemCount() > 0) {
                if (TomcatUtils.getInstance().isRunning(_selectedRuntime)) {
                    RestartWGARuntime.call();
                }
                else {
                    StartWGARuntime.call(_selectedRuntime);
                }               
            }
        }
    };

    _startWGARuntime.setText("Start/ restart WGA Runtime");
    _startWGARuntime.setImageDescriptor(ImageDescriptor.createFromImage(WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_WGA_SERVER_START)));
    _startWGARuntime.setDisabledImageDescriptor(ImageDescriptor.createFromImage(WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_INAKTIV_WGA_SERVER_START)));

    _refreshAction = new Action() {
        public void run() {
            updateWorkingSetList();
            _table.refresh()
         }
    };
    _refreshAction.setText("Refresh view");
    _refreshAction.setImageDescriptor(ImageDescriptor.createFromImage(WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_REFRESH)));

    // _refreshAction.setEnabled(enabled);
    _stopWGARuntime = new Action() {
        public void run() {
            StopWGARuntime.call();
        }
    };

    _stopWGARuntime.setText("Stop WGA Runtime");
    // stopWGARuntime.setToolTipText("Action 2 tooltip");
    _stopWGARuntime.setImageDescriptor(ImageDescriptor.createFromImage(WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_WGA_SERVER_STOP)));
    _stopWGARuntime.setDisabledImageDescriptor(ImageDescriptor.createFromImage(WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_INAKTIV_WGA_SERVER_STOP)));
    _stopWGARuntime.setEnabled(false);
   
    _doubleClickAction = new Action() {
        public void run() {
            ISelection selection = _table.getSelection();
            Object obj = ((IStructuredSelection) selection).getFirstElement();
            if (obj instanceof WGARuntime) {
                WGARuntime runtime  = (WGARuntime)obj;
View Full Code Here

Examples of org.eclipse.jgit.lib.RebaseTodoLine.Action

      String line = br.readLine();
      while (line != null) {
        int firstBlank = line.indexOf(' ');
        if (firstBlank != -1) {
          String actionToken = line.substring(0, firstBlank);
          Action action = null;
          try {
            action = Action.parse(actionToken);
          } catch (Exception e) {
            // ignore
          }
View Full Code Here

Examples of org.eclipse.uml2.Action

    protected Object handleGetEffect()
    {
        // Effect is mapped to action, not activity
        // We return the first action encountered in the activity
        Action effectAction = null;
        Activity effect = this.metaObject.getEffect();
        if (effect != null)
        {
            Collection nodes = effect.getNodes();
            for (Iterator nodesIt = nodes.iterator(); nodesIt.hasNext() && effectAction == null;)
View Full Code Here

Examples of org.eclipse.uml2.uml.Action

   * @return
   */
  static Operation getContextOperation(Constraint localPostcondition) {
    // XXX you could perform a proper search in all places where an
    // Operation specifiing some activity could hide
    Action action = (Action) localPostcondition.getOwner();
    Activity activity = action.getActivity();
    Operation contextOp = null;
    if (activity.getSpecification() instanceof Operation) {
      contextOp = (Operation) activity.getSpecification();
    } else if (activity.getOwner() instanceof Class) {
      Class oClass = (Class) activity.getOwner();
View Full Code Here

Examples of org.encog.ml.world.Action

    }

    GridState gridResultState = (GridState) resultState;
    GridState gridPreviousState = (GridState) previousState;

    Action resultingAction = determineResultingAction(gridPreviousState,
        gridResultState);
    GridState desiredState = determineActionState(gridPreviousState,
        desiredAction);

    // are we trying to move nowhere
View Full Code Here

Examples of org.exist.performance.actions.Action

                      if (clazz == null)
                          throw new EXistException("no class defined for action: " + elem.getLocalName());
                      if (!Action.class.isAssignableFrom(clazz))
                          throw new EXistException("class " + clazz.getName() + " does not implement interface Action");
                      try {
                          Action instance = (Action) clazz.newInstance();
                          instance.configure(runner, this, elem);
                          actions.add(instance);
                      } catch (InstantiationException e) {
                          throw new EXistException("failed to create instance of class " + clazz.getName(), e);
                      } catch (IllegalAccessException e) {
                          throw new EXistException("failed to create instance of class " + clazz.getName(), e);
View Full Code Here

Examples of org.exoplatform.services.command.action.Action

               SessionEventMatcher matcher =
                        new SessionEventMatcher(getEventTypes(ac.getEventTypes()), getPaths(ac.getPath()), ac.isDeep(),
                                 getWorkspaces(ac.getWorkspace()), getNames(ac.getNodeTypes()), typeDataManager);

               Action action = (Action) Class.forName(ac.getActionClassName()).newInstance();
               addAction(matcher, action);
            }
            catch (Exception e)
            {
               e.printStackTrace();
View Full Code Here

Examples of org.fenrir.yggdrasil.ui.action.Action

        // Entrada al popup
        final TrayPopupEntry entry = new TrayPopupEntry();
        entry.setNotificationId(notification.getId());
        entry.setMessage(notification.getMessage());
        if(notification instanceof INotificationActionSupport){
            Action action = ((INotificationActionSupport)notification).getAction();
            entry.setAction(action);
        }
        ImageIcon icon = new ImageIcon(getClass().getResource(notification.getIconPath()));
        entry.setIcon(icon);
       
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.