public class ExtendedDiagnosticDialog
extends org.eclipse.jface.dialogs.IconAndMessageDialog
imageLabel, message, messageLabelblockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS| Constructor and Description |
|---|
ExtendedDiagnosticDialog(org.eclipse.swt.widgets.Shell parentShell,
java.lang.String dialogTitle,
java.lang.String message,
java.util.List<org.eclipse.emf.common.util.Diagnostic> diagnostics,
int severityMask)
Creates an diagnostic dialog.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
buttonPressed(int id)
Handles the pressing of the OK or Details button in this dialog.
|
boolean |
close() |
protected void |
configureShell(org.eclipse.swt.widgets.Shell shell) |
protected void |
createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent) |
protected void |
createDetailsButton(org.eclipse.swt.widgets.Composite parent)
Create the details button if it should be included.
|
protected void |
createDialogAndButtonArea(org.eclipse.swt.widgets.Composite parent) |
protected org.eclipse.swt.widgets.Control |
createDialogArea(org.eclipse.swt.widgets.Composite parent)
This implementation of the
Dialog framework method creates and lays out a composite. |
protected ExtendedDiagnosticComposite |
createExtendedDiagnosticComposite(org.eclipse.swt.widgets.Composite parent)
Create the diagnostic composite.
|
protected org.eclipse.swt.graphics.Image |
getImage() |
ExtendedDiagnosticComposite.TextProvider |
getTextProvider() |
int |
open()
Extends
Window.open(). |
static int |
open(org.eclipse.swt.widgets.Shell parent,
java.lang.String dialogTitle,
java.lang.String message,
java.util.List<org.eclipse.emf.common.util.Diagnostic> diagnostics)
Opens a diagnostic dialog to display the given diagnostic.
|
static int |
open(org.eclipse.swt.widgets.Shell parentShell,
java.lang.String title,
java.lang.String message,
java.util.List<org.eclipse.emf.common.util.Diagnostic> diagnostics,
int displayMask)
Opens an diagnostic dialog to display the given diagnostic.
|
static int |
openProblem(org.eclipse.swt.widgets.Shell parent,
java.lang.String dialogTitle,
java.lang.String message,
java.util.List<org.eclipse.emf.common.util.Diagnostic> diagnostics)
Opens a diagnostic dialog to display the given diagnostic.
|
void |
setTextProvider(ExtendedDiagnosticComposite.TextProvider textProvider) |
protected static boolean |
shouldDisplay(java.util.List<org.eclipse.emf.common.util.Diagnostic> diagnostics,
int mask)
Returns whether the given diagnostic object should be displayed.
|
protected boolean |
shouldShowDetailsButton()
Return whether the Details button should be included.
|
createButtonBar, createContents, createMessageArea, getErrorImage, getInfoImage, getMessageLabelStyle, getQuestionImage, getWarningImageapplyDialogFont, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenTextcanHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManagerpublic ExtendedDiagnosticDialog(org.eclipse.swt.widgets.Shell parentShell,
java.lang.String dialogTitle,
java.lang.String message,
java.util.List<org.eclipse.emf.common.util.Diagnostic> diagnostics,
int severityMask)
Normally one should use open to create and open one of these. This constructor is useful only if the
diagnostic object being displayed contains child items
parentShell - the shell under which to create this dialogdialogTitle - the title to use for this dialog, or null to indicate that the default title should be
usedmessage - the message to show in this dialog, or null to indicate that the diagnostic's message
should be shown as the primary messagediagnostic - the diagnostic to show to the userseverityMask - the mask to use to filter the displaying of child items, as per
ExtendedDiagnosticComposite.severityMatches(List, int) ExtendedDiagnosticComposite#severityMatches(List, int) public static int open(org.eclipse.swt.widgets.Shell parent,
java.lang.String dialogTitle,
java.lang.String message,
java.util.List<org.eclipse.emf.common.util.Diagnostic> diagnostics)
parent - the parent shell of the dialog, or null if nonedialogTitle - the title to use for this dialog, or null to indicate that the default title should be
usedmessage - the message to show in this dialog, or null to indicate that the diagnostic's message
should be shown as the primary messagediagnostic - the diagnostic to show to the userDialog.OK if the OK button was pressed, or Dialog.CANCEL if this dialog's close
window decoration or the ESC key was used.public static int openProblem(org.eclipse.swt.widgets.Shell parent,
java.lang.String dialogTitle,
java.lang.String message,
java.util.List<org.eclipse.emf.common.util.Diagnostic> diagnostics)
parent - the parent shell of the dialog, or null if nonedialogTitle - the title to use for this dialog, or null to indicate that the default title should be
usedmessage - the message to show in this dialog, or null to indicate that the diagnostic's message
should be shown as the primary messagediagnostic - the diagnostic to show to the userDialog.OK if the OK button was pressed, or Dialog.CANCEL if this dialog's close
window decoration or the ESC key was used.public static int open(org.eclipse.swt.widgets.Shell parentShell,
java.lang.String title,
java.lang.String message,
java.util.List<org.eclipse.emf.common.util.Diagnostic> diagnostics,
int displayMask)
parentShell - the parent shell of the dialog, or null if nonetitle - the title to use for this dialog, or null to indicate that the default title should be
usedmessage - the message to show in this dialog, or null to indicate that the diagnostic's message
should be shown as the primary messagediagnostic - the diagnostic to show to the userdisplayMask - the mask to use to filter the displaying of child items, as per
ExtendedDiagnosticComposite.severityMatches(List, int) Dialog.OK if the OK button was pressed, or Dialog.CANCEL if this dialog's close
window decoration or the ESC key was used.ExtendedDiagnosticComposite#severityMatches(List, int) protected static boolean shouldDisplay(java.util.List<org.eclipse.emf.common.util.Diagnostic> diagnostics,
int mask)
diagnostic - a diagnostic objectmask - a mask as per ExtendedDiagnosticComposite.severityMatches(List, int) true if the given diagnostic should be displayed, and false otherwiseExtendedDiagnosticComposite#severityMatches(List, int) public void setTextProvider(ExtendedDiagnosticComposite.TextProvider textProvider)
public ExtendedDiagnosticComposite.TextProvider getTextProvider()
protected void buttonPressed(int id)
buttonPressed in class org.eclipse.jface.dialogs.Dialogprotected void configureShell(org.eclipse.swt.widgets.Shell shell)
configureShell in class org.eclipse.jface.window.Windowprotected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
createButtonsForButtonBar in class org.eclipse.jface.dialogs.Dialogprotected void createDetailsButton(org.eclipse.swt.widgets.Composite parent)
parent - the parent compositeprotected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
Dialog framework method creates and lays out a composite. Subclasses that
require a different dialog area may either override this method, or call the super implementation
and add controls to the created composite.createDialogArea in class org.eclipse.jface.dialogs.Dialogprotected void createDialogAndButtonArea(org.eclipse.swt.widgets.Composite parent)
createDialogAndButtonArea in class org.eclipse.jface.dialogs.IconAndMessageDialogprotected org.eclipse.swt.graphics.Image getImage()
getImage in class org.eclipse.jface.dialogs.IconAndMessageDialogprotected ExtendedDiagnosticComposite createExtendedDiagnosticComposite(org.eclipse.swt.widgets.Composite parent)
parent - the parent compositepublic int open()
Window.open(). Opens an diagnostic dialog to display the diagnostic. If you specified a mask
to filter the displaying of these children, the diagnostic dialog will only be displayed if there is at least one
child diagnostic matching the mask.open in class org.eclipse.jface.window.Windowpublic boolean close()
close in class org.eclipse.jface.dialogs.Dialogprotected boolean shouldShowDetailsButton()