Class ErrorComponent
java.lang.Object
com.e1c.langtool.internal.ui.common.tools.ErrorComponent
- All Implemented Interfaces:
IErrorComponent
The realization of error components that allows getting of detailed information
about errors and opening a preference page with setting.
The instances of this class allows getting as short description of an errors
as detailed information about errors in ErrorDialog.
The detail information about error also can include a stack trace of an exception. Also it provides
ability to open related preference page with settings.
- See Also:
-
ErrorDialog
-
Constructor Summary
ConstructorsConstructorDescriptionErrorComponent(String pluginId, String preferencePageId) Creates a new component to show information about errors. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateComponent(org.eclipse.swt.widgets.Composite parent) Creates this control on the parent composite.protected voidcreateDetailButton(org.eclipse.swt.widgets.Composite top) protected voidcreateErrorIcon(org.eclipse.swt.widgets.Composite top) protected voidcreateErrorMessage(org.eclipse.swt.widgets.Composite top) voidhide()Hides a representation of the error if it's shown.booleanChecks if the error visible.static voidsetExclusion(org.eclipse.swt.widgets.Composite composite, boolean state) Setsexcludeattribute of grid data for the given composite.voidShows a representation of the error on this component.
-
Constructor Details
-
ErrorComponent
Creates a new component to show information about errors.- Parameters:
pluginId- the unique identifier of the relevant plug-in forStatus.an- id of preference page that will be opened by click on settings button
-
-
Method Details
-
setExclusion
public static void setExclusion(org.eclipse.swt.widgets.Composite composite, boolean state) Setsexcludeattribute of grid data for the given composite.- Parameters:
composite- a composite withGridDatalayoutDatastate- the exclusion mode- Throws:
ClassCastException- if the given composite's layoutData is notGridData
-
createComponent
public void createComponent(org.eclipse.swt.widgets.Composite parent) Description copied from interface:IErrorComponentCreates this control on the parent composite.- Specified by:
createComponentin interfaceIErrorComponent- Parameters:
parent- parent control
-
showError
Description copied from interface:IErrorComponentShows a representation of the error on this component.- Specified by:
showErrorin interfaceIErrorComponent- Parameters:
msg- a basic localizated error messagedetail- a detailed error information about errorexc- a low-level exception, or null if not applicable
-
hide
public void hide()Description copied from interface:IErrorComponentHides a representation of the error if it's shown.- Specified by:
hidein interfaceIErrorComponent
-
isErrorVisible
public boolean isErrorVisible()Description copied from interface:IErrorComponentChecks if the error visible.- Specified by:
isErrorVisiblein interfaceIErrorComponent- Returns:
true, if the error visible
-
createErrorIcon
protected void createErrorIcon(org.eclipse.swt.widgets.Composite top) -
createErrorMessage
protected void createErrorMessage(org.eclipse.swt.widgets.Composite top) -
createDetailButton
protected void createDetailButton(org.eclipse.swt.widgets.Composite top)
-