use of org.eclipse.jface.dialogs.Dialog in project webtools.servertools by eclipse.
the class PreferencesTestCase method testPreferencePage.
public void testPreferencePage() {
Dialog dialog = UITestHelper.getPreferenceDialog("org.eclipse.wst.internet.monitor.preferencePage");
UITestHelper.assertDialog(dialog);
}
use of org.eclipse.jface.dialogs.Dialog in project netxms by netxms.
the class ApplicationActionBarAdvisor method makeActions.
/* (non-Javadoc)
* @see org.eclipse.ui.application.ActionBarAdvisor#makeActions(org.eclipse.ui.IWorkbenchWindow)
*/
@Override
protected void makeActions(final IWorkbenchWindow window) {
contribItemShowView = ContributionItemFactory.VIEWS_SHORTLIST.create(window);
contribItemOpenPerspective = ContributionItemFactory.PERSPECTIVES_SHORTLIST.create(window);
actionExit = ActionFactory.QUIT.create(window);
register(actionExit);
actionAbout = new Action(String.format(Messages.get().ApplicationActionBarAdvisor_AboutActionName, BrandingManager.getInstance().getConsoleProductName())) {
@Override
public void run() {
Dialog dlg = BrandingManager.getInstance().getAboutDialog(window.getShell());
if (dlg != null) {
dlg.open();
} else {
MessageDialogHelper.openInformation(window.getShell(), Messages.get().ApplicationActionBarAdvisor_AboutTitle, String.format(Messages.get().ApplicationActionBarAdvisor_AboutText, NXCommon.VERSION + " (" + BuildNumber.TEXT + ")"));
}
}
};
actionShowPreferences = ActionFactory.PREFERENCES.create(window);
register(actionShowPreferences);
actionCustomizePerspective = ActionFactory.EDIT_ACTION_SETS.create(window);
register(actionCustomizePerspective);
actionSavePerspective = ActionFactory.SAVE_PERSPECTIVE.create(window);
register(actionSavePerspective);
actionResetPerspective = ActionFactory.RESET_PERSPECTIVE.create(window);
register(actionResetPerspective);
actionClosePerspective = ActionFactory.CLOSE_PERSPECTIVE.create(window);
register(actionClosePerspective);
actionCloseAllPerspectives = ActionFactory.CLOSE_ALL_PERSPECTIVES.create(window);
register(actionCloseAllPerspectives);
actionMinimize = ActionFactory.MINIMIZE.create(window);
register(actionMinimize);
actionMaximize = ActionFactory.MAXIMIZE.create(window);
register(actionMaximize);
actionClose = new CommandAction(window, IWorkbenchCommandConstants.WINDOW_CLOSE_PART);
register(actionClose);
actionPrevView = ActionFactory.PREVIOUS_PART.create(window);
register(actionPrevView);
actionNextView = ActionFactory.NEXT_PART.create(window);
register(actionNextView);
actionShowViewMenu = ActionFactory.SHOW_VIEW_MENU.create(window);
register(actionShowViewMenu);
actionOpenProgressView = new Action() {
@Override
public void run() {
IWorkbench wb = PlatformUI.getWorkbench();
if (wb != null) {
IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
if (win != null) {
IWorkbenchPage page = win.getActivePage();
if (page != null) {
try {
// $NON-NLS-1$
page.showView("org.eclipse.ui.views.ProgressView");
} catch (PartInitException e) {
e.printStackTrace();
}
}
}
}
}
};
actionOpenProgressView.setText(Messages.get().ApplicationActionBarAdvisor_Progress);
// $NON-NLS-1$
actionOpenProgressView.setImageDescriptor(Activator.getImageDescriptor("icons/pview.gif"));
}
use of org.eclipse.jface.dialogs.Dialog in project netxms by netxms.
the class General method selectParameter.
/**
* Select parameter
*/
private void selectParameter() {
Dialog dlg;
switch(origin.getSelectionIndex()) {
case DataCollectionItem.INTERNAL:
if (sourceNode.getObjectId() != 0)
dlg = new SelectInternalParamDlg(getShell(), sourceNode.getObjectId());
else
dlg = new SelectInternalParamDlg(getShell(), dci.getNodeId());
break;
case DataCollectionItem.AGENT:
case DataCollectionItem.DEVICE_DRIVER:
if (sourceNode.getObjectId() != 0)
dlg = new SelectAgentParamDlg(getShell(), sourceNode.getObjectId(), origin.getSelectionIndex(), false);
else
dlg = new SelectAgentParamDlg(getShell(), dci.getNodeId(), origin.getSelectionIndex(), false);
break;
case DataCollectionItem.SNMP:
case DataCollectionItem.CHECKPOINT_SNMP:
SnmpObjectId oid;
try {
oid = SnmpObjectId.parseSnmpObjectId(parameter.getText());
} catch (SnmpObjectIdFormatException e) {
oid = null;
}
if (sourceNode.getObjectId() != 0)
dlg = new SelectSnmpParamDlg(getShell(), oid, sourceNode.getObjectId());
else
dlg = new SelectSnmpParamDlg(getShell(), oid, dci.getNodeId());
break;
case DataCollectionItem.WINPERF:
if (sourceNode.getObjectId() != 0)
dlg = new WinPerfCounterSelectionDialog(getShell(), sourceNode.getObjectId());
else
dlg = new WinPerfCounterSelectionDialog(getShell(), dci.getNodeId());
break;
case DataCollectionItem.SCRIPT:
dlg = new SelectParameterScriptDialog(getShell());
break;
default:
dlg = null;
break;
}
if ((dlg != null) && (dlg.open() == Window.OK)) {
IParameterSelectionDialog pd = (IParameterSelectionDialog) dlg;
description.setText(pd.getParameterDescription());
parameter.setText(pd.getParameterName());
dataType.select(getDataTypePosition(pd.getParameterDataType()));
editor.fireOnSelectItemListeners(origin.getSelectionIndex(), pd.getParameterName(), pd.getParameterDescription(), pd.getParameterDataType());
}
}
use of org.eclipse.jface.dialogs.Dialog in project tdq-studio-se by Talend.
the class About method run.
public void run(IAction action) {
Dialog dialog = new AboutDlg(_shell);
dialog.open();
}
use of org.eclipse.jface.dialogs.Dialog in project abstools by abstools.
the class DebugActionDelegate method run.
@Override
public void run(IAction action) {
if (action == saveHistory) {
FileDialog historyDialog = new FileDialog(Display.getCurrent().getActiveShell(), SWT.SAVE);
String pathString = historyDialog.open();
if (pathString != null) {
File path = new File(pathString);
DebugUtils.getSchedulerRef().saveHistory(path);
}
} else if (action == executeSingleStep) {
DebugUtils.getSchedulerRef().doSingleStep();
} else if (action == executeNSteps) {
Dialog stepDialog = new StepNumberDialog(Display.getCurrent().getActiveShell());
stepDialog.open();
} else if (action == stepOver) {
DebugUtils.getSchedulerRef().doStepOver();
} else if (action == runToLine) {
Dialog lineDialog = new LineNumberDialog(Display.getCurrent().getActiveShell());
lineDialog.open();
} else if (action == resume) {
DebugUtils.getSchedulerRef().resumeAutomaticScheduling();
} else if (action == terminate) {
DebugUtils.getDebugger().shutdown();
}
}
Aggregations