Examples of LabelAction


Examples of org.jenkinsci.plugins.workflow.actions.LabelAction

        GroovyShell shell = t.getExecution().getShell();

        Script script = shell.parse(cwd.child(step.getPath()).readToString());

        node.addAction(new LabelAction("Loaded script: "+step.getPath()));

        // execute body as another thread that shares the same head as this thread
        // as the body can pause.
        cps.invokeBodyLater(
                t.getGroup().export(script),
View Full Code Here

Examples of org.jenkinsci.plugins.workflow.actions.LabelAction

        }
        final ParameterizedJobMixIn.ParameterizedJob project = jenkins.getItem(job, invokingRun.getParent(), ParameterizedJobMixIn.ParameterizedJob.class);
        if (project == null) {
            throw new AbortException("No parameterized job named " + job + " found");
        }
        node.addAction(new LabelAction(Messages.BuildTriggerStepExecution_building_(project.getFullDisplayName())));
        List<Action> actions = new ArrayList<Action>();
        actions.add(new BuildTriggerAction(getContext()));
        actions.add(new CauseAction(new Cause.UpstreamCause(invokingRun)));
        List<ParameterValue> parameters = step.getParameters();
        if (parameters != null) {
View Full Code Here

Examples of org.jenkinsci.plugins.workflow.actions.LabelAction

        }
    }

    @Override
    public boolean start() throws Exception {
        node.addAction(new LabelAction(step.name));
        node.addAction(new StageActionImpl(step.name));
        enter(run, getContext(), step.name, step.concurrency);
        return false; // execute asynchronously
    }
View Full Code Here

Examples of org.jenkinsci.plugins.workflow.actions.LabelAction

        return getId();
    }

    @Exported
    public String getDisplayName() {
        LabelAction a = getAction(LabelAction.class);
        if (a!=null)    return a.getDisplayName();
        else            return getTypeDisplayName();
    }
View Full Code Here

Examples of org.rssowl.ui.internal.actions.LabelAction

          commonLabel = selectedLabels.iterator().next();

        IAction labelNone = new Action("None", IAction.AS_RADIO_BUTTON) {
          @Override
          public void run() {
            new LabelAction(null, (IStructuredSelection) fViewer.getSelection()).run();
          }
        };
        labelNone.setChecked(selectedLabels.size() == 0 || (selectedLabels.size() == 1 && commonLabel == null));

        labelMenu.add(labelNone);
        labelMenu.add(new Separator());

        Collection<ILabel> labels = DynamicDAO.loadAll(ILabel.class);
        for (final ILabel label : labels) {
          IAction labelAction = new Action(label.getName(), IAction.AS_RADIO_BUTTON) {
            @Override
            public void run() {
              new LabelAction(label, (IStructuredSelection) fViewer.getSelection()).run();
            }
          };

          labelAction.setChecked(label.equals(commonLabel));
          labelMenu.add(labelAction);
View Full Code Here

Examples of org.rssowl.ui.internal.actions.LabelAction

            IAction removeAllLabels = new Action("Remove All Labels") {
              @Override
              public void run() {
                Collection<ILabel> labels = DynamicDAO.loadAll(ILabel.class);
                new LabelAction(labels, (IStructuredSelection) fResultViewer.getSelection(), false).run();
              }
            };

            removeAllLabels.setEnabled(!labels.isEmpty());
            labelMenu.add(removeAllLabels);
            labelMenu.add(new Separator());

            for (final ILabel label : labels) {
              IAction labelAction = new Action(label.getName(), IAction.AS_CHECK_BOX) {
                @Override
                public void run() {
                  Set<ILabel> labels = new HashSet<ILabel>(1);
                  labels.add(label);
                  new LabelAction(labels, (IStructuredSelection) fResultViewer.getSelection(), isChecked()).run();
                }
              };

              labelAction.setChecked(selectedLabels.contains(label));
              labelMenu.add(labelAction);
View Full Code Here

Examples of org.rssowl.ui.internal.actions.LabelAction

            IAction removeAllLabels = new Action("Remove All Labels") {
              @Override
              public void run() {
                Collection<ILabel> labels = DynamicDAO.loadAll(ILabel.class);
                new LabelAction(labels, selection, false).run();
              }
            };

            removeAllLabels.setEnabled(!labels.isEmpty());
            labelMenu.add(removeAllLabels);
            labelMenu.add(new Separator());

            for (final ILabel label : labels) {
              IAction labelAction = new Action(label.getName(), IAction.AS_CHECK_BOX) {
                @Override
                public void run() {
                  Set<ILabel> labels = new HashSet<ILabel>(1);
                  labels.add(label);
                  new LabelAction(labels, selection, isChecked()).run();
                }
              };

              labelAction.setChecked(selectedLabels.contains(label));
              labelMenu.add(labelAction);
View Full Code Here

Examples of org.rssowl.ui.internal.actions.LabelAction

          commonLabel = selectedLabels.iterator().next();

        IAction labelNone = new Action("None", IAction.AS_RADIO_BUTTON) {
          @Override
          public void run() {
            new LabelAction(null, (IStructuredSelection) fViewer.getSelection()).run();
          }
        };
        labelNone.setChecked(selectedLabels.size() == 0 || (selectedLabels.size() == 1 && commonLabel == null));

        labelMenu.add(labelNone);
        labelMenu.add(new Separator());

        Collection<ILabel> labels = DynamicDAO.loadAll(ILabel.class);
        for (final ILabel label : labels) {
          IAction labelAction = new Action(label.getName(), IAction.AS_RADIO_BUTTON) {
            @Override
            public void run() {
              new LabelAction(label, (IStructuredSelection) fViewer.getSelection()).run();
            }
          };

          labelAction.setChecked(label.equals(commonLabel));
          labelMenu.add(labelAction);
View Full Code Here

Examples of org.rssowl.ui.internal.actions.LabelAction

            IAction removeAllLabels = new Action("Remove All Labels") {
              @Override
              public void run() {
                Collection<ILabel> labels = DynamicDAO.loadAll(ILabel.class);
                new LabelAction(labels, selection, false).run();
              }
            };

            removeAllLabels.setEnabled(!labels.isEmpty());
            labelMenu.add(removeAllLabels);
            labelMenu.add(new Separator());

            for (final ILabel label : labels) {
              IAction labelAction = new Action(label.getName(), IAction.AS_CHECK_BOX) {
                @Override
                public void run() {
                  Set<ILabel> labels = new HashSet<ILabel>(1);
                  labels.add(label);
                  new LabelAction(labels, selection, isChecked()).run();
                }
              };

              labelAction.setChecked(selectedLabels.contains(label));
              labelMenu.add(labelAction);
View Full Code Here

Examples of org.rssowl.ui.internal.actions.LabelAction

    news2.setTitle("News 2");
    INews news3 = Owl.getModelFactory().createNews(null, feed, new Date());
    news3.setTitle("News 3");
    DynamicDAO.save(feed);

    LabelAction action = new LabelAction(label1, new StructuredSelection(new Object[] { news1, news2 }));
    action.setChecked(true);
    action.run();

    assertEquals(1, news1.getLabels().size());
    assertEquals(1, news2.getLabels().size());

    action = new LabelAction(label1, new StructuredSelection(new Object[] { news1, news2 }));
    action.run();

    assertEquals(0, news1.getLabels().size());
    assertEquals(0, news2.getLabels().size());
  }
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.