Package org.yamcs.studio.core.utils
Class RCPUtils
java.lang.Object
org.yamcs.studio.core.utils.RCPUtils
Various 'improvements' to RCP code to shorten our code a bit
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
findSourceProvider
(ExecutionEvent evt, String sourceName, Class<T> expectedClass) Finds a source provider within the active workbench for the execution eventstatic <T> T
findSourceProvider
(IServiceLocator locator, String sourceName, Class<T> expectedClass) Finds a source provider using the specified locator (for example, a workbench window)static ImageDescriptor
getImageDescriptor
(Class<?> classFromBundle, String path) static void
monitorCancellableFuture
(IProgressMonitor monitor, Future<?> future) static void
runCommand
(String commandId) static void
setStatusErrorMessage
(String viewId, String message) Sets an error message in the lower left status line.static void
setStatusMessage
(String viewId, String message) Sets a message in the lower left status line.
-
Constructor Details
-
RCPUtils
public RCPUtils()
-
-
Method Details
-
findSourceProvider
public static <T> T findSourceProvider(ExecutionEvent evt, String sourceName, Class<T> expectedClass) Finds a source provider within the active workbench for the execution event -
findSourceProvider
public static <T> T findSourceProvider(IServiceLocator locator, String sourceName, Class<T> expectedClass) Finds a source provider using the specified locator (for example, a workbench window) -
runCommand
-
setStatusMessage
Sets a message in the lower left status line. These messages are by rcp-design associated with a view.- Parameters:
viewId
- the view from which the message originates
-
setStatusErrorMessage
Sets an error message in the lower left status line. These messages are by rcp-design associated with a view.- Parameters:
viewId
- the view from which the message originates
-
getImageDescriptor
-
monitorCancellableFuture
public static void monitorCancellableFuture(IProgressMonitor monitor, Future<?> future) throws InterruptedException, ExecutionException
-