|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.Plugin
org.eclipse.ui.plugin.AbstractUIPlugin
de.cau.cs.kieler.sim.kiem.KiemPlugin
public class KiemPlugin
This activator class controls the life cycle of the KiemPlugin. It also provides the access to the one and only instance of this class and hence a way to access the execution thread. For the execution thread it allows to access the KiemView for updating or refreshing the table or the step information text field.
Field Summary | |
---|---|
static int |
AIMED_STEP_DURATION_DEFAULT
The Constant AIMED_STEP_DURATION_DEFAULT. |
static String |
AIMED_STEP_DURATION_ID
The identifier for the aimed step duration. |
static int |
AIMED_STEP_DURATION_MAX
The Constant AIMED_STEP_DURATION_MAX. |
static int |
AIMED_STEP_DURATION_MIN
The Constant AIMED_STEP_DURATION_MIN. |
static String |
PLUGIN_ID
The Constant PLUGIN_ID. |
static String |
TIMEOUT_ID
The identifier for the timeout. |
Fields inherited from class org.eclipse.core.runtime.Plugin |
---|
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME |
Constructor Summary | |
---|---|
KiemPlugin()
The constructor if the KIEM plug-in. |
Method Summary | |
---|---|
DataComponentWrapper |
addTodataComponentWrapperList(AbstractDataComponent component)
Add a DataComponent instance to the dataComponentWrapperList . |
void |
clearDataComponentWrapperList()
Safely clear DataComponentWrapperList and call DataComponent destructors. |
int |
getAimedStepDuration()
Gets the currently set aimed step duration. |
Boolean |
getBooleanValueFromProviders(String propertyId)
Get a new property value from one of the configuration providers. |
List<DataComponentWrapper> |
getDataComponentWrapperList()
Returns the current DataComponentWrapper-List that is held by the KIEM plug-in directly. |
static KiemPlugin |
getDefault()
Returns the shared instance of the KIEM plug-in. |
List<DataComponentWrapper> |
getDefaultComponentWrapperList()
Returns the default ComponentWrapperList. |
EventManager |
getEventManager()
Gets the single EventManager that handles notification of DataComponents when KiemEvents occur. |
Execution |
getExecution()
Gets the execution. |
Integer |
getIntegerValueFromProviders(String propertyId)
Get a new property value from one of the configuration providers. |
KiemView |
getKIEMViewInstance()
Gets the KiemView instance. |
String |
getPropertyValueFromProviders(String propertyId)
Get a new property value from one of the configuration providers. |
List<AbstractDataComponent> |
getRegisteredDataComponentList()
This initializes the DataComponentList with all registered and loaded plug-ins that extend the following two extension points: - JSONObjectDataComponent - JSONStringDataComponent If a DataComponent is registered but cannot be instantiated because of an error this will result in a warning only so that all other fully functional DataComponents are still loaded. |
static void |
handleComponentError(AbstractDataComponent dataComponent,
Exception exception)
This method handles errors or warnings within the execution of DataComponents. |
boolean |
initExecution()
Initializes the Execution. |
void |
notifyConfigurationProviders(String propertyId,
String value)
Notify all configuration providers that a property in the currently loaded configuration has changed. |
void |
openFile(IEditorInput editorInput)
Opens an Execution File (*.execution) and tries to update the dataComponentWrapperList according to this file. |
void |
openFile(IPath executionFile,
boolean readOnly)
Opens an Execution File (*.execution) and tries to update the dataComponentWrapperList according to this file. |
void |
setAimedStepDuration(int aimedStepDurationi)
Sets the aimed step duration. |
void |
setExecution(Execution executionParam)
Sets the execution. |
void |
setKIEMViewInstance(KiemView kIEMViewInstanceParam)
Sets the KIEM view instance. |
void |
setViewFocus()
Sets the view focus to the KiemView instance. |
void |
showError(String textMessage,
String pluginID,
Exception exception,
boolean silent)
Shows an error dialog using the StatusAdapter. |
void |
showWarning(String textMessage,
String pluginID,
Exception exception,
boolean silent)
Shows a warning dialog using the StatusAdapter. |
void |
start(org.osgi.framework.BundleContext context)
|
void |
stop(org.osgi.framework.BundleContext context)
|
void |
updateEventManager()
Update event manager's DataComponentWrapper list. |
void |
updateStepsAsync()
Updates the steps in the Step text field asynchronously. |
void |
updateViewAsync()
Updates the view of the KiemView table asynchronously. |
Methods inherited from class org.eclipse.ui.plugin.AbstractUIPlugin |
---|
createImageRegistry, getDialogSettings, getImageRegistry, getPreferenceStore, getWorkbench, imageDescriptorFromPlugin, initializeDefaultPluginPreferences, initializeDefaultPreferences, initializeImageRegistry, loadDialogSettings, loadPreferenceStore, refreshPluginActions, saveDialogSettings, savePreferenceStore, shutdown, startup |
Methods inherited from class org.eclipse.core.runtime.Plugin |
---|
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int AIMED_STEP_DURATION_DEFAULT
public static final int AIMED_STEP_DURATION_MIN
public static final int AIMED_STEP_DURATION_MAX
public static final String PLUGIN_ID
public static final String AIMED_STEP_DURATION_ID
public static final String TIMEOUT_ID
Constructor Detail |
---|
public KiemPlugin()
getDefaultComponentWrapperList()
). The execution is null by
default. The KIEMViewInstance is set, in the constructor of the.
KiemView
Method Detail |
---|
public void updateEventManager()
public Execution getExecution()
public void setExecution(Execution executionParam)
executionParam
- the execution parampublic void start(org.osgi.framework.BundleContext context) throws Exception
start
in interface org.osgi.framework.BundleActivator
start
in class AbstractUIPlugin
Exception
public void stop(org.osgi.framework.BundleContext context) throws Exception
stop
in interface org.osgi.framework.BundleActivator
stop
in class AbstractUIPlugin
Exception
public static KiemPlugin getDefault()
public void openFile(IEditorInput editorInput)
editorInput
- the file editor input to openpublic void openFile(IPath executionFile, boolean readOnly) throws IOException
executionFile
- the execution file to openreadOnly
- the readonly flag indicates that the file is locked for
writing
IOException
- if the file was not foundpublic void notifyConfigurationProviders(String propertyId, String value)
propertyId
- the id of the property.value
- the value of the property.public String getPropertyValueFromProviders(String propertyId)
propertyId
- the id of the property to look for
public Integer getIntegerValueFromProviders(String propertyId)
propertyId
- the id of the property to look for
public Boolean getBooleanValueFromProviders(String propertyId)
propertyId
- the id of the property to look for
public void updateViewAsync()
public void updateStepsAsync()
public void setViewFocus()
public KiemView getKIEMViewInstance()
public void setKIEMViewInstance(KiemView kIEMViewInstanceParam)
KiemView
so that
this plug-in (or the execution thread) is able to trigger updates on the
view.
kIEMViewInstanceParam
- the one and only KiemView instancepublic int getAimedStepDuration()
public void setAimedStepDuration(int aimedStepDurationi)
aimedStepDurationi
- the new aimed step durationpublic List<AbstractDataComponent> getRegisteredDataComponentList()
JSONObjectDataComponent
JSONStringDataComponent
public boolean initExecution()
execution
is
not null.
public DataComponentWrapper addTodataComponentWrapperList(AbstractDataComponent component)
dataComponentWrapperList
.
This will clone the DataComponent and add an executable extension. It
then creates a new DataComponentWrapper instance that encapsulates the
just created DataComponent (and offers additional information and
methods). The latter will be added then to the DataComponentList.
component
- the component
public List<DataComponentWrapper> getDefaultComponentWrapperList()
JSONObjectDataComponent
JSONStringDataComponent
public void clearDataComponentWrapperList()
public List<DataComponentWrapper> getDataComponentWrapperList()
JSONObjectDataComponent
JSONStringDataComponent
public static void handleComponentError(AbstractDataComponent dataComponent, Exception exception)
KiemExecutionException
KiemExecutionException
Execution.errorTerminate()
method. But there is no guarantee that they really stop. The links to
these threads will be cut down, so that there is the possibility of
zombie threads.
dataComponent
- the DataComponent that caused the error or warningexception
- the Exception if any, or nullpublic EventManager getEventManager()
public void showWarning(String textMessage, String pluginID, Exception exception, boolean silent)
textMessage
- the text messagepluginID
- the plug-in idexception
- the exceptionsilent
- the silent tag indicates that only logging occurs, no message
dialog is displayedpublic void showError(String textMessage, String pluginID, Exception exception, boolean silent)
textMessage
- the optional text messagepluginID
- the plug-in idexception
- the exception if any, null otherwisesilent
- the silent tag indicates that only logging occurs, no message
dialog is displayed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |