File tree Expand file tree Collapse file tree
plugin/src/main/java/io/snyk/eclipse/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,15 +86,13 @@ public Object function(Object[] arguments) {
8686 new BrowserFunction (browser , "stopScan" ) {
8787 @ Override
8888 public Object function (Object [] arguments ) {
89-
9089 IHandlerService handlerService =
9190 (IHandlerService ) PlatformUI .getWorkbench ().getService (IHandlerService .class );
9291 try {
9392 handlerService .executeCommand (IHandlerCommands .STOP_SCAN , null );
9493 } catch (CommandException e ) {
9594 SnykLogger .logError (e );
9695 }
97-
9896 return null ;
9997 }
10098 };
Original file line number Diff line number Diff line change 77import org .eclipse .jface .viewers .IStructuredSelection ;
88import org .eclipse .jface .wizard .Wizard ;
99import org .eclipse .jface .wizard .WizardDialog ;
10- import org .eclipse .swt .widgets .Display ;
1110import org .eclipse .ui .INewWizard ;
1211import org .eclipse .ui .IWorkbench ;
12+ import org .eclipse .ui .PlatformUI ;
1313
1414import io .snyk .eclipse .plugin .SnykStartup ;
1515import io .snyk .eclipse .plugin .utils .ResourceUtils ;
@@ -94,10 +94,10 @@ protected IStatus run(IProgressMonitor monitor) {
9494 }.schedule ();
9595 return true ;
9696 }
97-
97+
9898 public static Object createAndLaunch () {
9999 SnykWizard wizard = new SnykWizard ();
100- WizardDialog dialog = new WizardDialog (Display . getDefault ().getActiveShell (), wizard );
100+ WizardDialog dialog = new WizardDialog (PlatformUI . getWorkbench (). getDisplay ().getActiveShell (), wizard );
101101 dialog .setBlockOnOpen (true );
102102 dialog .open ();
103103 return null ;
You can’t perform that action at this time.
0 commit comments