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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TfindSourceProvider(ExecutionEvent evt, String sourceName, Class<T> expectedClass) Finds a source provider within the active workbench for the execution eventstatic <T> TfindSourceProvider(IServiceLocator locator, String sourceName, Class<T> expectedClass) Finds a source provider using the specified locator (for example, a workbench window)static ImageDescriptorgetImageDescriptor(Class<?> classFromBundle, String path) static voidmonitorCancellableFuture(IProgressMonitor monitor, Future<?> future) static voidrunCommand(String commandId) static voidsetStatusErrorMessage(String viewId, String message) Sets an error message in the lower left status line.static voidsetStatusMessage(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
-