List of usage examples for org.eclipse.jface.dialogs Dialog open
public int open()
From source file:com.aptana.ide.ui.io.actions.ConnectionPropertiesAction.java
License:Open Source License
public void run(IAction action) { if (connectionPoint == null) { return;//w w w . ja v a 2s . co m } try { Dialog dlg = PropertyDialogsRegistry.getInstance().createPropertyDialog(connectionPoint, targetPart.getSite()); if (dlg != null) { if (dlg instanceof IPropertyDialog) { ((IPropertyDialog) dlg).setPropertySource(connectionPoint); } dlg.open(); } } catch (CoreException e) { UIUtils.showErrorMessage(Messages.ConnectionPropertiesAction_FailedToCreate, e); } }
From source file:com.aptana.ide.ui.io.navigator.actions.LocalShortcutsDoubleClickAction.java
License:Open Source License
public void run() { if (selectionHasChildren()) { super.run(); } else {//from w w w . j a v a 2s . c om // no connection point has been defined; opens the new local shortcut dialog Dialog dialog = new LocalConnectionPropertyDialog(fShell); dialog.open(); } }
From source file:com.aptana.ide.ui.io.navigator.actions.ProjectShortcutsDoubleClickAction.java
License:Open Source License
public void run() { if (selectionHasChildren()) { super.run(); } else {/*from w w w .ja va 2 s.c o m*/ // no connection point has been defined; opens the new local // shortcut dialog Dialog dialog = new WorkspaceConnectionPropertyDialog(fShell); dialog.open(); } }
From source file:com.aptana.preview.ui.properties.PreviewSettingComposite.java
License:Open Source License
private boolean editServerConfiguration(IServer serverConfiguration) { try {//from w w w.j av a2 s .c om Dialog dialog = PropertyDialogsRegistry.getInstance().createPropertyDialog(serverConfiguration, new SameShellProvider(getShell())); if (dialog != null) { if (dialog instanceof IPropertyDialog) { ((IPropertyDialog) dialog).setPropertySource(serverConfiguration); } return dialog.open() == Window.OK; } } catch (CoreException e) { UIUtils.showErrorMessage(Messages.ProjectPreviewPropertyPage_ERR_FailToOpenServerDialog, e); } return false; }
From source file:com.aptana.ui.ftp.actions.NewFTPConnectionAction.java
License:Open Source License
public void run(IAction action) { Dialog dlg = new FTPPropertyDialogProvider().createPropertyDialog(targetPart.getSite()); if (dlg instanceof IPropertyDialog) { String typeId;/*from w w w .j a va 2 s .c o m*/ if (action == null) { typeId = DEFAULT_TYPE; } else { typeId = action.getId(); int index = typeId.lastIndexOf('.'); if (index >= 0 && index + 1 < typeId.length()) { typeId = typeId.substring(index + 1); } } ((IPropertyDialog) dlg).setPropertySource(CoreIOPlugin.getConnectionPointManager().getType(typeId)); } dlg.open(); }
From source file:com.aptana.ui.s3.actions.NewS3ConnectionAction.java
License:Open Source License
public void run(IAction action) { Dialog dlg = new S3PropertyDialogProvider().createPropertyDialog(targetPart.getSite()); if (dlg instanceof IPropertyDialog) { String typeId;// w w w . ja v a2 s. c om if (action == null) { typeId = DEFAULT_TYPE; } else { typeId = action.getId(); int index = typeId.lastIndexOf('.'); if (index >= 0 && index + 1 < typeId.length()) { typeId = typeId.substring(index + 1); } } ((IPropertyDialog) dlg).setPropertySource(CoreIOPlugin.getConnectionPointManager().getType(typeId)); } dlg.open(); }
From source file:com.aptana.webserver.ui.internal.actions.EditServerHandler.java
License:Open Source License
static boolean editServerConfiguration(IServer server) { try {/* w w w. j a v a 2 s. com*/ Dialog dlg = PropertyDialogsRegistry.getInstance().createPropertyDialog(server, new SameShellProvider(UIUtils.getActiveShell())); if (dlg != null) { if (dlg instanceof IPropertyDialog) { ((IPropertyDialog) dlg).setPropertySource(server); } return dlg.open() == Window.OK; } } catch (CoreException e) { UIUtils.showErrorMessage("Failed to open server preferences dialog", e); //$NON-NLS-1$ } return false; }
From source file:com.aptana.webserver.ui.preferences.ServersPreferencePage.java
License:Open Source License
private boolean editServerConfiguration(IServer serverConfiguration) { try {// w w w . java 2s . c om Dialog dlg = PropertyDialogsRegistry.getInstance().createPropertyDialog(serverConfiguration, new SameShellProvider(getShell())); if (dlg != null) { if (dlg instanceof IPropertyDialog) { ((IPropertyDialog) dlg).setPropertySource(serverConfiguration); } return dlg.open() == Window.OK; } } catch (CoreException e) { UIUtils.showErrorMessage("Failed to open server preferences dialog", e); //$NON-NLS-1$ } return false; }
From source file:com.arc.embeddedcdt.gui.ARCCDebuggerTab.java
License:Open Source License
protected void createOptionsComposite(Composite parent) { Composite optionsComp = new Composite(parent, SWT.NONE); int numberOfColumns = (fAttachMode) ? 1 : 3; GridLayout layout = new GridLayout(numberOfColumns, false); optionsComp.setLayout(layout);//w w w . j a v a 2 s . c om optionsComp.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, true, false, 1, 1)); if (fAttachMode == false) { fStopInMain = createCheckButton(optionsComp, LaunchMessages.CDebuggerTab_Stop_at_main_on_startup); fStopInMain.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { fStopInMainSymbol.setEnabled(fStopInMain.getSelection()); update(); } }); fStopInMainSymbol = new Text(optionsComp, SWT.SINGLE | SWT.BORDER); final GridData gridData = new GridData(GridData.FILL, GridData.CENTER, false, false); gridData.widthHint = 100; fStopInMainSymbol.setLayoutData(gridData); fStopInMainSymbol.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent evt) { update(); } }); fStopInMainSymbol.getAccessible().addAccessibleListener(new AccessibleAdapter() { @Override public void getName(AccessibleEvent e) { e.result = LaunchMessages.CDebuggerTab_Stop_at_main_on_startup; } }); } fAdvancedButton = createPushButton(optionsComp, LaunchMessages.CDebuggerTab_Advanced, null); ((GridData) fAdvancedButton.getLayoutData()).horizontalAlignment = GridData.END; fAdvancedButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { Dialog dialog = new AdvancedDebuggerOptionsDialog(getShell()); dialog.open(); } }); }
From source file:com.architexa.org.eclipse.gef.ui.palette.SettingsAction.java
License:Open Source License
/** * Opens the Settings dialog/*from w ww . j av a 2 s.co m*/ * * @see org.eclipse.jface.action.Action#run() */ public void run() { Dialog settings = new PaletteSettingsDialog(paletteViewer.getControl().getShell(), paletteViewer.getPaletteViewerPreferences()); settings.open(); }