Class RCPUtils

java.lang.Object
org.yamcs.studio.core.RCPUtils

public class RCPUtils extends Object
Various 'improvements' to RCP code to shorten our code a bit
  • 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

      public static void runCommand(String commandId)
    • setStatusMessage

      public static void setStatusMessage(String viewId, String message)
      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

      public static void setStatusErrorMessage(String viewId, String message)
      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

      public static ImageDescriptor getImageDescriptor(Class<?> classFromBundle, String path)
    • monitorCancellableFuture

      public static void monitorCancellableFuture(IProgressMonitor monitor, Future<?> future) throws InterruptedException, ExecutionException
      Throws:
      InterruptedException
      ExecutionException