public void addComponents() { //Set up actions. pauseAction = new PauseAction(); quitAction = new QuitAction(); scrollPane.getInputMap().put(KeyStroke.getKeyStroke("P"), "doPauseAction"); scrollPane.getActionMap().put("doPauseAction", pauseAction); scrollPane.getInputMap().put(KeyStroke.getKeyStroke("SPACE"), "doQuitAction"); scrollPane.getActionMap().put("doQuitAction", quitAction); scrollPane.setBackground(Color.BLACK); getContentPane().add(scrollPane); viewer.repaint(); }
public void addComponents() { //Set up actions. pauseAction = new PauseAction(); quitAction = new QuitAction(); scrollPane.getInputMap().put(KeyStroke.getKeyStroke("P"), "doPauseAction"); scrollPane.getActionMap().put("doPauseAction", pauseAction); scrollPane.getInputMap().put(KeyStroke.getKeyStroke("SPACE"), "doQuitAction"); scrollPane.getActionMap().put("doQuitAction", quitAction); scrollPane.setBackground(Color.BLACK); viewer.getContentPane().add(scrollPane); viewer.repaint(); }
@Override public boolean start() throws Exception { processStepParameters(); if (!checkTaskCompleted()) { getContext().get(FlowNode.class).addAction(new PauseAction("SonarQube analysis")); return false; } else { return true; } }
@Override public boolean start() throws Exception { // record this input getPauseAction().add(this); // This node causes the flow to pause at this point so we mark it as a "Pause Node". node.addAction(new PauseAction("Input")); String baseUrl = '/' + run.getUrl() + getPauseAction().getUrlName() + '/'; //JENKINS-40594 submitterParameter does not work without at least one actual parameter if (input.getParameters().isEmpty() && input.getSubmitterParameter() == null) { String thisUrl = baseUrl + Util.rawEncode(getId()) + '/'; listener.getLogger().printf("%s%n%s or %s%n", input.getMessage(), POSTHyperlinkNote.encodeTo(thisUrl + "proceedEmpty", input.getOk()), POSTHyperlinkNote.encodeTo(thisUrl + "abort", "Abort")); } else { // TODO listener.hyperlink(…) does not work; why? // TODO would be even cooler to embed the parameter form right in the build log (hiding it after submission) listener.getLogger().println(HyperlinkNote.encodeTo(baseUrl, "Input requested")); } return false; }