File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/nvs/handlers Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -33,17 +33,21 @@ public Object execute(ExecutionEvent event) throws ExecutionException
3333 new NvsTableDataService ().saveCsv (csvFile , new ArrayList <>());
3434 }
3535
36- IWorkbenchPage page = PlatformUI .getWorkbench ().getActiveWorkbenchWindow (). getActivePage ();
37- if (page != null )
36+ var window = PlatformUI .getWorkbench ().getActiveWorkbenchWindow ();
37+ if (window != null )
3838 {
39- try
39+ IWorkbenchPage page = window .getActivePage ();
40+ if (page != null )
4041 {
41- FileEditorInput input = new FileEditorInput (csvFile );
42- page .openEditor (input , NvsEditor .ID );
43- }
44- catch (PartInitException e )
45- {
46- Logger .log (e );
42+ try
43+ {
44+ FileEditorInput input = new FileEditorInput (csvFile );
45+ page .openEditor (input , NvsEditor .ID );
46+ }
47+ catch (PartInitException e )
48+ {
49+ Logger .log (e );
50+ }
4751 }
4852 }
4953
You can’t perform that action at this time.
0 commit comments