Skip to content

Commit bf51c58

Browse files
committed
Additional set up info including example batch file to set environment;
additional info on DependencyViewer controls
1 parent 04e687c commit bf51c58

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

sqldeveloper/extension/java/DependencyExample/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,28 @@ The exact jars needed from them can be found in *DependencyExample/DependencyExa
99
[Set up your environment](../../setup.md), get the required libraries (see above), build the (default) deploy target, and start SQLDeveloper from the command line WITH THE (sqldeveloper/bin/)sqldeveloper -clean OPTION.
1010

1111
On the first run, only the triggers defined in extension.xml will load.
12+
1213
![DependencyExampleAbout diagram](images/DependencyExampleAbout.png)
14+
1315
In our case, that means the context menu entry only and NOT the dependency viewer tab referenced in the hook section (via DependencyExampleGraphViewer.xml which is in the directory the hook says to load xml from)
16+
1417
![DependencyExampleContextMenu diagram](images/DependencyExampleContextMenu.png)
18+
1519
Which opens the dependency diagram AND causes the rest of the extension hooks to load. (The editor tab name is pulled from the 1st selected node but will switch when focus goes to another editor and back. TODO: This really should be implemented as it's own dockable, not as an 'editor'.)
20+
1621
![DependencyExampleZoomedOut diagram](images/DependencyExampleZoomedOut.png)
17-
the diagram is scrollable, zoomable, editable, and can be exported to svg (all thanks to the FXDiagram library.) Double clicking on a node performs a "DrillLink" to open the SQL Developer editor for that node.
22+
23+
The diagram is scrollable, zoomable, editable, and can be exported to svg (all thanks to the FXDiagram library.)
24+
Controls:
25+
* Scroll with mouse wheel
26+
* Zoom with Ctrl + mouse wheel
27+
* Select with left click, Ctrl+left click to add to selection, or draw bounding box with mouse
28+
* Move nodes / selection / diagram by holding down right mouse button & dragging. Left button also works for node / selection
29+
* Double clicking on a node performs a "DrillLink" to open the SQL Developer editor for that node.
30+
* Right click brings up context menu. Hover over icons to see what is available. Note that do / undo refer to changes made to the diagram since opening it.
31+
1832
![DependencyExampleZoomedIn diagram](images/DependencyExampleZoomedIn.png)
33+
1934
Now that it is fully loaded, the viewer definition is active and a dependency graph tab is added to the object viewers. (The next time a new one is opened.)
35+
2036
![DependencyExampleViewer diagram](images/DependencyExampleViewer.png)

sqldeveloper/extension/java/DependencyExample/src/oracle/db/example/sqldeveloper/extension/dependency/control/FxDiagram.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ Everyone is permitted to copy and distribute copies of this Agreement, but in or
112112
import javafx.collections.ObservableList;
113113
import javafx.event.EventHandler;
114114
import javafx.geometry.Insets;
115-
import javafx.scene.Cursor;
116115
import javafx.scene.input.KeyEvent;
117116
import javafx.scene.input.MouseButton;
118117
import javafx.scene.input.MouseEvent;
@@ -239,17 +238,12 @@ public void handle(MouseEvent event) {
239238
lastClickTime = now;
240239
}
241240
if (MouseButton.PRIMARY == event.getButton() && timeBetween < doubleClickThreshold) {
242-
setCursor(Cursor.WAIT);
243241
SwingUtilities.invokeLater(() -> {
244242
try {
245243
model.performDrill(key);
246244
} catch (Exception e) {
247245
String msg = DependencyExampleResources.format(DependencyExampleResources.DependencyExampleFxControl_drillLink_fail, key);
248246
Logger.warn(FxDiagram.class, msg, e);
249-
} finally {
250-
Platform.runLater(() -> {
251-
FxDiagram.this.setCursor(Cursor.DEFAULT);
252-
});
253247
}
254248
});
255249
} else {

sqldeveloper/extension/setenv.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
SET ANT_HOME=D:\apache-ant-1.10.3
2+
SET JAVA_HOME=C:\Program Files\Java\jdk1.8.0_152
3+
SET ANT_BIN=%ANT_HOME%\bin
4+
SET SQLDEV_BIN=D:\sqldeveloper-18.1.0\sqldeveloper\sqldeveloper\bin
5+
SET PATH=%PATH%;%ANT_BIN%;%SQLDEV_BIN%
6+

sqldeveloper/extension/setup.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ sqldeveloper/extension is an eclipse project directory but the examples are buil
3030
## Wiring it together
3131
### build.properties
3232
* extension/build.properties - Update to point to your SQL Developer installation & optionally change the owner info.
33+
* extension/java/SQLDeveloper18.1.userlibraries - **IF** you are using eclipse, update the paths to point to your SQL Developer installation and import the library.
3334

3435
### Third party libraries
3536
**If/when** you plan to build the [Dependency Example](java/DependencyExample), see that page for additional set up requirements.
3637

3738
## Making it go
3839
If you are using eclipse, I'm going to assume you know how to import an existing project and run ant tasks but continue reading to learn about the various ant tasks and how they are used.
3940

40-
If you are using ant from the command line, make sure `ANT_HOME` and `JAVA_HOME` are defined for your environment and that ant is on your `PATH` and accessible from the command line.
41+
If you are using ant from the command line, make sure `ANT_HOME` and `JAVA_HOME` are defined for your environment and that ant is on your `PATH` and accessible from the command line. An example setenv.bat file to do this is in the extension folder. I included sqldeveloper on the path so I wouldn't have to navigate around.
4142

4243
### Ant tasks
4344
The [XML Packaged](xml/packaged) example and all of the [Java](java) examples use ant to build and deploy the example. The 'heavy lifting' is all defined in buildtools so the individual build.xml files for each example are pretty simple. There only a few targets of interest:

0 commit comments

Comments
 (0)