|
50 | 50 | import oracle.dbtools.raptor.navigator.impl.ObjectFolder; |
51 | 51 | import oracle.dbtools.raptor.navigator.impl.SchemaFolder; |
52 | 52 | import oracle.dbtools.raptor.navigator.plsql.PlSqlNode; |
| 53 | +import oracle.dbtools.raptor.schemabrowser.view.SBWindow; |
53 | 54 | import oracle.dbtools.raptor.utils.Connections; |
54 | 55 | import oracle.dbtools.worksheet.editor.Worksheet; |
55 | 56 | import oracle.ide.Context; |
@@ -135,7 +136,7 @@ public boolean update(final IdeAction action, final Context context) { |
135 | 136 | action.setEnabled(true); |
136 | 137 | } |
137 | 138 | } |
138 | | - } else if (view instanceof DBNavigatorWindow) { |
| 139 | + } else if (view instanceof DBNavigatorWindow || view instanceof SBWindow) { |
139 | 140 | action.setEnabled(true); |
140 | 141 | // disable action if a node in the selection is not runnable |
141 | 142 | for (int i = 0; i < context.getSelection().length; i++) { |
@@ -192,7 +193,7 @@ public boolean update(final IdeAction action, final Context context) { |
192 | 193 | action.setEnabled(true); |
193 | 194 | } |
194 | 195 | } |
195 | | - } else if (view instanceof DBNavigatorWindow) { |
| 196 | + } else if (view instanceof DBNavigatorWindow || view instanceof SBWindow) { |
196 | 197 | // multiselection is not supported, use oddgen to generte tests for multiple objects |
197 | 198 | if (context.getSelection().length == 1) { |
198 | 199 | final Object element = context.getSelection()[0]; |
@@ -367,7 +368,7 @@ public void runTest(final Context context, boolean withDebug) { |
367 | 368 | worksheet.runTestAsync(); |
368 | 369 | } |
369 | 370 | } |
370 | | - } else if (view instanceof DBNavigatorWindow) { |
| 371 | + } else if (view instanceof DBNavigatorWindow || view instanceof SBWindow) { |
371 | 372 | final URL url = getURL(context); |
372 | 373 | if (url != null) { |
373 | 374 | final String connectionName = URLTools.getConnectionName(url); |
@@ -469,7 +470,7 @@ public void codeCoverage(final Context context) { |
469 | 470 | final CodeCoverageReporter reporter = new CodeCoverageReporter(getPathList(path), includeObjectList, connectionName); |
470 | 471 | reporter.showParameterWindow(); |
471 | 472 | } |
472 | | - } else if (view instanceof DBNavigatorWindow) { |
| 473 | + } else if (view instanceof DBNavigatorWindow || view instanceof SBWindow) { |
473 | 474 | logger.finer("Code coverage from DB navigator"); |
474 | 475 | final URL url = getURL(context); |
475 | 476 | if (url != null) { |
@@ -529,7 +530,7 @@ public void generateTest(final Context context) { |
529 | 530 | } |
530 | 531 | } |
531 | 532 | } else { |
532 | | - if (view instanceof DBNavigatorWindow) { |
| 533 | + if (view instanceof DBNavigatorWindow || view instanceof SBWindow) { |
533 | 534 | final URL url = getURL(context); |
534 | 535 | if (url != null) { |
535 | 536 | final String connectionName = URLTools.getConnectionName(url); |
|
0 commit comments