@Override public void widgetSelected(SelectionEvent e) { TreeItem item = history.backward(); if (!item.isDisposed()) { tree.setSelection(item); treeItemSelected(false); if (!history.canBackward()) btnBackward.setEnabled(false); btnForward.setEnabled(true); } else { MessageDialog.openInformation(shell, i18nFile.getText(I18nFile.ERROR), i18nFile.getText(I18nFile.OBJECTDELETE)); } } });
@Override public void widgetSelected(SelectionEvent e) { TreeItem item = history.forward(); btnBackward.setEnabled(true); if (!item.isDisposed()) { tree.setSelection(item); treeItemSelected(false); if (!history.canForward()) btnForward.setEnabled(false); } else { MessageDialog.openInformation(shell, i18nFile.getText(I18nFile.ERROR), i18nFile.getText(I18nFile.OBJECTDELETE)); } } });
MessageDialog.openInformation(shell, i18nFile.getText(I18nFile.INFORMATION), i18nFile.getText(I18nFile.NEWKEYFOUND)
@Override public void widgetSelected(SelectionEvent e) { InputDialog inputDialog = new InputDialog(shell.getParent().getShell(), RedisClient.i18nFile.getText(I18nFile.INPUTVALUES), RedisClient.i18nFile.getText(I18nFile.LISTINPUTFORMAT), "", null); if (inputDialog.open() == InputDialog.OK) { String values = inputDialog.getValue(); String[] setValues = values.split(";"); long size = service.addValues(id, db, key, setValues); if(size == 0) MessageDialog.openInformation(shell.getParent().getShell(), RedisClient.i18nFile.getText(I18nFile.INPUTVALUES), RedisClient.i18nFile.getText(I18nFile.ADDSETVALUES)); refresh(); } } });
info.getSearchNodeType(), info.getPattern()); } else { MessageDialog.openInformation(shell, i18nFile.getText(I18nFile.FINDRESULTS), i18nFile.getText(I18nFile.NOFOUND));
MessageDialog.openInformation(shell, i18nFile.getText(I18nFile.FINDRESULTS), i18nFile.getText(I18nFile.NOFOUND));
MessageDialog.openInformation(shell, i18nFile.getText(I18nFile.FINDRESULTS), i18nFile.getText(I18nFile.NOFOUND));
properties = getLocation(cinfo) + " " + i18nFile.getText(I18nFile.CONTAINERPROPERTIES); MessageDialog.openInformation(shell, properties, str);
/** * Creates a simple info dialog. * * @param message * The message of the dialog. * @param code * The code of the error. <b>-1</b> is a marker that the code has to be added later. */ public void createInfoDialog(String message, int code) { MessageDialog.openInformation(null, "Information", message); }
public static boolean isProcessable(Shell shell, IJavaElement element) { if (element == null) return true; if (isOnBuildPath(element)) return true; MessageDialog.openInformation(shell, ActionMessages.ActionUtil_notOnBuildPath_title, ActionMessages.ActionUtil_notOnBuildPath_message); return false; }
@Override public void run() { if (isError) { MessageDialog.openError(shell, getTitle(), message); } else { MessageDialog.openInformation(shell, getTitle(), message); } } });
private boolean canRunOn(IField[] fields) throws JavaModelException { if (fields == null || fields.length == 0) return false; int count= 0; for (int index= 0; index < fields.length; index++) { if (!JdtFlags.isEnum(fields[index])) count++; } if (count == 0) MessageDialog.openInformation(getShell(), DIALOG_TITLE, ActionMessages.AddGetterSetterAction_not_applicable); return (count > 0); }
private boolean canRunOn(IField[] fields) throws JavaModelException { if (fields == null || fields.length == 0) return false; int count= 0; for (int index= 0; index < fields.length; index++) { if (!JdtFlags.isEnum(fields[index]) && !hasPrimitiveType(fields[index]) || isArray(fields[index])) count++; } if (count == 0) MessageDialog.openInformation(getShell(), DIALOG_TITLE, ActionMessages.AddDelegateMethodsAction_not_applicable); return (count > 0); }
@Override public void run(ITextSelection selection) { if (!ActionUtil.isProcessable(fEditor)) return; IJavaElement element= elementAtOffset(); if (element == null || !(element instanceof IMethod)) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.OpenSuperImplementationAction_not_applicable); return; } run((IMethod) element); }
@Override public void run(ITextSelection selection) { if (!ActionUtil.isEditable(fEditor)) return; if (canRunInEditor() && !isVarTypeSelection(selection)) doRun(); else MessageDialog.openInformation(getShell(), RefactoringMessages.RenameAction_rename, RefactoringMessages.RenameAction_unavailable); }
public void run(IStructuredSelection selection) { ICompilationUnit[] cus= getCompilationUnits(selection); if (cus.length == 0) { MessageDialog.openInformation(getShell(), getActionName(), ActionMessages.CleanUpAction_EmptySelection_description); } else if (cus.length == 1) { run(cus[0]); } else { runOnMultiple(cus); } }
public void run(ITextSelection selection) { if (!ActionUtil.isProcessable(fEditor)) return; IJavaElement element= elementAtOffset(); if (element == null || !(element instanceof IMethod)) { MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.OpenSuperImplementationAction_not_applicable); return; } run((IMethod) element); }
private void showResults() { if (noStrings()) MessageDialog.openInformation(getShell(), ActionMessages.ExternalizeStringsAction_dialog_title, ActionMessages.FindStringsToExternalizeAction_noStrings); else new NonNLSListDialog(getShell(), fElements, countStrings()).open(); }
private void showResults() { if (noStrings()) MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.FindStringsToExternalizeAction_noStrings); else new NonNLSListDialog(getShell(), fElements, countStrings()).open(); }
@Override public void run(ITextSelection selection) { ICompilationUnit compilationUnit= SelectionConverter.getInputAsCompilationUnit(fEditor); IJavaProject javaProject= compilationUnit.getJavaProject(); if (!JavaModelUtil.is17OrHigher(javaProject)) { String message= Messages.format(RefactoringMessages.SurroundWithTryMultiCatchAction_not17, BasicElementLabels.getJavaElementName(javaProject.getElementName())); MessageDialog.openInformation(JavaPlugin.getActiveWorkbenchShell(), getDialogTitle(), message); return; } super.run(selection); }