本文整理匯總了Java中org.eclipse.jface.dialogs.MessageDialog.ERROR屬性的典型用法代碼示例。如果您正苦於以下問題:Java MessageDialog.ERROR屬性的具體用法?Java MessageDialog.ERROR怎麽用?Java MessageDialog.ERROR使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.eclipse.jface.dialogs.MessageDialog
的用法示例。
在下文中一共展示了MessageDialog.ERROR屬性的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: launch
private void launch(Object[] elements, String mode) {
try {
IJavaElement[] ijes = null;
List<IJavaElement> jes = new ArrayList<IJavaElement>();
for (int i = 0; i < elements.length; i++) {
Object selected= elements[i];
if (selected instanceof IJavaElement) {
IJavaElement element= (IJavaElement) selected;
switch (element.getElementType()) {
case IJavaElement.COMPILATION_UNIT:
jes.add(element);
break;
}
}
}
ijes = new IJavaElement[jes.size()];
jes.toArray(ijes);
ILaunchConfigurationWorkingCopy wc = buildLaunchConfiguration(ijes);
if (wc==null) return;
ILaunchConfiguration config= findExistingORCreateLaunchConfiguration(wc, mode);
DebugUITools.launch(config, mode);
} catch (Exception e) {
ResourceManager.logException(e);
MessageDialog dialog = new MessageDialog(Display.getCurrent().getActiveShell(), "GW4E Launcher", (Image)null, "Unable to launch. See error in Error view.", MessageDialog.ERROR, new String[] { "Close" }, 0);
dialog.open();
}
}
示例2: buildLaunchConfiguration
protected ILaunchConfigurationWorkingCopy buildLaunchConfiguration(IJavaElement[] elements) throws CoreException {
IJavaElement mainElement = null;
for (int i = 0; i < elements.length; i++) {
IJavaElement element = elements [i];
if (JDTManager.hasStartableGraphWalkerAnnotation(element)) {
mainElement = element;
break;
}
}
if (mainElement==null) {
MessageDialog dialog = new MessageDialog(Display.getCurrent().getActiveShell(), "GW4E Launcher", (Image)null, MessageUtil.getString("nostartvalueinannotation"), MessageDialog.ERROR, new String[] { "Close" }, 0);
dialog.open();
return null;
}
ILaunchConfigurationType configType= DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType(GW4ELAUNCHCONFIGURATIONTYPE);
ILaunchConfigurationWorkingCopy wc= configType.newInstance(null, DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(mainElement.getElementName()));
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, elements[0].getJavaProject().getElementName());
String mainElementName = elementToJavaClassName (mainElement);
StringBuffer sb = new StringBuffer (mainElementName).append(";");
String[] classnames = elementToJavaClassName(elements);
for (int i = 0; i < classnames.length; i++) {
if (classnames[i].equals(mainElementName)) continue;
sb.append(classnames[i]).append(";");
}
wc.setAttribute(LaunchingConstant.CONFIG_TEST_CLASSES,sb.toString());
return wc;
}
示例3: displayErrorMessage
/**
* Display an error message in a Dialog
*
* @param message
*/
public static void displayErrorMessage(String title, String message) {
MessageDialog dialog = new MessageDialog(Display.getDefault().getActiveShell(),
title, null, message,
MessageDialog.ERROR, new String[] { MessageUtil.getString("close") }, 0);
int result = dialog.open();
dialog.close();
}
示例4: Message_Dialog
/**
*
* Message dialog to be displayed if compare_fields() method returns false.
*
*/
public int Message_Dialog()
{
MessageDialog dialog = new MessageDialog(Display.getCurrent().getActiveShell(), "Rearrange Fields", null,
Messages.HIVE_PARTI_SEQ_ERROR, MessageDialog.ERROR, new String[] { "Rearrange Schema",
"Rearrange Partition Fields" }, 0);
int result = dialog.open();
return result;
}
示例5: errorDialogOK
public static MessageDialog errorDialogOK(String title, String message) {
return new MessageDialog(getShell(), title, null, message, MessageDialog.ERROR, 0, "Yes", "No");
}
示例6: errorDialogYESNO
public static MessageDialog errorDialogYESNO(String title, String message) {
return new MessageDialog(getShell(), title, null, message, MessageDialog.ERROR, 0, "Yes", "No");
}