Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No "Run utPLSQL test" context menu in Connections window #18

Closed
PhilippSalvisberg opened this issue Apr 5, 2018 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@PhilippSalvisberg
Copy link
Member

Problem

Sometimes after the installation or reinstallation of the utPLSQL extensions the context menu is missing in Connections window. It does look similar to this:

missing_context_menu_in_connection_window

The SQL Developer About dialog shows that the extension is not fully loaded.

triggersloaded

Opening the context menu in the Connections window (database navigator) does not trigger the load of the extension. This is a bug. The extensions should be fully loaded as soon as a context menu with a "Run utPLSQL test" option is opened (or the assigned keyboard shortcut is pressed). However, triggering works in the PL/SQL editor or in the Worksheet but not in the Connections window. This is a bug.

Workaround

As a workaround the context menu in the PL/SQL editor or the Worksheet can be opened. After a restart of SQL Developer the extension is fully loaded and fully functional.

context_menu_in_plsql_editor

@PhilippSalvisberg PhilippSalvisberg added this to the v0.3.0 milestone Apr 5, 2018
@PhilippSalvisberg PhilippSalvisberg self-assigned this Apr 5, 2018
@PhilippSalvisberg
Copy link
Member Author

PhilippSalvisberg commented Apr 5, 2018

Based on feedback from dtabase in Slack, it is necessary to execute "Run utPLSQL test" to fully load the extension. After that the option appears in the Connection window without a restart of SQL Developer

@PhilippSalvisberg
Copy link
Member Author

Looks like a custom rule-type cannot be applied as long as the extension is not loaded. And the rule-type definition:

		<rules>
			<rule-type class="org.utplsql.sqldev.menu.UtplsqlNavigatorRule"
				id="utplsql-navigator-rule">
				<supported-parameters />
			</rule-type>
			<rule id="dbnode-is-utplsql-ready" type="utplsql-navigator-rule" />
		</rules>

does not cause the extension to be loaded. A kind of chicken-egg-issue. I see two options:

  1. Add the utPLSQL menu on every node in the tree, unconditionally (rule="always-enabled" instead of rule="dbnode-is-utplsql-ready")

  2. Use rule-types defined in the extension oracle.jdeveloper.java.core, they are already loaded and therefore can be used. However, rules have to be build using a composite-rule in the extension.xml, which is a bit verbose and less precise than the current implementation in UtplsqlNavigatorRule.xtend.

Option 2 is the way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant