Java Code Examples for org.eclipse.jface.dialogs.IMessageProvider#INFORMATION
The following examples show how to use
org.eclipse.jface.dialogs.IMessageProvider#INFORMATION .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbapGitDialogObjLog.java From ADT_Frontend with MIT License | 6 votes |
@Override public void create() { super.create(); setTitle(Messages.AbapGitDialogPageObjLog_title); int dialogMessageIcon = IMessageProvider.INFORMATION; String dialogStatusFlag = this.repodata.getStatus(); if (dialogStatusFlag != null && dialogStatusFlag.equals(WARNING_FLAG)) { dialogMessageIcon = IMessageProvider.WARNING; } if (dialogStatusFlag != null && (dialogStatusFlag.equals(ERROR_FLAG) || dialogStatusFlag.equals("A"))) { //$NON-NLS-1$ dialogMessageIcon = IMessageProvider.ERROR; } if (dialogStatusFlag != null && dialogStatusFlag.equals(SUCCESS_FLAG)) { } setMessage(this.repodata.getStatusText() + "\n " + Messages.AbapGitDialogPageObjLog_description, dialogMessageIcon); //$NON-NLS-1$ }
Example 2
Source File: FieldEditorWrapper.java From google-cloud-eclipse with Apache License 2.0 | 6 votes |
@Override public IStatus getStatus() { // DialogPage has an unfortunately complex set of message possibilities String message = messages.getErrorMessage(); if (message != null) { return new Status(IStatus.ERROR, PLUGIN_ID, message); } int messageType = messages.getMessageType(); switch (messageType) { case IMessageProvider.INFORMATION: return new Status(IStatus.INFO, PLUGIN_ID, messages.getMessage()); case IMessageProvider.WARNING: return new Status(IStatus.WARNING, PLUGIN_ID, messages.getMessage()); case IMessageProvider.ERROR: return new Status(IStatus.ERROR, PLUGIN_ID, messages.getMessage()); default: return Status.OK_STATUS; } }
Example 3
Source File: ExtractConstantWizard.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected void addUserInputPages() { String message= null; int messageType= IMessageProvider.NONE; if(!getExtractConstantRefactoring().selectionAllStaticFinal()) { message= RefactoringMessages.ExtractConstantInputPage_selection_refers_to_nonfinal_fields; messageType= IMessageProvider.INFORMATION; } else { message= MESSAGE; messageType= IMessageProvider.NONE; } String[] guessedNames= getExtractConstantRefactoring().guessConstantNames(); String initialValue= guessedNames.length == 0 ? "" : guessedNames[0]; //$NON-NLS-1$ addPage(new ExtractConstantInputPage(message, messageType, initialValue, guessedNames)); }
Example 4
Source File: StyleBuilder.java From birt with Eclipse Public License 1.0 | 6 votes |
public void setTitleMessage( String newMessage, int newType ) { Image newImage = null; if ( newMessage != null ) { switch ( newType ) { case IMessageProvider.NONE : break; case IMessageProvider.INFORMATION : newImage = JFaceResources.getImage( DLG_IMG_MESSAGE_INFO ); break; case IMessageProvider.WARNING : newImage = JFaceResources.getImage( DLG_IMG_MESSAGE_WARNING ); break; case IMessageProvider.ERROR : newImage = JFaceResources.getImage( DLG_IMG_MESSAGE_ERROR ); break; } } showTitleMessage( newMessage, newImage ); }
Example 5
Source File: StatusWidget.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
private Image imageFor(int type) { switch (type) { case IMessageProvider.NONE: return null; case IMessageProvider.INFORMATION: return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_INFO); case IMessageProvider.WARNING: return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING); case IMessageProvider.ERROR: return JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_ERROR); default: return null; } }
Example 6
Source File: AbstractProjectPropertyPage.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 5 votes |
/** * Converts a standard IStatus's severity into the severity flags used by * dialogs and property pages. */ protected static int convertSeverity(IStatus status) { switch (status.getSeverity()) { case IStatus.ERROR: return IMessageProvider.ERROR; case IStatus.WARNING: return IMessageProvider.WARNING; case IStatus.INFO: return IMessageProvider.INFORMATION; default: return IMessageProvider.NONE; } }
Example 7
Source File: AbstractTitleAreaDialog.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 5 votes |
private static int convertSeverity(IStatus status) { switch (status.getSeverity()) { case IStatus.ERROR: return IMessageProvider.ERROR; case IStatus.WARNING: return IMessageProvider.WARNING; case IStatus.INFO: return IMessageProvider.INFORMATION; default: return IMessageProvider.NONE; } }
Example 8
Source File: GWTCompileDialog.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 5 votes |
private static int convertSeverity(IStatus status) { switch (status.getSeverity()) { case IStatus.ERROR: return IMessageProvider.ERROR; case IStatus.WARNING: return IMessageProvider.WARNING; case IStatus.INFO: return IMessageProvider.INFORMATION; default: return IMessageProvider.NONE; } }
Example 9
Source File: ExtractConstantWizard.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected RefactoringStatus validateTextField(String text) { try { getExtractConstantRefactoring().setConstantName(text); updatePreviewLabel(); RefactoringStatus result= getExtractConstantRefactoring().checkConstantNameOnChange(); if (fOriginalMessageType == IMessageProvider.INFORMATION && result.getSeverity() == RefactoringStatus.OK) return RefactoringStatus.createInfoStatus(fOriginalMessage); else return result; } catch (JavaModelException e) { JavaPlugin.log(e); return RefactoringStatus.createFatalErrorStatus(RefactoringMessages.ExtractConstantInputPage_Internal_Error); } }
Example 10
Source File: DialogPageUtils.java From goclipse with Eclipse Public License 1.0 | 5 votes |
public static int statusLevelToMessageType(StatusLevel statusLevel) { switch (statusLevel) { case OK: return IMessageProvider.NONE; case INFO: return IMessageProvider.INFORMATION; case WARNING: return IMessageProvider.WARNING; case ERROR: return IMessageProvider.ERROR; } throw assertFail(); }
Example 11
Source File: DialogPageUtils.java From goclipse with Eclipse Public License 1.0 | 5 votes |
public static int severityToMessageType(IStatus status) { switch (status.getSeverity()) { case IStatus.ERROR: return IMessageProvider.ERROR; case IStatus.WARNING: return IMessageProvider.WARNING; case IStatus.INFO: return IMessageProvider.INFORMATION; case IStatus.OK: return IMessageProvider.NONE; default: return IMessageProvider.NONE; } }
Example 12
Source File: TSTitleAreaDialog.java From translationstudio8 with GNU General Public License v2.0 | 4 votes |
/** * Sets the message for this dialog with an indication of what type of * message it is. * <p> * The valid message types are one of <code>NONE</code>, * <code>INFORMATION</code>,<code>WARNING</code>, or * <code>ERROR</code>. * </p> * <p> * Note that for backward compatibility, a message of type * <code>ERROR</code> is different than an error message (set using * <code>setErrorMessage</code>). An error message overrides the current * message until the error message is cleared. This method replaces the * current message and does not affect the error message. * </p> * * @param newMessage * the message, or <code>null</code> to clear the message * @param newType * the message type * @since 2.0 */ public void setMessage(String newMessage, int newType) { Image newImage = null; if (newMessage != null) { switch (newType) { case IMessageProvider.NONE: break; case IMessageProvider.INFORMATION: newImage = JFaceResources.getImage(DLG_IMG_MESSAGE_INFO); break; case IMessageProvider.WARNING: newImage = JFaceResources.getImage(DLG_IMG_MESSAGE_WARNING); break; case IMessageProvider.ERROR: newImage = JFaceResources.getImage(DLG_IMG_MESSAGE_ERROR); break; } } showMessage(newMessage, newImage); }
Example 13
Source File: TSTitleAreaDialog.java From tmxeditor8 with GNU General Public License v2.0 | 4 votes |
/** * Sets the message for this dialog with an indication of what type of * message it is. * <p> * The valid message types are one of <code>NONE</code>, * <code>INFORMATION</code>,<code>WARNING</code>, or * <code>ERROR</code>. * </p> * <p> * Note that for backward compatibility, a message of type * <code>ERROR</code> is different than an error message (set using * <code>setErrorMessage</code>). An error message overrides the current * message until the error message is cleared. This method replaces the * current message and does not affect the error message. * </p> * * @param newMessage * the message, or <code>null</code> to clear the message * @param newType * the message type * @since 2.0 */ public void setMessage(String newMessage, int newType) { Image newImage = null; if (newMessage != null) { switch (newType) { case IMessageProvider.NONE: break; case IMessageProvider.INFORMATION: newImage = JFaceResources.getImage(DLG_IMG_MESSAGE_INFO); break; case IMessageProvider.WARNING: newImage = JFaceResources.getImage(DLG_IMG_MESSAGE_WARNING); break; case IMessageProvider.ERROR: newImage = JFaceResources.getImage(DLG_IMG_MESSAGE_ERROR); break; } } showMessage(newMessage, newImage); }
Example 14
Source File: FatJarPackageWizardPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 2 votes |
/** * set message to newMessage with severity WARNING. * overwrite existing message only if it is beyond severity WARNING * @param newMessage the warning to be set */ private void setInfoMessage(String newMessage) { if (getMessage() == null || getMessageType() < IMessageProvider.INFORMATION) setMessage(newMessage, IMessageProvider.INFORMATION); }
Example 15
Source File: FixedFatJarExportPage.java From sarl with Apache License 2.0 | 2 votes |
/** * set message to newMessage with severity WARNING. * overwrite existing message only if it is beyond severity WARNING * @param newMessage the warning to be set */ private void setInfoMessage(String newMessage) { if (getMessage() == null || getMessageType() < IMessageProvider.INFORMATION) setMessage(newMessage, IMessageProvider.INFORMATION); }