List of usage examples for org.eclipse.jface.dialogs IDialogConstants BACK_ID
int BACK_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants BACK_ID.
Click Source Link
From source file:org.continuousassurance.swamp.eclipse.dialogs.PlatformDialog.java
License:Apache License
/** * Method for handling back button being pressed *//*from w w w . j a v a 2s .c om*/ protected void backPressed() { //submissionInfo.setSelectedPlatformIDs(null); submissionInfo.setSelectedPlatformIDs(getSelectedIDs()); super.setReturnCode(IDialogConstants.BACK_ID); super.close(); }
From source file:org.continuousassurance.swamp.eclipse.dialogs.ToolDialog.java
License:Apache License
/** * Method for handling back button being pressed *///from w ww. j a v a 2 s . co m private void backPressed() { //submissionInfo.setSelectedToolIDs(null); submissionInfo.setSelectedToolIDs(getSelectedIDs()); super.setReturnCode(IDialogConstants.BACK_ID); super.close(); }
From source file:org.continuousassurance.swamp.eclipse.SwampSubmitter.java
License:Apache License
/** * Launches the dialogs (ConfigDialog --> ToolDialog --> PlatformDialog) * @param si SubmissionInfo object storing information about * this submission//from w ww . ja v a 2s. c o m */ private void launchConfiguration(SubmissionInfo si) { ConfigDialog cd; ToolDialog td; PlatformDialog pd; Deque<TitleAreaDialog> stack = new ArrayDeque<>(); // load plug-in preferences si.loadPluginSettings(); cd = new ConfigDialog(window.getShell(), si); td = new ToolDialog(window.getShell(), si); pd = new PlatformDialog(window.getShell(), si); stack.addFirst(pd); stack.addFirst(td); stack.addFirst(cd); while (!stack.isEmpty()) { TitleAreaDialog dialog = stack.removeFirst(); int retCode = dialog.open(); if (retCode == Window.CANCEL) { printToConsole(Utils.getBracketedTimestamp() + PLUGIN_EXIT_MANUAL); return; } else if (retCode == IDialogConstants.BACK_ID) { stack.addFirst(dialog); if (dialog instanceof ToolDialog) { stack.addFirst(cd); } else { // dialog instanceof PlatformDialog stack.addFirst(td); } } } // save plug-in preferences si.savePluginSettings(); configFilepath = si.getProjectWorkingLocation() + File.separator + CONFIG_FILENAME; FileSerializer.serializeSubmissionInfo(configFilepath, si); if (si.isCProject()) { submitPreConfiguredJob(si); // here we'll call method to handle C project properly // TODO The fun stuff // (DONE) Get path of makefile relative to project - should be done in ConfigDialog // (DONE) Zip project - just add it to files to be zipped // (3) Make appropriate modifications to pkgConf // (Later) Also zip dependent projects } else if (si.needsBuildFile()) { submitAutoGenJob(si); } else { submitPreConfiguredJob(si); } }
From source file:org.dbe.businessModeller.dictionary.ui.AskingDialog.java
License:Open Source License
/** * Create contents of the button bar/*from w w w . j a v a 2 s . c o m*/ * @param parent */ protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); createButton(parent, IDialogConstants.BACK_ID, "...", false); }
From source file:org.eclipse.b3.build.ui.commands.ConfigurableWizardDialog.java
License:Open Source License
public void configureButtonsForEndPage() { // disable Cancel Button b = getButton(IDialogConstants.CANCEL_ID); b.setEnabled(false);/*from w ww. j a v a 2s.c o m*/ // modify label of finish b = getButton(IDialogConstants.FINISH_ID); b.setText("Close"); // hide next and previous buttons (if available b = getButton(IDialogConstants.NEXT_ID); if (b != null) b.setVisible(false); b = getButton(IDialogConstants.BACK_ID); if (b != null) b.setVisible(false); }
From source file:org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBaseDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.BACK_ID, Messages.getString("WizardBase.Back"), //$NON-NLS-1$ false);/*ww w.j a v a 2s.com*/ createButton(parent, IDialogConstants.NEXT_ID, Messages.getString("WizardBase.Next"), //$NON-NLS-1$ false); createButton(parent, IDialogConstants.FINISH_ID, Messages.getString("WizardBase.Finish"), //$NON-NLS-1$ this.wizardBase.bEnterClosed); createButton(parent, IDialogConstants.CANCEL_ID, Messages.getString("WizardBase.Cancel"), //$NON-NLS-1$ false); for (int i = 0; i < this.wizardBase.buttonList.size(); i++) { IButtonHandler buttonHandler = this.wizardBase.buttonList.get(i); // Make sure the same id was not registered. assert getButton(buttonHandler.getId()) == null; buttonHandler.setButton(createButton(parent, buttonHandler.getId(), buttonHandler.getLabel(), false)); } // Update buttons status int taskIndex = this.wizardBase.vTaskIDs.indexOf(this.wizardBase.sCurrentActiveTask); if (taskIndex > 0) { getButton(IDialogConstants.BACK_ID).setEnabled(true); } else { getButton(IDialogConstants.BACK_ID).setEnabled(false); } if (taskIndex < this.wizardBase.vTaskIDs.size() - 1) { getButton(IDialogConstants.NEXT_ID).setEnabled(true); } else { getButton(IDialogConstants.NEXT_ID).setEnabled(false); } }
From source file:org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBaseDialog.java
License:Open Source License
protected void buttonPressed(int buttonId) { if (IDialogConstants.FINISH_ID == buttonId) { okPressed();//ww w.jav a 2 s. c om } else if (IDialogConstants.CANCEL_ID == buttonId) { cancelPressed(); } else if (IDialogConstants.BACK_ID == buttonId) { backPressed(); } else if (IDialogConstants.NEXT_ID == buttonId) { nextPressed(); } for (int i = 0; i < this.wizardBase.buttonList.size(); i++) { IButtonHandler buttonHandler = this.wizardBase.buttonList.get(i); if (buttonId == buttonHandler.getId()) { buttonHandler.run(); break; } } }
From source file:org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBaseDialog.java
License:Open Source License
private void backPressed() { int i = this.wizardBase.vTaskIDs.indexOf(this.wizardBase.sCurrentActiveTask); if (i > 0) { cmpTaskContainer.setSelection(i - 1); this.wizardBase.switchTo(this.wizardBase.vTaskIDs.get(i - 1)); getButton(IDialogConstants.NEXT_ID).setEnabled(true); }// w w w . j a va 2 s . co m if (i == 1) { // Just switched to first tab getButton(IDialogConstants.BACK_ID).setEnabled(false); } }
From source file:org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBaseDialog.java
License:Open Source License
private void nextPressed() { int i = this.wizardBase.vTaskIDs.indexOf(this.wizardBase.sCurrentActiveTask); if (i < this.wizardBase.vTaskIDs.size() - 1) { cmpTaskContainer.setSelection(i + 1); this.wizardBase.switchTo(this.wizardBase.vTaskIDs.get(i + 1)); getButton(IDialogConstants.BACK_ID).setEnabled(true); }/*from w w w . j av a 2s. c o m*/ if (i == this.wizardBase.vTaskIDs.size() - 2) { getButton(IDialogConstants.NEXT_ID).setEnabled(false); } }
From source file:org.eclipse.birt.core.ui.frameworks.taskwizard.WizardBaseDialog.java
License:Open Source License
public void widgetSelected(SelectionEvent e) { if (e.getSource() instanceof CTabFolder) { String taskId = (String) e.item.getData(); int indexLabel = this.wizardBase.vTaskIDs.indexOf(taskId); if (indexLabel >= 0) { this.wizardBase.switchTo(taskId); getButton(IDialogConstants.NEXT_ID).setEnabled(indexLabel < this.wizardBase.vTaskIDs.size() - 1); getButton(IDialogConstants.BACK_ID).setEnabled(indexLabel > 0); }//from w w w. j a v a2 s . com } else if (e.getSource() instanceof ToolItem) { if (wizardBase.getTabToolButtons().contains(((ToolItem) e.getSource()).getData())) { IButtonHandler btnHandle = (IButtonHandler) ((ToolItem) e.getSource()).getData(); btnHandle.run(); } } }