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
First step: remove any dependencies from Query Editor to other VWP modules. (Done)
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.
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.
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.