예제 #1
0
 @Override
 public void startTracing() {
   DisplayUtils.asyncExec(
       new Runnable() {
         @Override
         public void run() {
           startStopAction.setImageDescriptor(
               PlatformUI.getWorkbench()
                   .getSharedImages()
                   .getImageDescriptor(ISharedImages.IMG_ELCL_STOP));
           startStopAction.setToolTipText(STOP_LABEL);
         }
       });
 }
예제 #2
0
 static {
   final Display display = Display.getDefault();
   if (display != null && !display.isDisposed()) {
     try {
       DisplayUtils.asyncExec(
           new Runnable() {
             /*
              * @see java.lang.Runnable#run()
              */
             @Override
             public void run() {
               BG_COLOR_RGB = display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB();
               FG_COLOR_RGB = display.getSystemColor(SWT.COLOR_INFO_FOREGROUND).getRGB();
             }
           });
     } catch (final SWTError err) {
       // see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=45294
       if (err.code != SWT.ERROR_DEVICE_DISPOSED) {
         throw err;
       }
     }
   }
   initStyleSheet();
 }