Java Code Examples for org.eclipse.jface.wizard.WizardDialog#open()
The following examples show how to use
org.eclipse.jface.wizard.WizardDialog#open() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PublishLibraryToResourceFolderAction.java From birt with Eclipse Public License 1.0 | 6 votes |
public void run( ) { if ( isEnable( ) == false ) { return; } ModuleHandle module = SessionHandleAdapter.getInstance( ) .getReportDesignHandle( ); String filePath = module.getFileName( ); String fileName = filePath.substring( filePath.lastIndexOf( File.separator ) + 1 ); PublishLibraryWizard publishLibrary = new PublishLibraryWizard( (LibraryHandle) module, fileName, ReportPlugin.getDefault( ).getResourceFolder( ) ); WizardDialog dialog = new BaseWizardDialog( UIUtil.getDefaultShell( ), publishLibrary ); dialog.setPageSize( 500, 250 ); dialog.open( ); }
Example 2
Source File: TraceExplorerComposite.java From tlaplus with MIT License | 6 votes |
/** * Opens a dialog for formula processing and returns the edited formula * @param formula initial formula, can be <code>null</code> * @return result of editing or <code>null</code>, if editing canceled */ protected Formula doEditFormula(Formula formula) { // Create the wizard FormulaWizard wizard = new FormulaWizard(section.getText(), "Enter an expression to be evaluated at each state of the trace.", String.format( "The expression may be named and may include the %s and %s operators (click question mark below for details).", TLAConstants.TraceExplore.TRACE, TLAConstants.TraceExplore.POSITION), "ErrorTraceExplorerExpression"); wizard.setFormula(formula); // Create the wizard dialog WizardDialog dialog = new WizardDialog(getTableViewer().getTable().getShell(), wizard); dialog.setHelpAvailable(true); // Open the wizard dialog if (Window.OK == dialog.open()) { return wizard.getFormula(); } else { return null; } }
Example 3
Source File: ConfigBluemixWizard.java From XPagesExtensionLibrary with Apache License 2.0 | 6 votes |
static public void launch() { // Check there's an open project if (ToolbarAction.project != null) { // Check that the Server details are configured if (BluemixUtil.isServerConfigured()) { // Check is the manifest open ManifestMultiPageEditor editor = BluemixUtil.getManifestEditor(ToolbarAction.project); if (editor != null) { MessageDialog.openWarning(null, _WIZARD_TITLE, "The Manifest for this application is open. You must close the Manifest before running the Configuration Wizard."); // $NLX-ConfigBluemixWizard.TheManifestforthisapplicat-1$ } else { // Launch the Bluemix Config Wizard ConfigBluemixWizard wiz = new ConfigBluemixWizard(); WizardDialog dialog = new WizardDialog(null, wiz); dialog.addPageChangingListener(wiz); dialog.open(); } } else { BluemixUtil.displayConfigureServerDialog(); } } else { MessageDialog.openError(null, _WIZARD_TITLE, "No application has been selected or the selected application is not open."); // $NLX-ConfigBluemixWizard.Noapplicationhasbeenselectedorthe-1$ } }
Example 4
Source File: WorkingSetConfigurationDialog.java From n4js with Eclipse Public License 1.0 | 6 votes |
private void createWorkingSet() { if (manager instanceof MutableWorkingSetManager) { final WorkingSetNewWizard wizard = ((MutableWorkingSetManager) manager).createNewWizard(); // set allWorkingSets according to dialog to use it as a base for validation wizard.setAllWorkingSets(allWorkingSets); final WizardDialog dialog = new WizardDialog(getShell(), wizard); if (dialog.open() == Window.OK) { final WorkingSet workingSet = wizard.getWorkingSet().orNull(); if (workingSet != null) { diffBuilder.add(workingSet); getShell().getDisplay().asyncExec(new Runnable() { @Override public void run() { allWorkingSets.add(workingSet); tableViewer.add(workingSet); tableViewer.setChecked(workingSet, true); } }); } } } }
Example 5
Source File: ExportServiceAction.java From tesb-studio-se with Apache License 2.0 | 6 votes |
@Override protected void doRun() { try { if (!isAllOperationsAssignedJob(serviceItem)) { boolean isContinue = MessageDialog .openQuestion(shell, Messages.ExportServiceAction_noJobDialogTitle, Messages.ExportServiceAction_noJobDialogMsg); if (!isContinue) { return; } } } catch (PersistenceException e) { ExceptionHandler.process(e); } ServiceExportWizard processWizard = new ServiceExportWizard(serviceItem); IWorkbench workbench = getWorkbench(); processWizard.setWindowTitle(EXPORT_SERVICE_LABEL); WizardDialog dialog = new WizardDialog(shell, processWizard); workbench.saveAllEditors(true); dialog.open(); }
Example 6
Source File: SdkEnvironmentControl.java From xds-ide with Eclipse Public License 1.0 | 5 votes |
@Override public void widgetSelected(SelectionEvent e) { if (selectedVar != null) { EditVarDlg dlg = new EditVarDlg(selectedVar, editedSdk.getEnvironmentVariableRaw(selectedVar)); WizardDialog dialog = new WizardDialog(getShell(), dlg); if (dialog.open() == WizardDialog.OK) { editedSdk.putEnvironmentVariable(selectedVar, dlg.getVal()); tableViewer.setInput(editedSdk); } } }
Example 7
Source File: AddConnectionToolbarAction.java From codewind-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override public void run(IAction action) { try { NewCodewindConnectionWizard wizard = new NewCodewindConnectionWizard(); WizardDialog dialog = new WizardDialog(Display.getDefault().getActiveShell(), wizard); dialog.open(); } catch (Exception e) { Logger.logError("An error occurred running the new connection toolbar action", e); //$NON-NLS-1$ } }
Example 8
Source File: WizardHandler.java From txtUML with Eclipse Public License 1.0 | 5 votes |
/** * Opens a UmlToPapyrus wizard */ @Override public Object execute(ExecutionEvent event) throws ExecutionException { WizardDialog wizardDialog = new WizardDialog( null, new UmlToPapyrusWizard()); wizardDialog.open(); return null; }
Example 9
Source File: CreateItemAction.java From ice with Eclipse Public License 1.0 | 5 votes |
/** * This operation connects to the Client to create an Item * * @see org.eclipse.jface.action.Action#run() */ @Override public void run() { // Local Declarations String msg = "ICE does not have any plugins configured! " + "This most likely means that you are missing some required " + "data files or that ICE hasn't completely loaded yet. " + "In rare instances it may indicate a bug in the " + "plug-in that you are trying to use. If you feel like you have " + "configured everything properly, feel free to submit a bug " + "report at http://projects.eclipse.org/projects/technology.ice" + " and reference error code #2."; // Get the client reference IClient client = ClientHolder.getClient(); // Present a selection dialog if Items are available if (client != null && client.getAvailableItemTypes() != null) { // Open the wizard dialog WizardDialog wizardDialog = new WizardDialog( workbenchWindow.getShell(), new NewItemWizard()); wizardDialog.open(); } else { // Throw an error if no Items are available MessageDialog.openError(workbenchWindow.getShell(), "Unable to create items!", msg); } }
Example 10
Source File: BindAction.java From codewind-eclipse with Eclipse Public License 2.0 | 5 votes |
public static void openBindProjectWizard(CodewindConnection connection) { try { BindProjectWizard wizard = new BindProjectWizard(connection); WizardDialog dialog = new WizardDialog(Display.getDefault().getActiveShell(), wizard); dialog.open(); } catch (Exception e) { Logger.logError("An error occurred opening the bind project wizard for connection: " + connection.getBaseURI(), e); //$NON-NLS-1$ } }
Example 11
Source File: WizardAction.java From CogniCrypt with Eclipse Public License 2.0 | 5 votes |
@Override public void run(final IAction arg0) { Constants.WizardActionFromContextMenuFlag = false; final WizardDialog dialog = new WizardDialog(new Shell(), new TaskIntegrationWizard()); // dialog.setPageSize(Constants.DEFAULT_SIZE_FOR_TI_WIZARD); // dialog.setMinimumPageSize(Constants.DEFAULT_SIZE_FOR_COMPOSITES); dialog.open(); }
Example 12
Source File: TestConnectorWizard.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
protected ConnectorImplementation openImplementationSelection(final String defId, final String defVersion) { final SelectConnectorImplementationWizard wizard = new SelectConnectorImplementationWizard(defId, defVersion); final WizardDialog dialog = new WizardDialog(Display.getDefault().getActiveShell(), wizard); if (dialog.open() == Dialog.OK) { return wizard.getConnectorImplementation(); } return null; }
Example 13
Source File: NewFilterDefinitionHandler.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
@Override public Object execute(ExecutionEvent event) throws ExecutionException { final ActorFilterDefRepositoryStore defStore = (ActorFilterDefRepositoryStore) RepositoryManager.getInstance().getRepositoryStore(ActorFilterDefRepositoryStore.class) ; final DefinitionResourceProvider messageProvider = DefinitionResourceProvider.getInstance(defStore,ActorsPlugin.getDefault().getBundle()); FilterDefinitionWizard wizard = new FilterDefinitionWizard(messageProvider) ; WizardDialog wd = new ConnectorDefinitionWizardDialog(Display.getCurrent().getActiveShell(),wizard,messageProvider) ; wd.open(); return null ; }
Example 14
Source File: ResolveTreeConflictAction.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
public void run() { IStructuredSelection selection = (IStructuredSelection)selectionProvider.getSelection(); SVNTreeConflict treeConflict = (SVNTreeConflict)selection.getFirstElement(); ResolveTreeConflictWizard wizard = new ResolveTreeConflictWizard(treeConflict, targetPart); WizardDialog dialog = new SizePersistedWizardDialog(Display.getDefault().getActiveShell(), wizard, "ResolveTreeConflict"); //$NON-NLS-1$ dialog.open(); }
Example 15
Source File: ImportItemWizardAction.java From ice with Eclipse Public License 1.0 | 5 votes |
/** * This operation runs the action. */ @Override public void run() { // Add wizard stuff WizardDialog importDialog = new WizardDialog( workbenchWindow.getShell(), new ImportItemWizard( workbenchWindow)); importDialog.open(); return; }
Example 16
Source File: EditLocationAction.java From hadoop-gpu with Apache License 2.0 | 5 votes |
@Override public void run() { final HadoopServer server = serverView.getSelectedServer(); if (server == null) return; WizardDialog dialog = new WizardDialog(null, new Wizard() { private HadoopLocationWizard page = new HadoopLocationWizard(server); @Override public void addPages() { super.addPages(); setWindowTitle("Edit Hadoop location..."); addPage(page); } @Override public boolean performFinish() { page.performFinish(); return true; } }); dialog.create(); dialog.setBlockOnOpen(true); dialog.open(); super.run(); }
Example 17
Source File: SaveConfigurationListener.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
@Override public void handleEvent(Event event) { final WizardDialog saveDialog = new WizardDialog(Display.getDefault().getActiveShell(), new SaveConnectorConfigurationWizard(configuration, store, definitionRepositoryStore)); if(saveDialog.open() == Dialog.OK){ dialog.updateButtons() ; } }
Example 18
Source File: JavaScriptVisualizeSelectedDiagramsHandler.java From txtUML with Eclipse Public License 1.0 | 5 votes |
@Override public Object execute(ExecutionEvent event) throws ExecutionException { JavaScriptVisualizeWizard wizard = new JavaScriptVisualizeWizard(); WizardDialog wizardDialog = new WizardDialog(null, wizard); wizardDialog.create(); VisualizeTxtUMLPage page = ((VisualizeTxtUMLPage) wizardDialog.getSelectedPage()); // get selected files ISelection selection = HandlerUtil.getCurrentSelection(event); IStructuredSelection strSelection = (IStructuredSelection) selection; List<ICompilationUnit> selectedCompilationUnits = new ArrayList<>(); Stream.of(strSelection.toArray()).forEach(s -> selectedCompilationUnits .add((ICompilationUnit) ((IAdaptable) s).getAdapter(ICompilationUnit.class))); try { List<IType> types = new ArrayList<>(); for (ICompilationUnit cu : selectedCompilationUnits) { types.addAll(Arrays.asList(cu.getTypes())); } page.selectElementsInDiagramTree(types.toArray(), false); page.setExpandedLayouts(types); } catch (JavaModelException ex) { } wizardDialog.open(); return null; }
Example 19
Source File: PublishLibraryNavigatorAction.java From birt with Eclipse Public License 1.0 | 4 votes |
public void run( IAction action ) { IFile file = getSelectedFile( ); if ( file == null ) { return; } String url = file.getLocation( ).toOSString( ); ModuleHandle handle = null; try { handle = SessionHandleAdapter.getInstance( ) .getSessionHandle( ) .openLibrary( url ); if ( handle == null ) { action.setEnabled( false ); return; } String filePath = handle.getFileName( ); String fileName = null; if ( filePath != null && filePath.length( ) != 0 ) { fileName = filePath.substring( filePath.lastIndexOf( File.separator ) + 1 ); } PublishLibraryWizard publishLibrary = new PublishLibraryWizard( (LibraryHandle) handle, fileName, ReportPlugin.getDefault( ).getResourceFolder( ) ); WizardDialog dialog = new BaseWizardDialog( UIUtil.getDefaultShell( ), publishLibrary ); dialog.setPageSize( 500, 250 ); dialog.open( ); } catch ( Exception e ) { ExceptionUtil.handle( e ); return; } finally { if ( handle != null ) { handle.close( ); } } }
Example 20
Source File: TextFileInputDialog.java From pentaho-kettle with Apache License 2.0 | 4 votes |
private void getFixed() { TextFileInputMeta info = new TextFileInputMeta(); getInfo( info, true ); Shell sh = new Shell( shell, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN ); try { List<String> rows = getFirst( 50, false ); fields = getFields( info, rows ); final TextFileImportWizardPage1 page1 = new TextFileImportWizardPage1( "1", props, rows, fields ); page1.createControl( sh ); final TextFileImportWizardPage2 page2 = new TextFileImportWizardPage2( "2", props, rows, fields ); page2.createControl( sh ); Wizard wizard = new Wizard() { public boolean performFinish() { wFields.clearAll( false ); for ( TextFileInputFieldInterface field1 : fields ) { BaseFileField field = (BaseFileField) field1; if ( !field.isIgnored() && field.getLength() > 0 ) { TableItem item = new TableItem( wFields.table, SWT.NONE ); item.setText( 1, field.getName() ); item.setText( 2, "" + field.getTypeDesc() ); item.setText( 3, "" + field.getFormat() ); item.setText( 4, "" + field.getPosition() ); item.setText( 5, field.getLength() < 0 ? "" : "" + field.getLength() ); item.setText( 6, field.getPrecision() < 0 ? "" : "" + field.getPrecision() ); item.setText( 7, "" + field.getCurrencySymbol() ); item.setText( 8, "" + field.getDecimalSymbol() ); item.setText( 9, "" + field.getGroupSymbol() ); item.setText( 10, "" + field.getNullString() ); item.setText( 11, "" + field.getIfNullValue() ); item.setText( 12, "" + field.getTrimTypeDesc() ); item.setText( 13, field.isRepeated() ? BaseMessages.getString( PKG, "System.Combo.Yes" ) : BaseMessages .getString( PKG, "System.Combo.No" ) ); } } int size = wFields.table.getItemCount(); if ( size == 0 ) { new TableItem( wFields.table, SWT.NONE ); } wFields.removeEmptyRows(); wFields.setRowNums(); wFields.optWidth( true ); input.setChanged(); return true; } }; wizard.addPage( page1 ); wizard.addPage( page2 ); WizardDialog wd = new WizardDialog( shell, wizard ); WizardDialog.setDefaultImage( GUIResource.getInstance().getImageWizard() ); wd.setMinimumPageSize( 700, 375 ); wd.updateSize(); wd.open(); } catch ( Exception e ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "TextFileInputDialog.ErrorShowingFixedWizard.DialogTitle" ), BaseMessages.getString( PKG, "TextFileInputDialog.ErrorShowingFixedWizard.DialogMessage" ), e ); } }