本文整理汇总了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");
}