NB6QueryEditorAlignment

Query Editor Alignment in NetBeans 6

Owner: Jim Davidson

This page describes the high level plan for repackaging the VWP Query Editor as a standalone Netbeans module. A complete description of the Query Editor can be found in Visual SQL Editor Functional Specification. UI information has been split out into Visual SQL Editor UI Specification


Dependency Removal

First step: remove any dependencies from Query Editor to other VWP modules. (Done)

API Changes

Current:

Two Java interfaces, SqlStatement and SqlStatementMetaDataCache, which are defined by the Query Editor. The calling module (e.g., DB Explorer) needs to implement these two interfaces, which creates a dependency on the QE.

Alternatives:

  • Use SPI

Create SPI, modeled on current SQLEditorProvider. Would look something like:

public interface VisualSQLEditorProvider {

   public void openVisualSQLEditor(DatabaseConnection dbconn, String sql, boolean execute);   }

However, this depends on solving the communication issue outlined below.

  • Retain the SqlStatement interface. Would be simple and easy to implement, but would retain the dependency of the calling module on QE.

Open Issues:

The QE and calling module need to establish two-way communication. Currently this is done by listening to the "command" and "connection" properties of the SqlStatement.

The most important functionality is to update the command property of a RowSet, whenever an appropriate event occurs in the Query Editor (e.g., tabbing away). This is the only way that the command gets saved.

The QE also listens for changes to the connection or command; this is less critical, IMO.

If this issue can be resolved, we will adopt the first method, otherwise the second.


UI Extensions

  1. The Query Editor is currently accessible within the VWP, from the RowSet node in the Project Outline window. (Right click -> "Edit SQL Statement" ) (Already in VWP)
  2. Once it is exported within NB, it can also be made accessible from the current DB Explorer. Best method for that is an additional menu item on the table and column nodes, something like "Edit Visual Query".
  3. A third possibility, within the VWP, is to add back the visual designer "decorations" that were prototyped earlier. For VWP projects, this is a more obvious way to access the QE. That depends mainly on designer upgrades, and has been logged as a separate RFE.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo