List of usage examples for org.eclipse.jface.dialogs IMessageProvider INFORMATION
int INFORMATION
To view the source code for org.eclipse.jface.dialogs IMessageProvider INFORMATION.
Click Source Link
From source file:org.eclipse.mat.ui.internal.query.arguments.ArgumentsWizardPage.java
License:Open Source License
public void onFocus(String message) { if (getErrorMessage() != null) setMessage(getErrorMessage(), IMessageProvider.ERROR); else if (message != null) setMessage(message, IMessageProvider.INFORMATION); else//from w w w .ja v a 2 s. co m setMessage(argumentSet.getQueryDescriptor().getShortDescription()); if (getContainer() != null) getContainer().updateButtons(); }
From source file:org.eclipse.mylyn.commons.repositories.ui.RepositoryLocationPart.java
License:Open Source License
protected void applyValidatorResult(RepositoryValidator validator) { IStatus status = validator.getResult(); String message = status.getMessage(); if (message == null || message.length() == 0) { message = null;/* w ww . j ava2s.c om*/ } switch (status.getSeverity()) { case IStatus.OK: if (status == Status.OK_STATUS) { // if (getUserName().length() > 0) { // message = "Credentials are valid."; // } else { message = Messages.RepositoryLocationPart_Repository_is_valid; // } } getPartContainer().setMessage(message, IMessageProvider.INFORMATION); break; case IStatus.INFO: getPartContainer().setMessage(message, IMessageProvider.INFORMATION); break; case IStatus.WARNING: getPartContainer().setMessage(message, IMessageProvider.WARNING); break; default: getPartContainer().setMessage(message, IMessageProvider.ERROR); break; } }
From source file:org.eclipse.mylyn.commons.ui.CommonUiUtil.java
License:Open Source License
public static void setMessage(DialogPage page, IStatus status) { String message = status.getMessage(); switch (status.getSeverity()) { case IStatus.OK: page.setMessage(null, IMessageProvider.NONE); break;/*from ww w .j a v a2 s .co m*/ case IStatus.INFO: page.setMessage(message, IMessageProvider.INFORMATION); break; case IStatus.WARNING: page.setMessage(message, IMessageProvider.WARNING); break; default: page.setMessage(message, IMessageProvider.ERROR); break; } }
From source file:org.eclipse.mylyn.internal.bugzilla.ui.editor.BugzillaTaskEditorPage.java
License:Open Source License
@Override protected void createParts() { attributeEditorMap.clear(); super.createParts(); checkCanSubmit(IMessageProvider.INFORMATION); }
From source file:org.eclipse.mylyn.internal.bugzilla.ui.editor.BugzillaTaskEditorPage.java
License:Open Source License
@Override protected void handleTaskSubmitted(SubmitJobEvent event) { if (event.getJob().getStatus() != null) { switch (event.getJob().getStatus().getCode()) { case BugzillaStatus.ERROR_CONFIRM_MATCH: case BugzillaStatus.ERROR_MATCH_FAILED: showError((BugzillaStatus) event.getJob().getStatus()); return; }/*from ww w .j av a 2 s .com*/ } if (event.getJob().getResponse() != null && event.getJob().getResponse() instanceof BugzillaRepositoryResponse) { final RepositoryResponse response = event.getJob().getResponse(); if (response instanceof BugzillaRepositoryResponse) { final BugzillaRepositoryResponse bugzillaResponse = (BugzillaRepositoryResponse) response; if (bugzillaResponse.getResponseData().size() > 0) { getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Changes_Submitted_Message, IMessageProvider.INFORMATION, new HyperlinkAdapter() { @Override public void linkActivated(HyperlinkEvent event) { showSubmitResponse(bugzillaResponse); } }); } else { getTaskEditor().setMessage(Messages.BugzillaTaskEditorPage_Changes_Submitted_Message, IMessageProvider.INFORMATION); } } } else { super.handleTaskSubmitted(event); } }
From source file:org.eclipse.mylyn.internal.bugzilla.ui.editor.BugzillaTaskEditorPage.java
License:Open Source License
@Override public void refresh() { super.refresh(); checkCanSubmit(IMessageProvider.INFORMATION); }
From source file:org.eclipse.mylyn.internal.bugzilla.ui.wizard.BugzillaProductPage.java
License:Open Source License
/** * Applies the status to the status line of a dialog page. * // w w w . j a v a2s .co m * @param status * The status to apply to the status line */ protected void applyToStatusLine(IStatus status) { String message = status.getMessage(); if (message.length() == 0) { message = null; } switch (status.getSeverity()) { case IStatus.OK: setErrorMessage(null); setMessage(message); break; case IStatus.WARNING: setErrorMessage(null); setMessage(message, IMessageProvider.WARNING); break; case IStatus.INFO: setErrorMessage(null); setMessage(message, IMessageProvider.INFORMATION); break; default: setErrorMessage(null); setMessage(message, IMessageProvider.ERROR); break; } }
From source file:org.eclipse.mylyn.internal.gerrit.ui.GerritRepositorySettingsPage.java
License:Open Source License
@Override protected void applyValidatorResult(Validator validator) { super.applyValidatorResult(validator); if (validator.getStatus() != null && validator.getStatus().isOK()) { GerritValidator gerritValidator = (GerritValidator) validator; setMessage(NLS.bind("{0} Logged in as {1}.", getMessage(), gerritValidator.getInfo().getFullName()), IMessageProvider.INFORMATION); }//from w w w . jav a 2 s . c o m }
From source file:org.eclipse.mylyn.internal.github.ui.issue.IssueTaskEditorPage.java
License:Open Source License
@Override protected void createParts() { super.createParts(); checkCanSubmit(IMessageProvider.INFORMATION); }
From source file:org.eclipse.mylyn.internal.tasks.ui.deprecated.AbstractRepositoryTaskEditor.java
License:Open Source License
@Override protected void createFormContent(final IManagedForm managedForm) { IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager(); colorIncoming = themeManager.getCurrentTheme().getColorRegistry() .get(CommonThemes.COLOR_INCOMING_BACKGROUND); super.createFormContent(managedForm); form = managedForm.getForm();// ww w .ja v a 2 s . c o m form.setRedraw(false); try { refreshEnabled = false; toolkit = managedForm.getToolkit(); registerDropListener(form); editorComposite = form.getBody(); GridLayout editorLayout = new GridLayout(); editorComposite.setLayout(editorLayout); editorComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); if (taskData != null) { createSections(); } AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(repository.getConnectorKind()); if (connectorUi == null) { parentEditor.setMessage("The editor may not be fully loaded", IMessageProvider.INFORMATION, new HyperlinkAdapter() { @Override public void linkActivated(HyperlinkEvent e) { refreshEditor(); } }); } updateHeaderControls(); if (summaryTextViewer != null) { summaryTextViewer.getTextWidget().setFocus(); } form.setRedraw(true); } finally { refreshEnabled = true; } form.reflow(true); }