├── .gitignore ├── LICENSE ├── README.md ├── docs ├── images │ ├── disconnect_debugger.png │ ├── remote_debug_breakpoint.png │ ├── remote_debug_configuration.png │ └── user_conf_property.png ├── remote-debugging.md ├── sqldev-versions.md └── trigger-hooks.md ├── examples ├── 010_report │ ├── all_objects.xml │ ├── ashtop.xml │ └── tpt.xml ├── 020_editor │ ├── ashtop.xml │ ├── binds.xml │ ├── drinks-editors.xml │ └── properties.xml ├── 030_navigator │ ├── drinks-navigator-with-categories.xml │ ├── drinks-navigator.xml │ ├── invalid_objects.xml │ ├── invalid_objects_flat.xml │ ├── mini-drinks-navigator.xml │ └── soft-drinks-navigator.xml ├── 040_action │ ├── add_column.xml │ ├── ctas_javascript.xml │ ├── ctas_plsql.xml │ ├── greet_flat_invalid_objects_root.xml │ ├── greet_table.xml │ └── greet_table_folder.xml ├── 050_bundled │ ├── bundle.xml │ ├── extension.xml │ ├── pom.xml │ ├── sqldev_assembly.xml │ ├── sqldeveloper.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── trivadis │ │ │ └── sqldev │ │ │ └── example50 │ │ │ └── ExampleResources.java │ │ └── resources │ │ └── com │ │ └── trivadis │ │ └── sqldev │ │ └── example50 │ │ ├── ExampleResources.properties │ │ ├── action │ │ └── ctas_plsql.xml │ │ ├── editor │ │ ├── drinks-editors.xml │ │ └── properties.xml │ │ ├── images │ │ ├── beer.png │ │ ├── caffeinated.png │ │ ├── chocolate.png │ │ ├── cider.png │ │ ├── distilled.png │ │ ├── drinks-group.png │ │ ├── drinks.png │ │ ├── hard-soda.png │ │ ├── soft-drink-folder.png │ │ ├── soft-drink.png │ │ └── wine.png │ │ ├── navigator │ │ └── drinks-navigator.xml │ │ └── report │ │ └── all_objects.xml ├── 052_bundled_multilingual │ ├── bundle.xml │ ├── extension.xml │ ├── pom.xml │ ├── sqldev_assembly.xml │ ├── sqldeveloper.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── trivadis │ │ │ └── sqldev │ │ │ └── example52 │ │ │ └── ExampleResources.java │ │ └── resources │ │ └── com │ │ └── trivadis │ │ └── sqldev │ │ └── example52 │ │ ├── ExampleResources.properties │ │ ├── ExampleResources_de.properties │ │ ├── action │ │ ├── ctas_plsql.xml │ │ └── ctas_plsql_de.xliff │ │ ├── editor │ │ ├── drinks-editors.xml │ │ ├── drinks-editors_de.xliff │ │ ├── properties.xml │ │ └── properties_de.xliff │ │ ├── images │ │ ├── beer.png │ │ ├── caffeinated.png │ │ ├── chocolate.png │ │ ├── cider.png │ │ ├── distilled.png │ │ ├── drinks.png │ │ ├── hard-soda.png │ │ ├── soft-drink-folder.png │ │ ├── soft-drink.png │ │ └── wine.png │ │ ├── navigator │ │ └── drinks-navigator.xml │ │ └── report │ │ ├── all_objects.xml │ │ └── all_objects_de.xliff ├── 060_menubar │ ├── bundle.xml │ ├── extension.xml │ ├── pom.xml │ ├── sqldev_assembly.xml │ ├── sqldeveloper.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── trivadis │ │ │ └── sqldev │ │ │ └── example60 │ │ │ ├── ExampleController.java │ │ │ └── ExampleResources.java │ │ └── resources │ │ └── com │ │ └── trivadis │ │ └── sqldev │ │ └── example60 │ │ ├── ExampleResources.properties │ │ ├── accelerators.xml │ │ └── images │ │ ├── one.png │ │ ├── three.png │ │ └── two.png ├── 070_toolbar │ ├── bundle.xml │ ├── extension.xml │ ├── pom.xml │ ├── sqldev_assembly.xml │ ├── sqldeveloper.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── trivadis │ │ │ └── sqldev │ │ │ └── example70 │ │ │ ├── ExampleController.java │ │ │ └── ExampleResources.java │ │ └── resources │ │ └── com │ │ └── trivadis │ │ └── sqldev │ │ └── example70 │ │ ├── ExampleResources.properties │ │ └── images │ │ └── one.png ├── 080_context_menu │ ├── bundle.xml │ ├── extension.xml │ ├── pom.xml │ ├── sqldev_assembly.xml │ ├── sqldeveloper.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── trivadis │ │ │ └── sqldev │ │ │ └── example80 │ │ │ ├── ExampleController.java │ │ │ └── ExampleResources.java │ │ └── resources │ │ └── com │ │ └── trivadis │ │ └── sqldev │ │ └── example80 │ │ ├── ExampleResources.properties │ │ └── images │ │ ├── one.png │ │ └── two.png ├── 090_preferences │ ├── bundle.xml │ ├── extension.xml │ ├── pom.xml │ ├── sqldev_assembly.xml │ ├── sqldeveloper.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── trivadis │ │ │ └── sqldev │ │ │ └── example90 │ │ │ ├── ExampleController.java │ │ │ ├── ExampleResources.java │ │ │ ├── PreferenceModel.java │ │ │ └── PreferencePanel.java │ │ └── resources │ │ └── com │ │ └── trivadis │ │ └── sqldev │ │ └── example90 │ │ ├── ExampleResources.properties │ │ └── images │ │ ├── one.png │ │ └── two.png ├── 100_dockable │ ├── bundle.xml │ ├── extension.xml │ ├── pom.xml │ ├── sqldev_assembly.xml │ ├── sqldeveloper.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── trivadis │ │ │ └── sqldev │ │ │ └── example100 │ │ │ ├── ExampleController.java │ │ │ ├── ExampleDockable.java │ │ │ ├── ExampleDockableFactory.java │ │ │ └── ExampleResources.java │ │ └── resources │ │ └── com │ │ └── trivadis │ │ └── sqldev │ │ └── example100 │ │ ├── ExampleResources.properties │ │ └── images │ │ ├── big_one.png │ │ └── one.png └── 110_grid_table_menu │ ├── bundle.xml │ ├── extension.xml │ ├── pom.xml │ ├── sqldev_assembly.xml │ ├── sqldeveloper.xml │ └── src │ └── main │ ├── java │ └── com │ │ └── trivadis │ │ └── sqldev │ │ └── example110 │ │ ├── ExampleAddin.java │ │ ├── ExampleContextMenu.java │ │ ├── ExampleController.java │ │ └── ExampleResources.java │ └── resources │ └── com │ └── trivadis │ └── sqldev │ └── example110 │ ├── ExampleResources.properties │ └── images │ ├── one.png │ └── two.png └── workshop ├── 000_set_up_environment ├── README.md └── images │ ├── eclipse.png │ ├── eclipse_zip_editor.png │ ├── enhanced_class_decompiler.png │ ├── preferences_file_associations.png │ └── sql_developer.png ├── 010_create_report_xml_extension ├── README.md └── images │ ├── create_report.png │ ├── main_menu_tools_preferences.png │ ├── main_menu_view_reports.png │ ├── preferences.png │ ├── preferences2.png │ ├── report_delete.png │ ├── report_save_as.png │ ├── reports_new_report.png │ ├── select_connection.png │ ├── shared_reports.png │ ├── toolbar_save_all.png │ └── user_defined_reports_italic.png ├── 020_create_editor_xml_extension ├── README.md └── images │ ├── context_menu_popup_describe.png │ ├── main_menu_tools_preferences.png │ ├── preferences.png │ ├── preferences2.png │ ├── table_popup_describe.png │ └── table_properties.png ├── 030_create_navigator_xml_extension ├── README.md └── images │ ├── drinks1.png │ ├── drinks2.png │ ├── main_menu_tools_preferences.png │ ├── preferences.png │ └── preferences2.png ├── 032_add_editors_for_navigator ├── README.md └── images │ ├── cola_ingredients.png │ ├── cola_nutrition.png │ ├── main_menu_tools_preferences.png │ ├── preferences.png │ ├── preferences2.png │ └── soft-drinks.png ├── 040_create_plsql_action_xml_extension ├── README.md └── images │ ├── confirmation_dialog.png │ ├── main_menu_tools_preferences.png │ ├── preferences.png │ ├── preferences2.png │ └── run_dialog.png ├── 042_create_javascript_action_xml_extension ├── README.md └── images │ ├── confirmation_dialog.png │ ├── main_menu_tools_preferences.png │ ├── preferences.png │ ├── preferences2.png │ ├── run_dialog.png │ └── run_dialog_sql_tab.png ├── 050_create_bundled_xml_extension ├── README.md └── images │ ├── check_for_updates_1.png │ ├── check_for_updates_2.png │ ├── clone_a_git_repository.png │ ├── clone_git_repo_1.png │ ├── clone_git_repo_2.png │ ├── clone_git_repo_3.png │ ├── cola_ingredients.png │ ├── cola_nutrition.png │ ├── confirm_exit.png │ ├── confirmation_dialog.png │ ├── eclipse_workspace.png │ ├── existing_maven_projects.png │ ├── import_maven_projects.png │ ├── import_projects.png │ ├── maven_build.png │ ├── maven_clean_package.png │ ├── open_git_perspective.png │ ├── open_perspective.png │ ├── project_explorer_files.png │ ├── reports.png │ ├── run_dialog.png │ ├── soft-drinks.png │ ├── table_properties.png │ └── user_defined_extensions.png ├── 052_create_bundled_multilingual_xml_extension ├── README.md └── images │ ├── beenden_bestaetigen.png │ ├── berichte.png │ ├── cola_ingredients.png │ ├── cola_nutrition.png │ ├── confirmation_dialog.png │ ├── ctas_context_menu.png │ ├── features_und_updates_verwalten.png │ ├── nach_updates_suchen_1.png │ ├── nach_updates_suchen_2.png │ ├── neustart_bestaetigen.png │ ├── run_dialog.png │ ├── soft-drinks.png │ └── tabellen_eigenschaften.png ├── 060_extend_menubar ├── README.md └── images │ ├── action_event_handled.png │ ├── confirm_restart.png │ ├── custom_menu.png │ ├── edit_menu.png │ ├── file_menu.png │ ├── help_menu.png │ ├── manage_features_and_updates.png │ ├── navigate_menu.png │ ├── run_menu.png │ ├── team_menu.png │ ├── tools_menu.png │ ├── view_menu.png │ └── window_menu.png ├── 070_extend_toolbar ├── README.md └── images │ ├── action_event_handled.png │ ├── action_event_handled2.png │ ├── inspect_variables.png │ └── toolbar.png ├── 080_extend_context_menu ├── README.md └── images │ ├── connection_action_event_handled.png │ ├── connection_context_menu_item.png │ ├── editor_action_event_handled.png │ └── editor_context_menu_item.png ├── 090_add_preferences ├── README.md └── images │ ├── connection_action_event_handled.png │ ├── connection_context_menu_item.png │ └── preferences.png ├── 100_add_dockable_window ├── README.md └── images │ ├── default_east_position.png │ ├── drag_to_welcome_tab.png │ ├── drop_on_welcome_tab.png │ └── view_menu_item_1.png └── 110_grid_table_menu ├── README.md └── images ├── context_menu_for_multiple_cells_in_query_result.png ├── context_menu_for_one_cell_in_query_result.png ├── context_menu_item1_result.png └── context_menu_item2_result.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | 25 | # Eclipse 26 | .project 27 | .classpath 28 | **/.settings 29 | 30 | # IntelliJ 31 | .idea 32 | *.iml 33 | 34 | # Windows 35 | Thumbs.db 36 | 37 | # Targets 38 | **/target 39 | **/bin 40 | -------------------------------------------------------------------------------- /docs/images/disconnect_debugger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/docs/images/disconnect_debugger.png -------------------------------------------------------------------------------- /docs/images/remote_debug_breakpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/docs/images/remote_debug_breakpoint.png -------------------------------------------------------------------------------- /docs/images/remote_debug_configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/docs/images/remote_debug_configuration.png -------------------------------------------------------------------------------- /docs/images/user_conf_property.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/docs/images/user_conf_property.png -------------------------------------------------------------------------------- /docs/remote-debugging.md: -------------------------------------------------------------------------------- 1 | # Remote Debugging in Eclipse 2 | 3 | ## 1. Enable Debug in `product.conf` 4 | 5 | Add the folloing to your `product.conf`: 6 | 7 | ``` 8 | AddVMOption -Xdebug 9 | AddVMoption -Xrunjdwp:transport=dt_socket,address=8998,server=y,suspend=n 10 | ``` 11 | 12 | See `user.conf` property in the `Properties` tab of SQL Developer's `About` dialog for the exact location of your `product.conf` file. 13 | 14 | ![product.conf location](./images/user_conf_property.png) 15 | 16 | The option `suspend=y` would suspend SQL Developer during startup until the debugger connects. You do not want this, unless when debugging the startup process itself. `suspend=n` will allow to start SQL Developer normally. The debugger can connect and disconnect antime while SQL Developer is running. This is much more convenient and leads to less misunderstandings, because e.g. the SQL Developer does not seem to start because it is waiting for a debugging session. 17 | 18 | See [JDPA Connection and Invocation Details](https://docs.oracle.com/javase/8/docs/technotes/guides/jpda/conninv.html) for more information about the `-Xrunjdwp` option. 19 | 20 | ## 2. Configure Remote Debug 21 | 22 | Add the following debug configuration for your extension project. The port number has to match the one entered in `product.conf`. 23 | 24 | ![Remote Debug Configuration](./images/remote_debug_configuration.png) 25 | 26 | ## 3. Start SQL Developer 27 | 28 | Start SQL Developer. 29 | 30 | ## 4. Debug 31 | 32 | Set a breakpoint in your Java code and start the previously configured Debug Configuration. 33 | 34 | The debuger will suspend the process when it reaches a breakpoint. 35 | 36 | ![Remote Debug Breakpoint](./images/remote_debug_breakpoint.png) 37 | 38 | Disconnect from SQL Developer after debugging. 39 | 40 | ![Disconnect from SQL Developer](./images/disconnect_debugger.png) 41 | 42 | ## 5. Stop SQL Developer 43 | 44 | Stop the SQL Developer in the normal way. Do not press the `Terminate` button in the debugger to avoid data loss. 45 | 46 | ## 6. Disable Debug in `product.conf` 47 | 48 | Delete or comment out the two previously added `AddVMOption` entries. 49 | 50 | However, if you debug frequently, it is more convenient to keep SQL Developer ready for incoming debugging connections. 51 | -------------------------------------------------------------------------------- /docs/sqldev-versions.md: -------------------------------------------------------------------------------- 1 | # SQL Developer versions 2 | 3 | This mapping is relevant, if an extension requires a certain SQL Developer version or range of versions. The version defined in the `META-INF/extensions.xml` within the `oracle.sqldeveloper.jar` is relevant. 4 | 5 | | SQL Developer version | extension version | Notes | 6 | | --------------------- | ----------------- | ----- | 7 | | 3.2.20 | 11.2.0.09.87 | last version based on ESDK 1.0 and JDK6 | 8 | | 4.0.0 | 12.2.0.13.80 | first version based on ESDK 2.0 and JDK7| 9 | | 4.0.1 | 12.2.0.14.48 | | 10 | | 4.0.2 | 12.2.0.15.21 | | 11 | | 4.0.3 | 12.2.0.16.84 | last version based on JDK7 | 12 | | 4.1.0 | 12.2.0.19.07 | first version based on JDK8 | 13 | | 4.1.1 | 12.2.0.19.59 | | 14 | | 4.1.3 | 12.2.0.20.78 | | 15 | | 4.1.4 | 12.2.0.21.20 | | 16 | | 4.1.5 | 12.2.0.21.78 | | 17 | | 4.2.0 | 12.2.1.17.089.1709 | | 18 | | 17.2.0 | 17.2.0.188.1159 | | 19 | | 17.3.0 | 17.3.0.271.2323 | | 20 | | 17.3.1 | 17.3.1.279.0537 | | 21 | | 17.4.0 | 17.4.0.355.2349 | | 22 | | 18.1.0 | 18.1.0.095.1630 | | 23 | | 18.2.0 | 18.2.0.183.1748 | | 24 | | 18.3.0 | 18.3.0.277.2354 | | 25 | | 18.4.0 | 18.4.0.376.1900 | | 26 | | 19.1.0 | 19.1.0.094.2042 | | 27 | | 19.2.0 | 19.2.0.206.2117 | | 28 | | 19.2.1 | 19.2.1.247.2212 | | 29 | | 19.4.0 | 19.3.0.354.1759 | no 19.3.0 released, 19.4.0 is the external version! | 30 | | 20.2.0 | 20.2.0.175.1842 | no 20.1.0 released | 31 | | 20.4.0 | 20.4.0.379.2205 | no 20.3.0 released | 32 | | 20.4.1 | 20.4.1.407.0006 | | 33 | | 21.2.0 | 21.2.0.187.1842 | no 21.1.0 released| 34 | | 21.4.0 | 21.4.0.346.2239 | no 21.3.0 released| 35 | | 21.4.1 | 21.4.1.349.1822 | | 36 | | 21.4.2 | 21.4.2.018.1706 | | 37 | | 21.4.3 | 21.4.3.063.0100 | last version based on JDK8 | 38 | | 22.2.0 | 22.2.0.173.2018 | first version based on JDK11, no 22.1.0 released| 39 | | 22.2.1 | 22.2.1.234.1810 | | 40 | -------------------------------------------------------------------------------- /examples/010_report/all_objects.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/010_report/ashtop.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 |
76 | 77 |
78 |
79 | 80 |
81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /examples/020_editor/ashtop.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/020_editor/binds.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/020_editor/properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/030_navigator/drinks-navigator-with-categories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 22 | 23 | 24 | 25 | 26 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /examples/030_navigator/invalid_objects_flat.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/030_navigator/mini-drinks-navigator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /examples/030_navigator/soft-drinks-navigator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /examples/040_action/add_column.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Add Column... 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 34 | Add a column to the selected table. 35 | 36 | Confirmation 37 | Column #0# has been added to table "#OBJECT_NAME#" 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /examples/040_action/ctas_javascript.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Create Table as Select (JS)... 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 33 | Copy a table. Completely or a chosen subset in percent. 34 | 35 | Confirmation 36 | Table "#OBJECT_NAME#" has been copied to #0#. 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /examples/040_action/ctas_plsql.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Create Table as Select... 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 32 | 33 | Copy a table. Completely or a chosen subset in percent. 34 | 35 | Confirmation 36 | Table "#OBJECT_NAME#" has been copied to #0#. 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /examples/040_action/greet_flat_invalid_objects_root.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Greet... 4 | 5 | 6 | 7 | 43 | JavaScript Hello World 44 | 45 | Confirmation 46 | Table(s) #OBJECT_NAMES# greeted with #0#. 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /examples/040_action/greet_table.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Greet... 4 | 5 | 6 | 7 | 53 | JavaScript Hello World 54 | 55 | Confirmation 56 | Table(s) #OBJECT_NAMES# greeted with #0#. 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /examples/040_action/greet_table_folder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Greet... 4 | 5 | 6 | 7 | 42 | JavaScript Hello World 43 | 44 | Confirmation 45 | "#OBJECT_TYPE#" greeted with #0#. 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /examples/050_bundled/bundle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #EXTENSION_NAME# 4 | #EXTENSION_VERSION# 5 | #EXTENSION_OWNER# 6 | https://www.salvis.com/blog/ 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/050_bundled/extension.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | db-category 9 | #EXTENSION_NAME# 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | /com/trivadis/sqldev/example50/navigator/drinks-navigator.xml 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /examples/050_bundled/sqldev_assembly.xml: -------------------------------------------------------------------------------- 1 | 3 | bin 4 | 5 | zip 6 | 7 | false 8 | 9 | 10 | ${project.build.directory} 11 | ${file.separator} 12 | 13 | ${project.name}.jar 14 | 15 | 16 | 17 | ${project.build.directory} 18 | ${file.separator}META-INF 19 | 20 | bundle.xml 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/050_bundled/sqldeveloper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #EXTENSION_NAME# 5 | #EXTENSION_VERSION# 6 | #EXTENSION_OWNER# 7 | https://github.com/PhilippSalvisberg/plscope-utils/ 8 | 9 | http://.../#EXTENSION_DEPLOYABLE# 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/050_bundled/src/main/java/com/trivadis/sqldev/example50/ExampleResources.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example50; 2 | 3 | import java.awt.Image; 4 | 5 | import javax.swing.Icon; 6 | 7 | import oracle.dbtools.raptor.utils.MessagesBase; 8 | 9 | public class ExampleResources extends MessagesBase { 10 | 11 | private static final ClassLoader CLASS_LOADER = ExampleResources.class.getClassLoader(); 12 | private static final String CLASS_NAME = ExampleResources.class.getCanonicalName(); 13 | private static final ExampleResources INSTANCE = new ExampleResources(); 14 | 15 | private ExampleResources() { 16 | super(CLASS_NAME, CLASS_LOADER); 17 | } 18 | 19 | public static String getString( String key ) { 20 | return INSTANCE.getStringImpl(key); 21 | } 22 | 23 | public static String get( String key ) { 24 | return getString(key); 25 | } 26 | 27 | public static Image getImage( String key ) { 28 | return INSTANCE.getImageImpl(key); 29 | } 30 | 31 | public static String format(String key, Object ... arguments) { 32 | return INSTANCE.formatImpl(key, arguments); 33 | } 34 | 35 | public static Icon getIcon(String key) { 36 | return INSTANCE.getIconImpl(key); 37 | } 38 | 39 | public static Integer getInteger(String key) { 40 | return INSTANCE.getIntegerImpl(key); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/ExampleResources.properties: -------------------------------------------------------------------------------- 1 | # English (default) resources for extension com.trivadis.sqldev.example50 2 | 3 | # Externally used constants (pom.xml, bundle.xml, extension.xml, sqldeveloper.xml) 4 | EXTENSION_NAME=Example 50 for SQL Developer 5 | EXTENSION_DESCRIPTION=Example SQL Developer extension to bundle multiple XML extensions. 6 | EXTENSION_OWNER=Philipp Salvisberg 7 | MIN_SQLDEV_VERSION=17.4.0.355.2349 8 | 9 | # Icons 10 | BEER_ICON=/com/trivadis/sqldev/example50/images/beer.png 11 | CAFFEINATED_ICON=/com/trivadis/sqldev/example50/images/caffeinated.png 12 | COCOLATE_ICON=/com/trivadis/sqldev/example50/images/chocolate.png 13 | CIDER_ICON=/com/trivadis/sqldev/example50/images/cider.png 14 | DISTILLED_ICON=/com/trivadis/sqldev/example50/images/distilled.png 15 | DRINKS_GROUP_ICON=/com/trivadis/sqldev/example50/images/drinks-group.png 16 | DRINKS_ICON=/com/trivadis/sqldev/example50/images/drinks.png 17 | HARD_SODA_ICON=/com/trivadis/sqldev/example50/images/hard-soda.png 18 | SOFT_DRINK_FOLDER_ICON=/com/trivadis/sqldev/example50/images/soft-drink-folder.png 19 | SOFT_DRINK_ICON=/com/trivadis/sqldev/example50/images/soft-drink.png 20 | WINE_ICON=/com/trivadis/sqldev/example50/images/wine.png 21 | 22 | # Labels in navigator 23 | DRINKS_LABEL=Drinks 24 | -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/action/ctas_plsql.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Create Table as Select... 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 32 | 33 | Copy a table. Completely or a chosen subset in percent. 34 | 35 | Confirmation 36 | Table "#OBJECT_NAME#" has been copied to #0#. 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/editor/properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/beer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/beer.png -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/caffeinated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/caffeinated.png -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/chocolate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/chocolate.png -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/cider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/cider.png -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/distilled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/distilled.png -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/drinks-group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/drinks-group.png -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/drinks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/drinks.png -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/hard-soda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/hard-soda.png -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/soft-drink-folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/soft-drink-folder.png -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/soft-drink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/soft-drink.png -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/wine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/images/wine.png -------------------------------------------------------------------------------- /examples/050_bundled/src/main/resources/com/trivadis/sqldev/example50/report/all_objects.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/bundle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #EXTENSION_NAME# 4 | #EXTENSION_VERSION# 5 | #EXTENSION_OWNER# 6 | https://www.salvis.com/blog/ 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/extension.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | db-category 9 | #EXTENSION_NAME# 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | /com/trivadis/sqldev/example52/navigator/drinks-navigator.xml 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/sqldev_assembly.xml: -------------------------------------------------------------------------------- 1 | 3 | bin 4 | 5 | zip 6 | 7 | false 8 | 9 | 10 | ${project.build.directory} 11 | ${file.separator} 12 | 13 | ${project.name}.jar 14 | 15 | 16 | 17 | ${project.build.directory} 18 | ${file.separator}META-INF 19 | 20 | bundle.xml 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/sqldeveloper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #EXTENSION_NAME# 5 | #EXTENSION_VERSION# 6 | #EXTENSION_OWNER# 7 | https://github.com/PhilippSalvisberg/plscope-utils/ 8 | 9 | http://.../#EXTENSION_DEPLOYABLE# 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/java/com/trivadis/sqldev/example52/ExampleResources.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example52; 2 | 3 | import java.awt.Image; 4 | 5 | import javax.swing.Icon; 6 | 7 | import oracle.dbtools.raptor.utils.MessagesBase; 8 | 9 | public class ExampleResources extends MessagesBase { 10 | 11 | private static final ClassLoader CLASS_LOADER = ExampleResources.class.getClassLoader(); 12 | private static final String CLASS_NAME = ExampleResources.class.getCanonicalName(); 13 | private static final ExampleResources INSTANCE = new ExampleResources(); 14 | 15 | private ExampleResources() { 16 | super(CLASS_NAME, CLASS_LOADER); 17 | } 18 | 19 | public static String getString( String key ) { 20 | return INSTANCE.getStringImpl(key); 21 | } 22 | 23 | public static String get( String key ) { 24 | return getString(key); 25 | } 26 | 27 | public static Image getImage( String key ) { 28 | return INSTANCE.getImageImpl(key); 29 | } 30 | 31 | public static String format(String key, Object ... arguments) { 32 | return INSTANCE.formatImpl(key, arguments); 33 | } 34 | 35 | public static Icon getIcon(String key) { 36 | return INSTANCE.getIconImpl(key); 37 | } 38 | 39 | public static Integer getInteger(String key) { 40 | return INSTANCE.getIntegerImpl(key); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/ExampleResources.properties: -------------------------------------------------------------------------------- 1 | # English (default) resources for extension com.trivadis.sqldev.example52 2 | 3 | # Externally used constants (pom.xml, bundle.xml, extension.xml, sqldeveloper.xml) 4 | EXTENSION_NAME=Example 52 for SQL Developer 5 | EXTENSION_DESCRIPTION=Example SQL Developer extension to bundle multiple, multilingual XML extensions. 6 | EXTENSION_OWNER=Philipp Salvisberg 7 | MIN_SQLDEV_VERSION=17.4.0.355.2349 8 | 9 | # Icons 10 | BEER_ICON=/com/trivadis/sqldev/example52/images/beer.png 11 | CAFFEINATED_ICON=/com/trivadis/sqldev/example52/images/caffeinated.png 12 | COCOLATE_ICON=/com/trivadis/sqldev/example52/images/chocolate.png 13 | CIDER_ICON=/com/trivadis/sqldev/example52/images/cider.png 14 | DISTILLED_ICON=/com/trivadis/sqldev/example52/images/distilled.png 15 | DRINKS_ICON=/com/trivadis/sqldev/example52/images/drinks.png 16 | HARD_SODA_ICON=/com/trivadis/sqldev/example52/images/hard-soda.png 17 | SOFT_DRINK_FOLDER_ICON=/com/trivadis/sqldev/example52/images/soft-drink-folder.png 18 | SOFT_DRINK_ICON=/com/trivadis/sqldev/example52/images/soft-drink.png 19 | WINE_ICON=/com/trivadis/sqldev/example52/images/wine.png 20 | 21 | # Labels in navigator 22 | BEER_LABEL=Beer 23 | CAFFEINATED_LABEL=Caffeinated 24 | COCOLATE_LABEL=Cocolate 25 | CIDER_LABEL=Cider 26 | DISTILLED_LABEL=Distilled 27 | DRINKS_LABEL=Drinks 28 | HARD_SODA_LABEL=Hard soda 29 | SOFT_DRINK_FOLDER_LABEL=Soft drinks 30 | WINE_LABEL=Wine 31 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/ExampleResources_de.properties: -------------------------------------------------------------------------------- 1 | # German resources for extension com.trivadis.sqldev.example52 2 | # Even umlauts must be escaped, if property files are not encoded in ISO 8859-1 (e.g. UTF8). 3 | 4 | # Labels in navigator 5 | BEER_LABEL=Bier 6 | CAFFEINATED_LABEL=Koffeinhaltig 7 | COCOLATE_LABEL=Schokolade 8 | CIDER_LABEL=Apfelwein 9 | DISTILLED_LABEL=Destiliert 10 | DRINKS_LABEL=Getr\u00E4nke 11 | HARD_SODA_LABEL=Alcopops 12 | SOFT_DRINK_FOLDER_LABEL=S\u00FCssgetr\u00E4nke 13 | SOFT_DRINK_LABEL=S\u00FCssgetr\u00E4nk 14 | WINE_LABEL=Wine 15 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/action/ctas_plsql.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Create Table as Select... 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 32 | 33 | Copy a table. Completely or a chosen subset in percent. 34 | 35 | Confirmation 36 | Table "#OBJECT_NAME#" has been copied to #0#. 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/action/ctas_plsql_de.xliff: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Create Table as Select... 7 | Erstelle Tabelle via Select... 8 | 9 | 10 | New Table Name 11 | Neuer Name 12 | 13 | 14 | Rows in Percent 15 | Zeilen in Prozent 16 | 17 | 18 | Sample Data (Random)? 19 | Beispieldaten (zufällig)? 20 | 21 | 22 | Copy a table. Completely or a chosen subset in percent. 23 | Kopieren einer Tabelle. Komplett oder eine ausgewählte Teilmenge in Prozent. 24 | 25 | 26 | Table "#OBJECT_NAME#" has been copied to #0#. 27 | Die Tabelle "#OBJECT_NAME#" wurde nach #0# kopiert. 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/editor/drinks-editors_de.xliff: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Nutrition 100ml 7 | Nährwertangaben 100ml 8 | 9 | 10 | Ingredients 11 | Zutaten 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/editor/properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/editor/properties_de.xliff: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Properties 7 | Eigenschaften 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/beer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/beer.png -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/caffeinated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/caffeinated.png -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/chocolate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/chocolate.png -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/cider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/cider.png -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/distilled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/distilled.png -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/drinks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/drinks.png -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/hard-soda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/hard-soda.png -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/soft-drink-folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/soft-drink-folder.png -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/soft-drink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/soft-drink.png -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/wine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/images/wine.png -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/navigator/drinks-navigator.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 162 | 163 | 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/report/all_objects.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/052_bundled_multilingual/src/main/resources/com/trivadis/sqldev/example52/report/all_objects_de.xliff: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Objects 7 | Alle Objekte 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/060_menubar/bundle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #EXTENSION_NAME# 4 | #EXTENSION_VERSION# 5 | #EXTENSION_OWNER# 6 | https://www.salvis.com/blog/ 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/060_menubar/sqldev_assembly.xml: -------------------------------------------------------------------------------- 1 | 3 | bin 4 | 5 | zip 6 | 7 | false 8 | 9 | 10 | ${project.build.directory} 11 | ${file.separator} 12 | 13 | ${project.name}.jar 14 | 15 | 16 | 17 | ${project.build.directory} 18 | ${file.separator}META-INF 19 | 20 | bundle.xml 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/060_menubar/sqldeveloper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #EXTENSION_NAME# 5 | #EXTENSION_VERSION# 6 | #EXTENSION_OWNER# 7 | https://github.com/PhilippSalvisberg/plscope-utils/ 8 | 9 | http://.../#EXTENSION_DEPLOYABLE# 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/060_menubar/src/main/java/com/trivadis/sqldev/example60/ExampleController.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example60; 2 | 3 | import javax.swing.JOptionPane; 4 | 5 | import oracle.ide.Context; 6 | import oracle.ide.Ide; 7 | import oracle.ide.controller.Controller; 8 | import oracle.ide.controller.IdeAction; 9 | 10 | public class ExampleController implements Controller { 11 | 12 | private static final int EXAMPLE_VIEW_MENU_1_CMD_ID = Ide.findOrCreateCmdID("EXAMPLE_VIEW_MENU_1_ACTION_ID"); 13 | private static final int EXAMPLE_VIEW_MENU_2_CMD_ID = Ide.findOrCreateCmdID("EXAMPLE_VIEW_MENU_2_ACTION_ID"); 14 | private static final int EXAMPLE_VIEW_MENU_3_CMD_ID = Ide.findOrCreateCmdID("EXAMPLE_VIEW_MENU_3_ACTION_ID"); 15 | 16 | public ExampleController() { 17 | super(); 18 | } 19 | 20 | private void show (String message) { 21 | JOptionPane.showMessageDialog(null, message, ExampleResources.getString("DIALOG_SHOW_TITLE"), JOptionPane.INFORMATION_MESSAGE); 22 | } 23 | 24 | @Override 25 | public boolean handleEvent(IdeAction action, Context context) { 26 | int cmdId = action.getCommandId(); 27 | if (cmdId == EXAMPLE_VIEW_MENU_1_CMD_ID) { 28 | show("View menu item 1"); 29 | } else if (cmdId == EXAMPLE_VIEW_MENU_2_CMD_ID) { 30 | show("View menu item 2"); 31 | } else if (cmdId == EXAMPLE_VIEW_MENU_3_CMD_ID) { 32 | show("View menu item 3"); 33 | } else { 34 | show("Action CmdID: " + cmdId + " Name: " + action.getValue("Name")); 35 | } 36 | return true; 37 | } 38 | 39 | @Override 40 | public boolean update(IdeAction action, Context context) { 41 | action.setEnabled(true); 42 | return action.isEnabled(); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /examples/060_menubar/src/main/java/com/trivadis/sqldev/example60/ExampleResources.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example60; 2 | 3 | import java.awt.Image; 4 | 5 | import javax.swing.Icon; 6 | 7 | import oracle.dbtools.raptor.utils.MessagesBase; 8 | 9 | public class ExampleResources extends MessagesBase { 10 | 11 | private static final ClassLoader CLASS_LOADER = ExampleResources.class.getClassLoader(); 12 | private static final String CLASS_NAME = ExampleResources.class.getCanonicalName(); 13 | private static final ExampleResources INSTANCE = new ExampleResources(); 14 | 15 | private ExampleResources() { 16 | super(CLASS_NAME, CLASS_LOADER); 17 | } 18 | 19 | public static String getString( String key ) { 20 | return INSTANCE.getStringImpl(key); 21 | } 22 | 23 | public static String get( String key ) { 24 | return getString(key); 25 | } 26 | 27 | public static Image getImage( String key ) { 28 | return INSTANCE.getImageImpl(key); 29 | } 30 | 31 | public static String format(String key, Object ... arguments) { 32 | return INSTANCE.formatImpl(key, arguments); 33 | } 34 | 35 | public static Icon getIcon(String key) { 36 | return INSTANCE.getIconImpl(key); 37 | } 38 | 39 | public static Integer getInteger(String key) { 40 | return INSTANCE.getIntegerImpl(key); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /examples/060_menubar/src/main/resources/com/trivadis/sqldev/example60/ExampleResources.properties: -------------------------------------------------------------------------------- 1 | # English (default) resources for extension com.trivadis.sqldev.example60 2 | 3 | # Externally used constants (pom.xml, bundle.xml, extension.xml, sqldeveloper.xml) 4 | EXTENSION_NAME=Example 60 for SQL Developer 5 | EXTENSION_DESCRIPTION=Example SQL Developer extension to extend the menu bar. 6 | EXTENSION_OWNER=Philipp Salvisberg 7 | MIN_SQLDEV_VERSION=17.4.0.355.2349 8 | 9 | # Icons 10 | ONE_ICON=/com/trivadis/sqldev/example60/images/one.png 11 | TWO_ICON=/com/trivadis/sqldev/example60/images/two.png 12 | THREE_ICON=/com/trivadis/sqldev/example60/images/three.png 13 | 14 | # Labels in menu 15 | EXAMPLE_FILE_MENU_1_LABEL=File menu item 1 16 | EXAMPLE_EDIT_MENU_1_LABEL=Edit menu item 1 17 | EXAMPLE_VIEW_MENU_1_LABEL=View menu item 1 18 | EXAMPLE_VIEW_MENU_2_LABEL=View menu item 2 19 | EXAMPLE_VIEW_MENU_3_LABEL=View menu item 3 20 | EXAMPLE_NAVIGATE_MENU_1_LABEL=Navigate menu item 1 21 | EXAMPLE_RUN_MENU_1_LABEL=Run menu item 1 22 | EXAMPLE_TEAM_MENU_1_LABEL=Team menu item 1 23 | EXAMPLE_TOOLS_MENU_1_LABEL=Tools menu item 1 24 | EXAMPLE_WINDOW_MENU_1_LABEL=Window menu item 1 25 | EXAMPLE_HELP_MENU_1_LABEL=Help menu item 1 26 | EXAMPLE_CUSTOM_MENU_LABEL=Custom 27 | EXAMPLE_CUSTOM_MENU_1_LABEL=Custom menu item 1 28 | EXAMPLE_CUSTOM_MENU_2_LABEL=Custom menu item 2 29 | EXAMPLE_CUSTOM_MENU_3_LABEL=Custom menu item 3 30 | EXAMPLE_CUSTOM_SUBMENU_LABEL=Custom submenu 31 | EXAMPLE_CUSTOM_SUBMENU_1_LABEL=Custom submenu item 1 32 | EXAMPLE_CUSTOM_SUBMENU_2_LABEL=Custom submenu item 2 33 | EXAMPLE_CUSTOM_SUBMENU_3_LABEL=Custom submenu item 3 34 | 35 | # Dialog 36 | DIALOG_SHOW_TITLE=Action event handled 37 | -------------------------------------------------------------------------------- /examples/060_menubar/src/main/resources/com/trivadis/sqldev/example60/accelerators.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | control shift A 5 | 6 | 7 | 8 | 9 | meta shift W 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/060_menubar/src/main/resources/com/trivadis/sqldev/example60/images/one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/060_menubar/src/main/resources/com/trivadis/sqldev/example60/images/one.png -------------------------------------------------------------------------------- /examples/060_menubar/src/main/resources/com/trivadis/sqldev/example60/images/three.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/060_menubar/src/main/resources/com/trivadis/sqldev/example60/images/three.png -------------------------------------------------------------------------------- /examples/060_menubar/src/main/resources/com/trivadis/sqldev/example60/images/two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/060_menubar/src/main/resources/com/trivadis/sqldev/example60/images/two.png -------------------------------------------------------------------------------- /examples/070_toolbar/bundle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #EXTENSION_NAME# 4 | #EXTENSION_VERSION# 5 | #EXTENSION_OWNER# 6 | https://www.salvis.com/blog/ 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/070_toolbar/extension.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | db-category 9 | #EXTENSION_NAME# 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | ${EXAMPLE_TOOLBAR_LABEL} 23 | res:${ONE_ICON} 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
40 | 41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | -------------------------------------------------------------------------------- /examples/070_toolbar/sqldev_assembly.xml: -------------------------------------------------------------------------------- 1 | 3 | bin 4 | 5 | zip 6 | 7 | false 8 | 9 | 10 | ${project.build.directory} 11 | ${file.separator} 12 | 13 | ${project.name}.jar 14 | 15 | 16 | 17 | ${project.build.directory} 18 | ${file.separator}META-INF 19 | 20 | bundle.xml 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/070_toolbar/sqldeveloper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #EXTENSION_NAME# 5 | #EXTENSION_VERSION# 6 | #EXTENSION_OWNER# 7 | https://github.com/PhilippSalvisberg/plscope-utils/ 8 | 9 | http://.../#EXTENSION_DEPLOYABLE# 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/070_toolbar/src/main/java/com/trivadis/sqldev/example70/ExampleController.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example70; 2 | 3 | import javax.swing.JOptionPane; 4 | 5 | import oracle.ide.Context; 6 | import oracle.ide.controller.Controller; 7 | import oracle.ide.controller.IdeAction; 8 | 9 | public class ExampleController implements Controller { 10 | 11 | public ExampleController() { 12 | super(); 13 | } 14 | 15 | private void show (String message) { 16 | JOptionPane.showMessageDialog(null, message, ExampleResources.getString("DIALOG_SHOW_TITLE"), JOptionPane.INFORMATION_MESSAGE); 17 | } 18 | 19 | @Override 20 | public boolean handleEvent(IdeAction action, Context context) { 21 | show("Action Name: " + action.getValue("Name")); 22 | return true; 23 | } 24 | 25 | @Override 26 | public boolean update(IdeAction action, Context context) { 27 | action.setEnabled(true); 28 | return action.isEnabled(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /examples/070_toolbar/src/main/java/com/trivadis/sqldev/example70/ExampleResources.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example70; 2 | 3 | import java.awt.Image; 4 | 5 | import javax.swing.Icon; 6 | 7 | import oracle.dbtools.raptor.utils.MessagesBase; 8 | 9 | public class ExampleResources extends MessagesBase { 10 | 11 | private static final ClassLoader CLASS_LOADER = ExampleResources.class.getClassLoader(); 12 | private static final String CLASS_NAME = ExampleResources.class.getCanonicalName(); 13 | private static final ExampleResources INSTANCE = new ExampleResources(); 14 | 15 | private ExampleResources() { 16 | super(CLASS_NAME, CLASS_LOADER); 17 | } 18 | 19 | public static String getString( String key ) { 20 | return INSTANCE.getStringImpl(key); 21 | } 22 | 23 | public static String get( String key ) { 24 | return getString(key); 25 | } 26 | 27 | public static Image getImage( String key ) { 28 | return INSTANCE.getImageImpl(key); 29 | } 30 | 31 | public static String format(String key, Object ... arguments) { 32 | return INSTANCE.formatImpl(key, arguments); 33 | } 34 | 35 | public static Icon getIcon(String key) { 36 | return INSTANCE.getIconImpl(key); 37 | } 38 | 39 | public static Integer getInteger(String key) { 40 | return INSTANCE.getIntegerImpl(key); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /examples/070_toolbar/src/main/resources/com/trivadis/sqldev/example70/ExampleResources.properties: -------------------------------------------------------------------------------- 1 | # English (default) resources for extension com.trivadis.sqldev.example70 2 | 3 | # Externally used constants (pom.xml, bundle.xml, extension.xml, sqldeveloper.xml) 4 | EXTENSION_NAME=Example 70 for SQL Developer 5 | EXTENSION_DESCRIPTION=Example SQL Developer extension to extend the toolbar. 6 | EXTENSION_OWNER=Philipp Salvisberg 7 | MIN_SQLDEV_VERSION=17.4.0.355.2349 8 | 9 | # Icons 10 | ONE_ICON=/com/trivadis/sqldev/example70/images/one.png 11 | 12 | # Labels in menu 13 | EXAMPLE_TOOLBAR_LABEL=Toolbar item 14 | 15 | # Dialog 16 | DIALOG_SHOW_TITLE=Action event handled 17 | -------------------------------------------------------------------------------- /examples/070_toolbar/src/main/resources/com/trivadis/sqldev/example70/images/one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/070_toolbar/src/main/resources/com/trivadis/sqldev/example70/images/one.png -------------------------------------------------------------------------------- /examples/080_context_menu/bundle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #EXTENSION_NAME# 4 | #EXTENSION_VERSION# 5 | #EXTENSION_OWNER# 6 | https://www.salvis.com/blog/ 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/080_context_menu/extension.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | db-category 9 | #EXTENSION_NAME# 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | ${EXAMPLE_CONTEXT_MENU_1_LABEL} 31 | res:${ONE_ICON} 32 | 33 | 34 | 35 | 36 | ${EXAMPLE_CONTEXT_MENU_2_LABEL} 37 | res:${TWO_ICON} 38 | Code-Editor 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 |
57 | 58 |
59 |
60 |
61 | 62 | 63 | 64 |
66 | 67 |
68 |
69 |
70 |
71 |
72 |
73 | -------------------------------------------------------------------------------- /examples/080_context_menu/sqldev_assembly.xml: -------------------------------------------------------------------------------- 1 | 3 | bin 4 | 5 | zip 6 | 7 | false 8 | 9 | 10 | ${project.build.directory} 11 | ${file.separator} 12 | 13 | ${project.name}.jar 14 | 15 | 16 | 17 | ${project.build.directory} 18 | ${file.separator}META-INF 19 | 20 | bundle.xml 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/080_context_menu/sqldeveloper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #EXTENSION_NAME# 5 | #EXTENSION_VERSION# 6 | #EXTENSION_OWNER# 7 | https://github.com/PhilippSalvisberg/plscope-utils/ 8 | 9 | http://.../#EXTENSION_DEPLOYABLE# 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/080_context_menu/src/main/java/com/trivadis/sqldev/example80/ExampleController.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example80; 2 | 3 | import java.sql.Connection; 4 | import java.sql.SQLException; 5 | import java.util.logging.Logger; 6 | 7 | import javax.swing.JEditorPane; 8 | import javax.swing.JOptionPane; 9 | 10 | import oracle.dbtools.raptor.utils.Connections; 11 | import oracle.ide.Context; 12 | import oracle.ide.Ide; 13 | import oracle.ide.controller.Controller; 14 | import oracle.ide.controller.IdeAction; 15 | import oracle.ide.editor.Editor; 16 | import oracle.javatools.db.DBException; 17 | 18 | public class ExampleController implements Controller { 19 | 20 | private static final Logger logger = Logger.getLogger(ExampleController.class.getName()); 21 | private static final int EXAMPLE_CONTEXT_MENU_1_CMD_ID = Ide.findOrCreateCmdID("EXAMPLE_CONTEXT_MENU_1_ACTION_ID"); 22 | private static final int EXAMPLE_CONTEXT_MENU_2_CMD_ID = Ide.findOrCreateCmdID("EXAMPLE_CONTEXT_MENU_2_ACTION_ID"); 23 | 24 | public ExampleController() { 25 | super(); 26 | } 27 | 28 | private void show (String message) { 29 | JOptionPane.showMessageDialog(null, message, ExampleResources.getString("DIALOG_SHOW_TITLE"), JOptionPane.INFORMATION_MESSAGE); 30 | } 31 | 32 | private void handleConnection(Context context) { 33 | class AsyncRunner implements Runnable { 34 | Context context; 35 | AsyncRunner(Context context) { 36 | this.context = context; 37 | } 38 | public void run() { 39 | final String connName = (String) context.getProperty("ObjectAction.CONN_NAME"); 40 | Connections conns = null; 41 | try { 42 | conns = Connections.getInstance(); 43 | } catch (Throwable e) { 44 | // this happens with wrong/incomplete bundle dependencies/imports in pom.xml 45 | logger.severe("Cannot get Connections. Got error " + e); 46 | show("Connection " + connName + "\nGot error: " + e); 47 | return; 48 | } 49 | String schema; 50 | String password; 51 | String customUrl; 52 | String productName; 53 | String productVersion; 54 | logger.fine("connName: " + connName); 55 | try { 56 | Connection conn = conns.getConnection(connName); 57 | productName = conn.getMetaData().getDatabaseProductName(); 58 | productVersion = conn.getMetaData().getDatabaseProductVersion(); 59 | schema = conn.getSchema(); 60 | password = conns.getConnectionInfo(connName).getProperty("password"); 61 | customUrl = conns.getConnectionInfo(connName).getProperty("customUrl"); 62 | } catch (DBException | SQLException e) { 63 | logger.severe("got error: " + e); 64 | return; 65 | } 66 | final String message = "Connected to " 67 | + schema + "/"+ password 68 | + customUrl.substring(customUrl.indexOf("@")) + "\n\n" 69 | + "using " + productName + " " + productVersion + "."; 70 | show(message); 71 | } 72 | } 73 | Thread t = new Thread(new AsyncRunner(context)); 74 | t.start(); 75 | } 76 | 77 | private void handleEditor(Context context) { 78 | final Editor editor = (Editor) context.getView(); 79 | final JEditorPane pane = (JEditorPane) editor.getDefaultFocusComponent(); 80 | final String text = pane.getText(); 81 | final int numChars = text.length(); 82 | final int numLines = text.split(System.getProperty("line.separator")).length; 83 | final int pos = pane.getCaretPosition(); 84 | final String message = "Editor '" + editor.getTabDescription() + "'\n" 85 | + "is at position " + pos + ".\n" 86 | + "Text has " + numChars + " characters and " + numLines + " lines."; 87 | show(message); 88 | } 89 | 90 | @Override 91 | public boolean handleEvent(IdeAction action, Context context) { 92 | int cmdId = action.getCommandId(); 93 | if (cmdId == EXAMPLE_CONTEXT_MENU_1_CMD_ID) { 94 | handleConnection(context); 95 | } else if (cmdId == EXAMPLE_CONTEXT_MENU_2_CMD_ID) { 96 | handleEditor(context); 97 | } else { 98 | return false; 99 | } 100 | return true; 101 | } 102 | 103 | @Override 104 | public boolean update(IdeAction action, Context context) { 105 | action.setEnabled(true); 106 | return action.isEnabled(); 107 | } 108 | 109 | } 110 | -------------------------------------------------------------------------------- /examples/080_context_menu/src/main/java/com/trivadis/sqldev/example80/ExampleResources.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example80; 2 | 3 | import java.awt.Image; 4 | 5 | import javax.swing.Icon; 6 | 7 | import oracle.dbtools.raptor.utils.MessagesBase; 8 | 9 | public class ExampleResources extends MessagesBase { 10 | 11 | private static final ClassLoader CLASS_LOADER = ExampleResources.class.getClassLoader(); 12 | private static final String CLASS_NAME = ExampleResources.class.getCanonicalName(); 13 | private static final ExampleResources INSTANCE = new ExampleResources(); 14 | 15 | private ExampleResources() { 16 | super(CLASS_NAME, CLASS_LOADER); 17 | } 18 | 19 | public static String getString( String key ) { 20 | return INSTANCE.getStringImpl(key); 21 | } 22 | 23 | public static String get( String key ) { 24 | return getString(key); 25 | } 26 | 27 | public static Image getImage( String key ) { 28 | return INSTANCE.getImageImpl(key); 29 | } 30 | 31 | public static String format(String key, Object ... arguments) { 32 | return INSTANCE.formatImpl(key, arguments); 33 | } 34 | 35 | public static Icon getIcon(String key) { 36 | return INSTANCE.getIconImpl(key); 37 | } 38 | 39 | public static Integer getInteger(String key) { 40 | return INSTANCE.getIntegerImpl(key); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /examples/080_context_menu/src/main/resources/com/trivadis/sqldev/example80/ExampleResources.properties: -------------------------------------------------------------------------------- 1 | # English (default) resources for extension com.trivadis.sqldev.example80 2 | 3 | # Externally used constants (pom.xml, bundle.xml, extension.xml, sqldeveloper.xml) 4 | EXTENSION_NAME=Example 80 for SQL Developer 5 | EXTENSION_DESCRIPTION=Example SQL Developer extension to add context menu items. 6 | EXTENSION_OWNER=Philipp Salvisberg 7 | MIN_SQLDEV_VERSION=17.4.0.355.2349 8 | 9 | # Icons 10 | ONE_ICON=/com/trivadis/sqldev/example80/images/one.png 11 | TWO_ICON=/com/trivadis/sqldev/example80/images/two.png 12 | 13 | # Labels in menu 14 | EXAMPLE_CONTEXT_MENU_1_LABEL=Context menu item 1 15 | EXAMPLE_CONTEXT_MENU_2_LABEL=Context menu item 2 16 | 17 | # Dialog 18 | DIALOG_SHOW_TITLE=Action event handled 19 | -------------------------------------------------------------------------------- /examples/080_context_menu/src/main/resources/com/trivadis/sqldev/example80/images/one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/080_context_menu/src/main/resources/com/trivadis/sqldev/example80/images/one.png -------------------------------------------------------------------------------- /examples/080_context_menu/src/main/resources/com/trivadis/sqldev/example80/images/two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/080_context_menu/src/main/resources/com/trivadis/sqldev/example80/images/two.png -------------------------------------------------------------------------------- /examples/090_preferences/bundle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #EXTENSION_NAME# 4 | #EXTENSION_VERSION# 5 | #EXTENSION_OWNER# 6 | https://www.salvis.com/blog/ 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/090_preferences/extension.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | db-category 9 | #EXTENSION_NAME# 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | ${EXAMPLE_CONTEXT_MENU_1_LABEL} 31 | res:${ONE_ICON} 32 | 33 | 34 | 35 | 36 | ${EXAMPLE_CONTEXT_MENU_2_LABEL} 37 | res:${TWO_ICON} 38 | Code-Editor 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 |
57 | 58 |
59 |
60 |
61 | 62 | 63 | 64 |
66 | 67 |
68 |
69 |
70 | 71 | 72 | 73 | com.trivadis.sqldev.example90.PreferencePanel 74 | 75 | 76 |
77 |
78 |
79 | -------------------------------------------------------------------------------- /examples/090_preferences/sqldev_assembly.xml: -------------------------------------------------------------------------------- 1 | 3 | bin 4 | 5 | zip 6 | 7 | false 8 | 9 | 10 | ${project.build.directory} 11 | ${file.separator} 12 | 13 | ${project.name}.jar 14 | 15 | 16 | 17 | ${project.build.directory} 18 | ${file.separator}META-INF 19 | 20 | bundle.xml 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/090_preferences/sqldeveloper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #EXTENSION_NAME# 5 | #EXTENSION_VERSION# 6 | #EXTENSION_OWNER# 7 | https://github.com/PhilippSalvisberg/plscope-utils/ 8 | 9 | http://.../#EXTENSION_DEPLOYABLE# 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/090_preferences/src/main/java/com/trivadis/sqldev/example90/ExampleController.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example90; 2 | 3 | import java.sql.Connection; 4 | import java.sql.SQLException; 5 | import java.util.logging.Logger; 6 | 7 | import javax.swing.JEditorPane; 8 | import javax.swing.JOptionPane; 9 | 10 | import oracle.dbtools.raptor.utils.Connections; 11 | import oracle.ide.Context; 12 | import oracle.ide.Ide; 13 | import oracle.ide.config.Preferences; 14 | import oracle.ide.controller.Controller; 15 | import oracle.ide.controller.IdeAction; 16 | import oracle.ide.editor.Editor; 17 | import oracle.javatools.db.DBException; 18 | 19 | public class ExampleController implements Controller { 20 | 21 | private static final Logger logger = Logger.getLogger(ExampleController.class.getName()); 22 | private static final int EXAMPLE_CONTEXT_MENU_1_CMD_ID = Ide.findOrCreateCmdID("EXAMPLE_CONTEXT_MENU_1_ACTION_ID"); 23 | private static final int EXAMPLE_CONTEXT_MENU_2_CMD_ID = Ide.findOrCreateCmdID("EXAMPLE_CONTEXT_MENU_2_ACTION_ID"); 24 | 25 | public ExampleController() { 26 | super(); 27 | } 28 | 29 | private void show (String message) { 30 | JOptionPane.showMessageDialog(null, message, ExampleResources.getString("DIALOG_SHOW_TITLE"), JOptionPane.INFORMATION_MESSAGE); 31 | } 32 | 33 | private void handleConnection(Context context) { 34 | class AsyncRunner implements Runnable { 35 | Context context; 36 | AsyncRunner(Context context) { 37 | this.context = context; 38 | } 39 | public void run() { 40 | final String connName = (String) context.getProperty("ObjectAction.CONN_NAME"); 41 | Connections conns = null; 42 | try { 43 | conns = Connections.getInstance(); 44 | } catch (Throwable e) { 45 | // this happens with wrong/incomplete bundle dependencies/imports in pom.xml 46 | logger.severe("Cannot get Connections. Got error " + e); 47 | show("Connection " + connName + "\nGot error: " + e); 48 | return; 49 | } 50 | PreferenceModel preferences = PreferenceModel.getInstance(Preferences.getPreferences()); 51 | String schema; 52 | String password; 53 | String customUrl; 54 | String productName; 55 | String productVersion; 56 | logger.fine("connName: " + connName); 57 | try { 58 | schema = conns.getConnectionInfo(connName).getProperty("user");; 59 | if (preferences.isShowPassword()) { 60 | password = conns.getConnectionInfo(connName).getProperty("password"); 61 | } else { 62 | password = "***"; 63 | } 64 | customUrl = conns.getConnectionInfo(connName).getProperty("customUrl"); 65 | if (conns.isConnectionOpen(connName) || preferences.isImplicitConnect()) { 66 | Connection conn = conns.getConnection(connName); 67 | productName = conn.getMetaData().getDatabaseProductName(); 68 | productVersion = conn.getMetaData().getDatabaseProductVersion(); 69 | } else { 70 | productName = "?"; 71 | productVersion = "(not connected)"; 72 | } 73 | 74 | } catch (DBException | SQLException e) { 75 | logger.severe("got error: " + e); 76 | return; 77 | } 78 | final String message = "Connected to " 79 | + schema + "/"+ password 80 | + customUrl.substring(customUrl.indexOf("@")) + "\n\n" 81 | + "using " + productName + " " + productVersion + "."; 82 | show(message); 83 | } 84 | } 85 | Thread t = new Thread(new AsyncRunner(context)); 86 | t.start(); 87 | } 88 | 89 | private void handleEditor(Context context) { 90 | final Editor editor = (Editor) context.getView(); 91 | final JEditorPane pane = (JEditorPane) editor.getDefaultFocusComponent(); 92 | final String text = pane.getText(); 93 | final int numChars = text.length(); 94 | final int numLines = text.split(System.getProperty("line.separator")).length; 95 | final int pos = pane.getCaretPosition(); 96 | final String message = "Editor '" + editor.getTabDescription() + "'\n" 97 | + "is at position " + pos + ".\n" 98 | + "Text has " + numChars + " characters and " + numLines + " lines."; 99 | show(message); 100 | } 101 | 102 | @Override 103 | public boolean handleEvent(IdeAction action, Context context) { 104 | int cmdId = action.getCommandId(); 105 | if (cmdId == EXAMPLE_CONTEXT_MENU_1_CMD_ID) { 106 | handleConnection(context); 107 | } else if (cmdId == EXAMPLE_CONTEXT_MENU_2_CMD_ID) { 108 | handleEditor(context); 109 | } else { 110 | return false; 111 | } 112 | return true; 113 | } 114 | 115 | @Override 116 | public boolean update(IdeAction action, Context context) { 117 | action.setEnabled(true); 118 | return action.isEnabled(); 119 | } 120 | 121 | } 122 | -------------------------------------------------------------------------------- /examples/090_preferences/src/main/java/com/trivadis/sqldev/example90/ExampleResources.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example90; 2 | 3 | import java.awt.Image; 4 | 5 | import javax.swing.Icon; 6 | 7 | import oracle.dbtools.raptor.utils.MessagesBase; 8 | 9 | public class ExampleResources extends MessagesBase { 10 | 11 | private static final ClassLoader CLASS_LOADER = ExampleResources.class.getClassLoader(); 12 | private static final String CLASS_NAME = ExampleResources.class.getCanonicalName(); 13 | private static final ExampleResources INSTANCE = new ExampleResources(); 14 | 15 | private ExampleResources() { 16 | super(CLASS_NAME, CLASS_LOADER); 17 | } 18 | 19 | public static String getString( String key ) { 20 | return INSTANCE.getStringImpl(key); 21 | } 22 | 23 | public static String get( String key ) { 24 | return getString(key); 25 | } 26 | 27 | public static Image getImage( String key ) { 28 | return INSTANCE.getImageImpl(key); 29 | } 30 | 31 | public static String format(String key, Object ... arguments) { 32 | return INSTANCE.formatImpl(key, arguments); 33 | } 34 | 35 | public static Icon getIcon(String key) { 36 | return INSTANCE.getIconImpl(key); 37 | } 38 | 39 | public static Integer getInteger(String key) { 40 | return INSTANCE.getIntegerImpl(key); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /examples/090_preferences/src/main/java/com/trivadis/sqldev/example90/PreferenceModel.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example90; 2 | 3 | import oracle.javatools.data.HashStructure; 4 | import oracle.javatools.data.HashStructureAdapter; 5 | import oracle.javatools.data.PropertyStorage; 6 | 7 | public class PreferenceModel extends HashStructureAdapter { 8 | 9 | private static final String DATA_KEY = "example90"; 10 | private static final String KEY_SHOW_PASSWORD = "showPassword"; 11 | private static final String KEY_IMPLICIT_CONNECT = "implicitConnect"; 12 | 13 | private PreferenceModel(final HashStructure hash) { 14 | super(hash); 15 | } 16 | 17 | public static PreferenceModel getInstance(final PropertyStorage prefs) { 18 | return new PreferenceModel(HashStructureAdapter.findOrCreate(prefs, PreferenceModel.DATA_KEY)); 19 | } 20 | 21 | public boolean isShowPassword() { 22 | return this.getHashStructure().getBoolean(PreferenceModel.KEY_SHOW_PASSWORD, true); 23 | } 24 | 25 | public void setShowPassword(final boolean showPassword) { 26 | this.getHashStructure().putBoolean(PreferenceModel.KEY_SHOW_PASSWORD, showPassword); 27 | } 28 | 29 | public boolean isImplicitConnect() { 30 | return this.getHashStructure().getBoolean(PreferenceModel.KEY_IMPLICIT_CONNECT, false); 31 | } 32 | 33 | public void setImplicitConnect(final boolean implicitConnect) { 34 | this.getHashStructure().putBoolean(PreferenceModel.KEY_IMPLICIT_CONNECT, implicitConnect); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /examples/090_preferences/src/main/java/com/trivadis/sqldev/example90/PreferencePanel.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example90; 2 | 3 | import javax.swing.JCheckBox; 4 | 5 | import oracle.ide.panels.DefaultTraversablePanel; 6 | import oracle.ide.panels.TraversableContext; 7 | import oracle.ide.panels.TraversalException; 8 | import oracle.javatools.ui.layout.FieldLayoutBuilder; 9 | 10 | public class PreferencePanel extends DefaultTraversablePanel { 11 | 12 | private static final long serialVersionUID = 1L; 13 | private final JCheckBox showPasswordCheckBox = new JCheckBox(); 14 | private final JCheckBox implicitConnectCheckBox = new JCheckBox(); 15 | 16 | public PreferencePanel() { 17 | this.layoutControls(); 18 | } 19 | 20 | private void layoutControls() { 21 | final FieldLayoutBuilder builder = new FieldLayoutBuilder(this); 22 | builder.setAlignLabelsLeft(true); 23 | builder.add(builder.field().label().withText(ExampleResources.getString("PREF_SHOW_PASSWORD_LABEL")) 24 | .component(showPasswordCheckBox)); 25 | builder.add(builder.field().label().withText(ExampleResources.getString("PREF_IMPLICIT_CONNECT_LABEL")) 26 | .component(implicitConnectCheckBox)); 27 | builder.addVerticalSpring(); 28 | } 29 | 30 | @Override 31 | public void onEntry(final TraversableContext tc) { 32 | PreferenceModel info = PreferencePanel.getUserInformation(tc); 33 | showPasswordCheckBox.setSelected(info.isShowPassword()); 34 | implicitConnectCheckBox.setSelected(info.isImplicitConnect()); 35 | super.onEntry(tc); 36 | } 37 | 38 | @Override 39 | public void onExit(final TraversableContext tc) throws TraversalException { 40 | PreferenceModel info = PreferencePanel.getUserInformation(tc); 41 | info.setShowPassword(showPasswordCheckBox.isSelected()); 42 | info.setImplicitConnect(implicitConnectCheckBox.isSelected()); 43 | super.onExit(tc); 44 | } 45 | 46 | private static PreferenceModel getUserInformation(final TraversableContext tc) { 47 | return PreferenceModel.getInstance(tc.getPropertyStorage()); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /examples/090_preferences/src/main/resources/com/trivadis/sqldev/example90/ExampleResources.properties: -------------------------------------------------------------------------------- 1 | # English (default) resources for extension com.trivadis.sqldev.example90 2 | 3 | # Externally used constants (pom.xml, bundle.xml, extension.xml, sqldeveloper.xml) 4 | EXTENSION_NAME=Example 90 for SQL Developer 5 | EXTENSION_DESCRIPTION=Example SQL Developer extension to add preferences for context menu actions. 6 | EXTENSION_OWNER=Philipp Salvisberg 7 | MIN_SQLDEV_VERSION=17.4.0.355.2349 8 | 9 | # Icons 10 | ONE_ICON=/com/trivadis/sqldev/example90/images/one.png 11 | TWO_ICON=/com/trivadis/sqldev/example90/images/two.png 12 | 13 | # Labels in menu 14 | EXAMPLE_CONTEXT_MENU_1_LABEL=Context menu item 1 15 | EXAMPLE_CONTEXT_MENU_2_LABEL=Context menu item 2 16 | 17 | # Dialog 18 | DIALOG_SHOW_TITLE=Action event handled 19 | 20 | # Preferences 21 | EXAMPLE_PREFERENCES_TITEL=Example 90 22 | PREF_SHOW_PASSWORD_LABEL=Show password? 23 | PREF_IMPLICIT_CONNECT_LABEL=Implicit connect? -------------------------------------------------------------------------------- /examples/090_preferences/src/main/resources/com/trivadis/sqldev/example90/images/one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/090_preferences/src/main/resources/com/trivadis/sqldev/example90/images/one.png -------------------------------------------------------------------------------- /examples/090_preferences/src/main/resources/com/trivadis/sqldev/example90/images/two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/090_preferences/src/main/resources/com/trivadis/sqldev/example90/images/two.png -------------------------------------------------------------------------------- /examples/100_dockable/bundle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #EXTENSION_NAME# 4 | #EXTENSION_VERSION# 5 | #EXTENSION_OWNER# 6 | https://www.salvis.com/blog/ 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/100_dockable/extension.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | db-category 9 | #EXTENSION_NAME# 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | ${EXAMPLE_VIEW_MENU_1_LABEL} 26 | res:${ONE_ICON} 27 | View 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 | 46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |
61 | -------------------------------------------------------------------------------- /examples/100_dockable/sqldev_assembly.xml: -------------------------------------------------------------------------------- 1 | 3 | bin 4 | 5 | zip 6 | 7 | false 8 | 9 | 10 | ${project.build.directory} 11 | ${file.separator} 12 | 13 | ${project.name}.jar 14 | 15 | 16 | 17 | ${project.build.directory} 18 | ${file.separator}META-INF 19 | 20 | bundle.xml 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/100_dockable/sqldeveloper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #EXTENSION_NAME# 5 | #EXTENSION_VERSION# 6 | #EXTENSION_OWNER# 7 | https://github.com/PhilippSalvisberg/plscope-utils/ 8 | 9 | http://.../#EXTENSION_DEPLOYABLE# 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/100_dockable/src/main/java/com/trivadis/sqldev/example100/ExampleController.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example100; 2 | 3 | import oracle.ide.Context; 4 | import oracle.ide.controller.Controller; 5 | import oracle.ide.controller.IdeAction; 6 | 7 | public class ExampleController implements Controller { 8 | 9 | public ExampleController() { 10 | super(); 11 | } 12 | 13 | @Override 14 | public boolean handleEvent(IdeAction action, Context context) { 15 | ExampleDockableFactory.showDockable(); 16 | return true; 17 | } 18 | 19 | @Override 20 | public boolean update(IdeAction action, Context context) { 21 | action.setEnabled(true); 22 | return action.isEnabled(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /examples/100_dockable/src/main/java/com/trivadis/sqldev/example100/ExampleDockable.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example100; 2 | 3 | import java.awt.BorderLayout; 4 | import java.awt.Component; 5 | 6 | import javax.swing.ImageIcon; 7 | import javax.swing.JLabel; 8 | import javax.swing.JPanel; 9 | import javax.swing.JScrollPane; 10 | 11 | import oracle.ide.docking.DockableWindow; 12 | import oracle.ide.layout.ViewId; 13 | 14 | public class ExampleDockable extends DockableWindow { 15 | 16 | private static final String VIEW_NAME = "EXAMPLE_VIEW"; 17 | public static final ViewId VIEW_ID = new ViewId(ExampleDockableFactory.FACTORY_NAME, VIEW_NAME); 18 | private ImageIcon icon; 19 | private JLabel label; 20 | private JScrollPane pane; 21 | private JPanel panel; 22 | 23 | @Override 24 | public String getTitleName() { 25 | return ExampleResources.getString("DOCKABLE_TITLE"); 26 | } 27 | 28 | @Override 29 | public Component getGUI() { 30 | if (icon == null) { 31 | initializeGUI(); 32 | } 33 | return panel; 34 | } 35 | 36 | private void initializeGUI() { 37 | icon = new ImageIcon(ExampleResources.getImage("BIG_ONE_ICON")); 38 | label = new JLabel(); 39 | label.setIcon(icon); 40 | label.setHorizontalAlignment(JLabel.CENTER); 41 | pane = new JScrollPane(label); 42 | panel = new JPanel(new BorderLayout()); 43 | panel.add(pane, BorderLayout.CENTER); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /examples/100_dockable/src/main/java/com/trivadis/sqldev/example100/ExampleDockableFactory.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example100; 2 | 3 | import oracle.ide.IdeConstants; 4 | import oracle.ide.docking.DockStation; 5 | import oracle.ide.docking.Dockable; 6 | import oracle.ide.docking.DockableFactory; 7 | import oracle.ide.docking.DockingParam; 8 | import oracle.ide.layout.ViewId; 9 | 10 | public class ExampleDockableFactory implements DockableFactory { 11 | 12 | private ExampleDockable dockable; 13 | public static final String FACTORY_NAME = "EXAMPLE_FACTORY"; 14 | 15 | 16 | @Override 17 | public void install() { 18 | final DockStation dockStation = DockStation.getDockStation(); 19 | DockingParam dp = new DockingParam(); 20 | dp.setPosition(IdeConstants.EAST); 21 | dockStation.dock(getLocalDockable(), dp); 22 | } 23 | 24 | @Override 25 | public Dockable getDockable(ViewId viewId) { 26 | if (ExampleDockable.VIEW_ID.equals(viewId)) { 27 | return getLocalDockable(); 28 | } 29 | return null; 30 | } 31 | 32 | private ExampleDockable getLocalDockable() { 33 | if (dockable == null) { 34 | dockable = new ExampleDockable(); 35 | } 36 | return dockable; 37 | } 38 | 39 | public static ExampleDockable getDockable() { 40 | final DockStation dockStation = DockStation.getDockStation(); 41 | final Dockable dockable = dockStation.findDockable(ExampleDockable.VIEW_ID); 42 | return (ExampleDockable)dockable; 43 | } 44 | 45 | 46 | public static void showDockable() { 47 | DockStation dockStation = DockStation.getDockStation(); 48 | dockStation.setDockableVisible(getDockable(), true); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /examples/100_dockable/src/main/java/com/trivadis/sqldev/example100/ExampleResources.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example100; 2 | 3 | import java.awt.Image; 4 | 5 | import javax.swing.Icon; 6 | 7 | import oracle.dbtools.raptor.utils.MessagesBase; 8 | 9 | public class ExampleResources extends MessagesBase { 10 | 11 | private static final ClassLoader CLASS_LOADER = ExampleResources.class.getClassLoader(); 12 | private static final String CLASS_NAME = ExampleResources.class.getCanonicalName(); 13 | private static final ExampleResources INSTANCE = new ExampleResources(); 14 | 15 | private ExampleResources() { 16 | super(CLASS_NAME, CLASS_LOADER); 17 | } 18 | 19 | public static String getString( String key ) { 20 | return INSTANCE.getStringImpl(key); 21 | } 22 | 23 | public static String get( String key ) { 24 | return getString(key); 25 | } 26 | 27 | public static Image getImage( String key ) { 28 | return INSTANCE.getImageImpl(key); 29 | } 30 | 31 | public static String format(String key, Object ... arguments) { 32 | return INSTANCE.formatImpl(key, arguments); 33 | } 34 | 35 | public static Icon getIcon(String key) { 36 | return INSTANCE.getIconImpl(key); 37 | } 38 | 39 | public static Integer getInteger(String key) { 40 | return INSTANCE.getIntegerImpl(key); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /examples/100_dockable/src/main/resources/com/trivadis/sqldev/example100/ExampleResources.properties: -------------------------------------------------------------------------------- 1 | # English (default) resources for extension com.trivadis.sqldev.example100 2 | 3 | # Externally used constants (pom.xml, bundle.xml, extension.xml, sqldeveloper.xml) 4 | EXTENSION_NAME=Example 100 for SQL Developer 5 | EXTENSION_DESCRIPTION=Example SQL Developer extension to add a dockable window via the menu bar. 6 | EXTENSION_OWNER=Philipp Salvisberg 7 | MIN_SQLDEV_VERSION=17.4.0.355.2349 8 | 9 | # Icons 10 | ONE_ICON=/com/trivadis/sqldev/example100/images/one.png 11 | BIG_ONE_ICON=/com/trivadis/sqldev/example100/images/big_one.png 12 | 13 | # Labels in menu 14 | EXAMPLE_VIEW_MENU_1_LABEL=View menu item 1 15 | 16 | # Dockable 17 | DOCKABLE_TITLE=Example Dockable Window 18 | -------------------------------------------------------------------------------- /examples/100_dockable/src/main/resources/com/trivadis/sqldev/example100/images/big_one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/100_dockable/src/main/resources/com/trivadis/sqldev/example100/images/big_one.png -------------------------------------------------------------------------------- /examples/100_dockable/src/main/resources/com/trivadis/sqldev/example100/images/one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/100_dockable/src/main/resources/com/trivadis/sqldev/example100/images/one.png -------------------------------------------------------------------------------- /examples/110_grid_table_menu/bundle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #EXTENSION_NAME# 4 | #EXTENSION_VERSION# 5 | #EXTENSION_OWNER# 6 | https://www.salvis.com/blog/ 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/110_grid_table_menu/extension.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 10 | 12 | db-category 13 | #EXTENSION_NAME# 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | ${EXAMPLE_CONTEXT_MENU_1_LABEL} 28 | res:${ONE_ICON} 29 | 30 | 31 | 32 | 33 | ${EXAMPLE_CONTEXT_MENU_2_LABEL} 34 | res:${TWO_ICON} 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 |
54 | 55 |
56 |
57 |
58 |
59 |
60 |
61 | 62 | 63 | 64 | 65 | 66 | com.trivadis.sqldev.example110.ExampleAddin 67 | 68 | 69 | 70 | 71 |
72 | -------------------------------------------------------------------------------- /examples/110_grid_table_menu/sqldev_assembly.xml: -------------------------------------------------------------------------------- 1 | 3 | bin 4 | 5 | zip 6 | 7 | false 8 | 9 | 10 | ${project.build.directory} 11 | ${file.separator} 12 | 13 | ${project.name}.jar 14 | 15 | 16 | 17 | ${project.build.directory} 18 | ${file.separator}META-INF 19 | 20 | bundle.xml 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/110_grid_table_menu/sqldeveloper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #EXTENSION_NAME# 5 | #EXTENSION_VERSION# 6 | #EXTENSION_OWNER# 7 | https://github.com/PhilippSalvisberg/plscope-utils/ 8 | 9 | http://.../#EXTENSION_DEPLOYABLE# 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/110_grid_table_menu/src/main/java/com/trivadis/sqldev/example110/ExampleAddin.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example110; 2 | 3 | import java.util.logging.Logger; 4 | 5 | import oracle.dbtools.raptor.controls.grid.RaptorGridTable; 6 | import oracle.dbtools.raptor.controls.grid.contextmenu.GridContextMenuItem; 7 | import oracle.ide.Addin; 8 | 9 | public class ExampleAddin implements Addin { 10 | 11 | private static final Logger logger = Logger.getLogger(ExampleAddin.class.getName()); 12 | 13 | @Override 14 | public void initialize() { 15 | GridContextMenuItem menuListener = new ExampleContextMenu(); 16 | RaptorGridTable.addGridContextMenu(menuListener); 17 | logger.fine("addin initialized."); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /examples/110_grid_table_menu/src/main/java/com/trivadis/sqldev/example110/ExampleContextMenu.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example110; 2 | 3 | import java.util.logging.Logger; 4 | 5 | import javax.swing.JMenu; 6 | 7 | import oracle.dbtools.raptor.controls.grid.RaptorGridTable; 8 | import oracle.dbtools.raptor.controls.grid.contextmenu.GridContextMenuItem; 9 | import oracle.ide.controller.ContextMenu; 10 | 11 | public class ExampleContextMenu extends GridContextMenuItem { 12 | 13 | private static final Logger logger = Logger.getLogger(ExampleContextMenu.class.getName()); 14 | private static RaptorGridTable gridTable; 15 | 16 | public static RaptorGridTable getContextGridTable() { 17 | // workaround to keep the selected table in case of parent/child reports 18 | return gridTable; 19 | } 20 | 21 | @Override 22 | protected boolean canShow(ContextMenu contextMenu) { 23 | gridTable = RaptorGridTable.getRaptorGridTable(contextMenu.getContext()); 24 | if (gridTable != null) { 25 | return true; 26 | } 27 | return false; 28 | } 29 | 30 | @Override 31 | protected void createAndShowMenu(ContextMenu contextMenu) { 32 | logger.fine("show context menu"); 33 | JMenu subMenu = contextMenu.createSubMenu(ExampleResources.getString("EXAMPLE_CONTEXT_SUBMENU_LABEL"),null,1,1); 34 | subMenu.add(contextMenu.createMenuItem(ExampleController.EXAMPLE_CONTEXT_MENU_1_ACTION)); 35 | subMenu.add(contextMenu.createMenuItem(ExampleController.EXAMPLE_CONTEXT_MENU_2_ACTION)); 36 | contextMenu.add(subMenu); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /examples/110_grid_table_menu/src/main/java/com/trivadis/sqldev/example110/ExampleController.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example110; 2 | 3 | import java.awt.Component; 4 | import java.util.logging.Logger; 5 | import java.util.stream.IntStream; 6 | 7 | import javax.swing.JOptionPane; 8 | 9 | import oracle.dbtools.raptor.controls.grid.RaptorGridTable; 10 | import oracle.dbtools.raptor.oviewer.xmleditor.XMLBasedEditor; 11 | import oracle.dbtools.worksheet.StatementRunnerResultsPanel; 12 | import oracle.dbtools.worksheet.WorksheetResultPanel; 13 | import oracle.dbtools.worksheet.editor.Worksheet; 14 | import oracle.ide.Context; 15 | import oracle.ide.Ide; 16 | import oracle.ide.controller.Controller; 17 | import oracle.ide.controller.IdeAction; 18 | import oracle.ide.view.View; 19 | 20 | public class ExampleController implements Controller { 21 | 22 | private static final Logger logger = Logger.getLogger(ExampleController.class.getName()); 23 | private static final int EXAMPLE_CONTEXT_MENU_1_CMD_ID = Ide.findOrCreateCmdID("EXAMPLE_CONTEXT_MENU_1_ACTION_ID"); 24 | private static final int EXAMPLE_CONTEXT_MENU_2_CMD_ID = Ide.findOrCreateCmdID("EXAMPLE_CONTEXT_MENU_2_ACTION_ID"); 25 | public static final IdeAction EXAMPLE_CONTEXT_MENU_1_ACTION = IdeAction.get(EXAMPLE_CONTEXT_MENU_1_CMD_ID); 26 | public static final IdeAction EXAMPLE_CONTEXT_MENU_2_ACTION = IdeAction.get(EXAMPLE_CONTEXT_MENU_2_CMD_ID); 27 | 28 | public ExampleController() { 29 | super(); 30 | logger.fine("controller initialized."); 31 | } 32 | 33 | private static String getSelectedValue(RaptorGridTable tab, boolean allValues) { 34 | StringBuffer sb = new StringBuffer(); 35 | int[] rows = tab.getCellSelectionEnabled() || tab.getRowSelectionAllowed() ? tab.getSelectedRows() 36 | : IntStream.range(0, tab.getRowCount()).toArray(); 37 | for (int selRow : rows) { 38 | int[] cols = tab.getCellSelectionEnabled() || tab.getColumnSelectionAllowed() ? tab.getSelectedColumns() 39 | : IntStream.range(0, tab.getColumnCount()).toArray(); 40 | for (int selCol : cols) { 41 | if (allValues || sb.length() == 0) { 42 | if (sb.length() > 0) { 43 | sb.append(", "); 44 | } 45 | sb.append(tab.getDisplayValueAt(selRow, selCol, -1)); 46 | } 47 | } 48 | sb.append("\n"); 49 | } 50 | return sb.toString(); 51 | } 52 | 53 | private static String getSelectedValue(Component component, boolean allValues) { 54 | if (component instanceof RaptorGridTable) { 55 | return getSelectedValue((RaptorGridTable)component, allValues); 56 | } 57 | return null; 58 | } 59 | 60 | private void show (String message, Context context, boolean allValues) { 61 | View view = context.getView(); 62 | Component viewGui = view.getGUI(); 63 | String selectedValue = null; 64 | if (viewGui instanceof RaptorGridTable) { 65 | selectedValue = getSelectedValue(viewGui, allValues); 66 | } else if (view instanceof XMLBasedEditor) { 67 | if (ExampleContextMenu.getContextGridTable() != null) { 68 | // parent or child table; the selected table is not available in the context 69 | selectedValue = getSelectedValue(ExampleContextMenu.getContextGridTable(), allValues); 70 | } else { 71 | // parent table only (dead code) 72 | selectedValue = getSelectedValue(((XMLBasedEditor)view).getMainUI().getUI(), allValues); 73 | } 74 | } else if (view instanceof Worksheet) { 75 | Worksheet worksheet = (Worksheet)view; 76 | WorksheetResultPanel gui = worksheet.getSelectedResultPanel(); 77 | if (gui instanceof StatementRunnerResultsPanel) { 78 | selectedValue = getSelectedValue(((StatementRunnerResultsPanel)gui).getResultSetTable(), allValues); 79 | } 80 | } 81 | JOptionPane.showMessageDialog(null, message + ": " + selectedValue, ExampleResources.getString("DIALOG_SHOW_TITLE"), JOptionPane.INFORMATION_MESSAGE); 82 | } 83 | 84 | @Override 85 | public boolean handleEvent(IdeAction action, Context context) { 86 | int cmdId = action.getCommandId(); 87 | if (cmdId == EXAMPLE_CONTEXT_MENU_1_CMD_ID) { 88 | show("1", context, false); 89 | } else if (cmdId == EXAMPLE_CONTEXT_MENU_2_CMD_ID) { 90 | show("2", context, true); 91 | } else { 92 | return false; 93 | } 94 | return true; 95 | } 96 | 97 | @Override 98 | public boolean update(IdeAction action, Context context) { 99 | action.setEnabled(true); 100 | return action.isEnabled(); 101 | } 102 | 103 | } 104 | -------------------------------------------------------------------------------- /examples/110_grid_table_menu/src/main/java/com/trivadis/sqldev/example110/ExampleResources.java: -------------------------------------------------------------------------------- 1 | package com.trivadis.sqldev.example110; 2 | 3 | import java.awt.Image; 4 | import java.util.logging.Logger; 5 | 6 | import javax.swing.Icon; 7 | 8 | import oracle.dbtools.raptor.utils.MessagesBase; 9 | 10 | public class ExampleResources extends MessagesBase { 11 | 12 | private static final Logger logger = Logger.getLogger(ExampleResources.class.getName()); 13 | private static final ClassLoader CLASS_LOADER = ExampleResources.class.getClassLoader(); 14 | private static final String CLASS_NAME = ExampleResources.class.getCanonicalName(); 15 | private static final ExampleResources INSTANCE = new ExampleResources(); 16 | 17 | private ExampleResources() { 18 | super(CLASS_NAME, CLASS_LOADER); 19 | logger.fine("resources initialized."); 20 | } 21 | 22 | public static String getString( String key ) { 23 | return INSTANCE.getStringImpl(key); 24 | } 25 | 26 | public static String get( String key ) { 27 | return getString(key); 28 | } 29 | 30 | public static Image getImage( String key ) { 31 | return INSTANCE.getImageImpl(key); 32 | } 33 | 34 | public static String format(String key, Object ... arguments) { 35 | return INSTANCE.formatImpl(key, arguments); 36 | } 37 | 38 | public static Icon getIcon(String key) { 39 | return INSTANCE.getIconImpl(key); 40 | } 41 | 42 | public static Integer getInteger(String key) { 43 | return INSTANCE.getIntegerImpl(key); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /examples/110_grid_table_menu/src/main/resources/com/trivadis/sqldev/example110/ExampleResources.properties: -------------------------------------------------------------------------------- 1 | # English (default) resources for extension com.trivadis.sqldev.example110 2 | 3 | # Externally used constants (pom.xml, bundle.xml, extension.xml, sqldeveloper.xml) 4 | EXTENSION_NAME=Example 110 for SQL Developer 5 | EXTENSION_DESCRIPTION=Example SQL Developer extension to add a menu item in the data grid context menu. 6 | EXTENSION_OWNER=Philipp Salvisberg 7 | MIN_SQLDEV_VERSION=17.4.0.355.2349 8 | 9 | # Icons 10 | ONE_ICON=/com/trivadis/sqldev/example110/images/one.png 11 | TWO_ICON=/com/trivadis/sqldev/example110/images/two.png 12 | 13 | # Labels in menu 14 | EXAMPLE_CONTEXT_SUBMENU_LABEL=Context submenu 15 | EXAMPLE_CONTEXT_MENU_1_LABEL=Context menu item 1 16 | EXAMPLE_CONTEXT_MENU_2_LABEL=Context menu item 2 17 | 18 | # Dialog 19 | DIALOG_SHOW_TITLE=Action event handled 20 | -------------------------------------------------------------------------------- /examples/110_grid_table_menu/src/main/resources/com/trivadis/sqldev/example110/images/one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/110_grid_table_menu/src/main/resources/com/trivadis/sqldev/example110/images/one.png -------------------------------------------------------------------------------- /examples/110_grid_table_menu/src/main/resources/com/trivadis/sqldev/example110/images/two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/examples/110_grid_table_menu/src/main/resources/com/trivadis/sqldev/example110/images/two.png -------------------------------------------------------------------------------- /workshop/000_set_up_environment/README.md: -------------------------------------------------------------------------------- 1 | # Set up the Environment 2 | 3 | ## 1. About OS, Versions and Names 4 | 5 | The tutorials are designed for `Windows 10 (64-bit)` with an English user interface for all software components. 6 | 7 | The tutorials are based on specific software versions and folder names. 8 | 9 | The provided Maven build files can be executed technically unchanged on `Windows` and `macOS` if SQL Developer is installed in the predefined folder. For `Linux` you have to pass the parameter `-Dsqldev.basedir=` with the path to the installation directory of SQL Developer. 10 | 11 | Technically, the examples work with any folder structure. However, you must be careful when copying and pasting values from the tutorial text. 12 | 13 | ## 2. Install SQL Developer 14 | 15 | Download SQL Developer from [Oracle Technology Network](https://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html): 16 | 17 | ![SQL Developer](./images/sql_developer.png) 18 | 19 | Extract `sqldeveloper-19.1.0.094.2042-x64.zip` in `C:\app`. 20 | 21 | Rename `C:\app\sqldeveloper` to `C:\app\sqldeveloper19.1.0`. 22 | 23 | ## 3. Change Language of SQL Developer to English 24 | 25 | Open `%APPDATA%\sqldeveloper\19.1.0\product.conf` in an editor and add the following lines: 26 | 27 | ```text 28 | AddVMOption -Duser.language=en 29 | AddVMOption -Duser.country=US 30 | AddVMOption -Duser.region=US 31 | ``` 32 | 33 | This entries change the language of SQL Developer to English. 34 | 35 | `country` and `region` are required only to avoid issues with some Oracle Database versions. 36 | 37 | ## 4. Change Logging Configuration in SQL Develper. 38 | 39 | Rename the file `C:\app\sqldeveloper19.1.0\sqldeveloper\bin\logging.conf` to `C:\app\sqldeveloper19.1.0\sqldeveloper\bin\logging.conf.original`. 40 | 41 | Create the the file `C:\app\sqldeveloper19.1.0\sqldeveloper\bin\logging.conf` with the following content: 42 | 43 | ```text 44 | # handler for console only (will be shown in "Messages" tab of "Log" view within SQL Developer) 45 | handlers=java.util.logging.ConsoleHandler 46 | 47 | # Default global logging level. 48 | .level=SEVERE 49 | 50 | # Default logging for Oracle (filters also other classes in "Logging Page" tab of "Log" view) 51 | oracle.level=FINE 52 | 53 | # Logging for Trivadis example extensions 54 | com.trivadis.sqldev.level=FINE 55 | 56 | # --- ConsoleHandler --- 57 | java.util.logging.ConsoleHandler.level=FINE 58 | java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter 59 | java.util.logging.SimpleFormatter.format=%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS %4$s %3$s: %5$s%n 60 | ``` 61 | 62 | ## 5. Install Eclipse 63 | 64 | Download the `Eclipse IDE for Java and DSL Developers` from https://www.eclipse.org/downloads/packages/ for Windows 64-bit. This version includes also [`Xtend`](https://www.eclipse.org/xtend/) support, that simplifies the work with SQL Developer Extensions written in `Xtend`. 65 | 66 | ![Eclipse IDE](./images/eclipse.png) 67 | 68 | Extract `eclipse-dsl-2019-03-R-win32-x86_64.zip` in `C:\app`. 69 | 70 | Rename `C:\app\eclipse` to `C:\app\eclipse-sqldev`. 71 | 72 | Launch `C:\app\eclipse-sqldev\eclipse.exe` with a workspace name of your choice. 73 | 74 | ## 6. Install Eclipse Plugin – Enhanced Class Decompiler (optional) 75 | 76 | Select `Eclipse Marketplace...` from the `Help` menu. 77 | 78 | Search for `Enhanced Class Decompiler` and install it. 79 | 80 | ![Enhanced Class Decompiler](./images/enhanced_class_decompiler.png) 81 | 82 | Select `Preferences` from the `Window` menu and search for `File`. 83 | 84 | ![File Associations](./images/preferences_file_associations.png) 85 | 86 | Associate `Class Decompiler Viewer` with 87 | - `.class` (required for remote debugging only) 88 | - `.class without source` 89 | 90 | ## 7. Install Eclipse Plugin – Eclipse Zip Editor (optional) 91 | 92 | Select `Eclipse Marketplace...` from the `Help` menu. 93 | 94 | Search for `Eclipse Zip Editor` and install it. 95 | 96 | ![Eclipse Zip Editor](./images/eclipse_zip_editor.png) -------------------------------------------------------------------------------- /workshop/000_set_up_environment/images/eclipse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/000_set_up_environment/images/eclipse.png -------------------------------------------------------------------------------- /workshop/000_set_up_environment/images/eclipse_zip_editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/000_set_up_environment/images/eclipse_zip_editor.png -------------------------------------------------------------------------------- /workshop/000_set_up_environment/images/enhanced_class_decompiler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/000_set_up_environment/images/enhanced_class_decompiler.png -------------------------------------------------------------------------------- /workshop/000_set_up_environment/images/preferences_file_associations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/000_set_up_environment/images/preferences_file_associations.png -------------------------------------------------------------------------------- /workshop/000_set_up_environment/images/sql_developer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/000_set_up_environment/images/sql_developer.png -------------------------------------------------------------------------------- /workshop/010_create_report_xml_extension/README.md: -------------------------------------------------------------------------------- 1 | # Create Report as XML Extension 2 | 3 | ## 1. Start SQL Developer 4 | 5 | Start SQL Developer. 6 | 7 | ## 2. Create Report 8 | 9 | Select `View`->`Reports` in the main menu. 10 | 11 | ![Reports](./images/main_menu_view_reports.png) 12 | 13 | Right click on `User Defined Reports` and select `New Report...`. 14 | 15 | ![New Report...](./images/reports_new_report.png) 16 | 17 | and you get this `Create Report` dialog: 18 | 19 | ![Create Report](./images/create_report.png) 20 | 21 | Enter `All objects` in the name field and 22 | 23 | ```sql 24 | select * from all_objects 25 | order by owner, object_type, object_name 26 | ``` 27 | 28 | in the SQL field and press the `Apply` button. 29 | 30 | `User Defined Reports` is shown in italic letters. 31 | 32 | ![User Defined Reports (unsaved)](./images/user_defined_reports_italic.png) 33 | 34 | This means that the report is not yet saved. Press the `Save All` button in the toolbar to save the report. 35 | 36 | ![Save All](./images/toolbar_save_all.png) 37 | 38 | Click on the `All Objects` report and select a connection from the `Select Connection` dialog to show the report. 39 | 40 | ![Select Connection](./images/select_connection.png) 41 | 42 | ## 3. Save Report as XML File 43 | 44 | Right click on the `All Objects` report and select `Save As...`. 45 | 46 | ![Save As...](./images/report_save_as.png) 47 | 48 | And save the report as `all_objects.xml` in a folder of your choice. 49 | 50 | ## 4. Delete Report 51 | 52 | Right click on the `All Objects` report and select `Delete` and confirm the deletion. 53 | 54 | ![Save As...](./images/report_delete.png) 55 | 56 | ## 5. Configure Report as XML Extension 57 | 58 | Select `Tools`->`Preferences` from the main menu. 59 | 60 | ![Preferences](./images/main_menu_tools_preferences.png) 61 | 62 | In the preferences dialog click on `User Defined Extensions` under the `Database` node. 63 | 64 | ![Preferences](./images/preferences.png) 65 | 66 | Press the `Add Row` button and select `REPORT` in the type field and browse for the previously saved `all_objects.xml`. 67 | 68 | ![Preferences](./images/preferences2.png) 69 | 70 | And press the `OK`. 71 | 72 | ## 6. Restart SQL Developer 73 | 74 | You must restart SQL developer for the changes to take effect. Close SQL Developer and start it again. 75 | 76 | ## 7. Run Report 77 | 78 | Now you find the `All Objects` report in the Report window under the `Shared Report` node. 79 | 80 | ![Shared Reports](./images/shared_reports.png) 81 | 82 | Click on `All Objects` to run it. 83 | -------------------------------------------------------------------------------- /workshop/010_create_report_xml_extension/images/create_report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/010_create_report_xml_extension/images/create_report.png -------------------------------------------------------------------------------- /workshop/010_create_report_xml_extension/images/main_menu_tools_preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/010_create_report_xml_extension/images/main_menu_tools_preferences.png -------------------------------------------------------------------------------- /workshop/010_create_report_xml_extension/images/main_menu_view_reports.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/010_create_report_xml_extension/images/main_menu_view_reports.png -------------------------------------------------------------------------------- /workshop/010_create_report_xml_extension/images/preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/010_create_report_xml_extension/images/preferences.png -------------------------------------------------------------------------------- /workshop/010_create_report_xml_extension/images/preferences2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/010_create_report_xml_extension/images/preferences2.png -------------------------------------------------------------------------------- /workshop/010_create_report_xml_extension/images/report_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/010_create_report_xml_extension/images/report_delete.png -------------------------------------------------------------------------------- /workshop/010_create_report_xml_extension/images/report_save_as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/010_create_report_xml_extension/images/report_save_as.png -------------------------------------------------------------------------------- /workshop/010_create_report_xml_extension/images/reports_new_report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/010_create_report_xml_extension/images/reports_new_report.png -------------------------------------------------------------------------------- /workshop/010_create_report_xml_extension/images/select_connection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/010_create_report_xml_extension/images/select_connection.png -------------------------------------------------------------------------------- /workshop/010_create_report_xml_extension/images/shared_reports.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/010_create_report_xml_extension/images/shared_reports.png -------------------------------------------------------------------------------- /workshop/010_create_report_xml_extension/images/toolbar_save_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/010_create_report_xml_extension/images/toolbar_save_all.png -------------------------------------------------------------------------------- /workshop/010_create_report_xml_extension/images/user_defined_reports_italic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/010_create_report_xml_extension/images/user_defined_reports_italic.png -------------------------------------------------------------------------------- /workshop/020_create_editor_xml_extension/README.md: -------------------------------------------------------------------------------- 1 | # Create Editor XML Extension 2 | 3 | ## 1. Start SQL Developer 4 | 5 | Start SQL Developer. 6 | 7 | ## 2. Create XML file 8 | 9 | Save the following content to a XML file named `properties.xml`. 10 | 11 | ```xml 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | 34 | 35 | 36 | ``` 37 | 38 | The file is based on the report created in the previous tutorial. 39 | 40 | The change in the node `display` from `type=""` to `type="editor"` makes a report an editor. The attribute `objectType` defines the scope of an editor. 41 | 42 | ## 3. Configure the XML Extension 43 | 44 | Select `Tools`->`Preferences` from the main menu. 45 | 46 | ![Preferences](./images/main_menu_tools_preferences.png) 47 | 48 | In the preferences dialog click on `User Defined Extensions` under the `Database` node. 49 | 50 | ![Preferences](./images/preferences.png) 51 | 52 | Press the `Add Row` button and select `EDITOR` in the type field and browse for the previously saved `properties.xml`. 53 | 54 | ![Preferences](./images/preferences2.png) 55 | 56 | ## 4. Restart SQL Developer 57 | 58 | You must restart SQL developer for the changes to take effect. Close SQL Developer and start it again. 59 | 60 | ## 5. Show Editor for a table in the Navigator tree 61 | 62 | Open a connection, click on the `Tables` node, click on a table and then on the `Properties` tab. 63 | 64 | ![Table Properties](./images/table_properties.png) 65 | 66 | ## 6. Show Editor for a table in Popup Describe 67 | 68 | Open a worksheet, type a table name, position the cursor in the table name, right-click and select `Popup Describe`. 69 | 70 | ![Context Menu for a table](./images/context_menu_popup_describe.png) 71 | 72 | Resize the window to make the `Properties` tab visible and click on it. 73 | 74 | ![Popup Describe for a table](./images/table_popup_describe.png) 75 | -------------------------------------------------------------------------------- /workshop/020_create_editor_xml_extension/images/context_menu_popup_describe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/020_create_editor_xml_extension/images/context_menu_popup_describe.png -------------------------------------------------------------------------------- /workshop/020_create_editor_xml_extension/images/main_menu_tools_preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/020_create_editor_xml_extension/images/main_menu_tools_preferences.png -------------------------------------------------------------------------------- /workshop/020_create_editor_xml_extension/images/preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/020_create_editor_xml_extension/images/preferences.png -------------------------------------------------------------------------------- /workshop/020_create_editor_xml_extension/images/preferences2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/020_create_editor_xml_extension/images/preferences2.png -------------------------------------------------------------------------------- /workshop/020_create_editor_xml_extension/images/table_popup_describe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/020_create_editor_xml_extension/images/table_popup_describe.png -------------------------------------------------------------------------------- /workshop/020_create_editor_xml_extension/images/table_properties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/020_create_editor_xml_extension/images/table_properties.png -------------------------------------------------------------------------------- /workshop/030_create_navigator_xml_extension/images/drinks1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/030_create_navigator_xml_extension/images/drinks1.png -------------------------------------------------------------------------------- /workshop/030_create_navigator_xml_extension/images/drinks2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/030_create_navigator_xml_extension/images/drinks2.png -------------------------------------------------------------------------------- /workshop/030_create_navigator_xml_extension/images/main_menu_tools_preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/030_create_navigator_xml_extension/images/main_menu_tools_preferences.png -------------------------------------------------------------------------------- /workshop/030_create_navigator_xml_extension/images/preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/030_create_navigator_xml_extension/images/preferences.png -------------------------------------------------------------------------------- /workshop/030_create_navigator_xml_extension/images/preferences2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/030_create_navigator_xml_extension/images/preferences2.png -------------------------------------------------------------------------------- /workshop/032_add_editors_for_navigator/images/cola_ingredients.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/032_add_editors_for_navigator/images/cola_ingredients.png -------------------------------------------------------------------------------- /workshop/032_add_editors_for_navigator/images/cola_nutrition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/032_add_editors_for_navigator/images/cola_nutrition.png -------------------------------------------------------------------------------- /workshop/032_add_editors_for_navigator/images/main_menu_tools_preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/032_add_editors_for_navigator/images/main_menu_tools_preferences.png -------------------------------------------------------------------------------- /workshop/032_add_editors_for_navigator/images/preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/032_add_editors_for_navigator/images/preferences.png -------------------------------------------------------------------------------- /workshop/032_add_editors_for_navigator/images/preferences2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/032_add_editors_for_navigator/images/preferences2.png -------------------------------------------------------------------------------- /workshop/032_add_editors_for_navigator/images/soft-drinks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/032_add_editors_for_navigator/images/soft-drinks.png -------------------------------------------------------------------------------- /workshop/040_create_plsql_action_xml_extension/README.md: -------------------------------------------------------------------------------- 1 | # Create PL/SQL Action XML Extension 2 | 3 | ## 1. Start SQL Developer 4 | 5 | Start SQL Developer. 6 | 7 | ## 2. Create XML file 8 | 9 | Save the following content to a XML file named `ctas_plsql.xml`. 10 | 11 | ```xml 12 | 13 | 14 | Create Table as Select... 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 43 | 44 | Copy a table. Completely or a chosen subset in percent. 45 | 46 | Confirmation 47 | Table "#OBJECT_NAME#" has been copied to #0#. 48 | 49 | 50 | 51 | ``` 52 | See [dialogs.xsd](https://github.com/oracle/oracle-db-examples/blob/master/sqldeveloper/extension/xml/schema/dialogs.xsd) for more information about the XML structure. It contains a lot of useful comments. 53 | 54 | ## 3. Configure the XML Extension 55 | 56 | Select `Tools`->`Preferences` from the main menu. 57 | 58 | ![Preferences](./images/main_menu_tools_preferences.png) 59 | 60 | In the preferences dialog click on `User Defined Extensions` under the `Database` node. 61 | 62 | ![Preferences](./images/preferences.png) 63 | 64 | Press the `Add Row` button and select `ACTION` in the type field and browse for the previously saved `ctas_plsql.xml`. 65 | 66 | ![Preferences](./images/preferences2.png) 67 | 68 | ## 4. Restart SQL Developer 69 | 70 | You must restart SQL developer for the changes to take effect. Close SQL Developer and start it again. 71 | 72 | ## 5. Run 73 | 74 | Open a connection, click on Tables, right-click on a table an select `Create Table as Select...`. 75 | 76 | ![Run dialog](./images/run_dialog.png) 77 | 78 | Enter a `New table name`, select `75` percent and press the `Apply button`. 79 | 80 | ![Confirmation dialog](./images/confirmation_dialog.png) 81 | -------------------------------------------------------------------------------- /workshop/040_create_plsql_action_xml_extension/images/confirmation_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/040_create_plsql_action_xml_extension/images/confirmation_dialog.png -------------------------------------------------------------------------------- /workshop/040_create_plsql_action_xml_extension/images/main_menu_tools_preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/040_create_plsql_action_xml_extension/images/main_menu_tools_preferences.png -------------------------------------------------------------------------------- /workshop/040_create_plsql_action_xml_extension/images/preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/040_create_plsql_action_xml_extension/images/preferences.png -------------------------------------------------------------------------------- /workshop/040_create_plsql_action_xml_extension/images/preferences2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/040_create_plsql_action_xml_extension/images/preferences2.png -------------------------------------------------------------------------------- /workshop/040_create_plsql_action_xml_extension/images/run_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/040_create_plsql_action_xml_extension/images/run_dialog.png -------------------------------------------------------------------------------- /workshop/042_create_javascript_action_xml_extension/README.md: -------------------------------------------------------------------------------- 1 | # Create JavaScript Action XML Extension 2 | 3 | ## 1. Start SQL Developer 4 | 5 | Start SQL Developer. 6 | 7 | ## 2. Create XML file 8 | 9 | Save the following content to a XML file named `ctas_javascript.xml`. 10 | 11 | ```xml 12 | 13 | 14 | Create Table as Select (JS)... 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 44 | Copy a table. Completely or a chosen subset in percent. 45 | 46 | Confirmation 47 | Table "#OBJECT_NAME#" has been copied to #0#. 48 | 49 | 50 | 51 | ``` 52 | See [dialogs.xsd](https://github.com/oracle/oracle-db-examples/blob/master/sqldeveloper/extension/xml/schema/dialogs.xsd) for more information about the XML structure. It contains a lot of useful comments. 53 | 54 | ## 3. Configure the XML Extension 55 | 56 | Select `Tools`->`Preferences` from the main menu. 57 | 58 | ![Preferences](./images/main_menu_tools_preferences.png) 59 | 60 | In the preferences dialog click on `User Defined Extensions` under the `Database` node. 61 | 62 | ![Preferences](./images/preferences.png) 63 | 64 | Press the `Add Row` button and select `ACTION` in the type field and browse for the previously saved `ctas_javascript.xml`. 65 | 66 | ![Preferences](./images/preferences2.png) 67 | 68 | ## 4. Restart SQL Developer 69 | 70 | You must restart SQL developer for the changes to take effect. Close SQL Developer and start it again. 71 | 72 | ## 5. Run 73 | 74 | Open a connection, click on Tables, right-click on a table an select `Create Table as Select (JS)...`. 75 | 76 | ![Run dialog](./images/run_dialog.png) 77 | 78 | Enter a `New table name`, select `75` percent and press the switch to the `SQL` tab. 79 | 80 | ![SQL tab](./images/run_dialog_sql_tab.png) 81 | 82 | Now, press the `Apply button`. 83 | 84 | ![Confirmation dialog](./images/confirmation_dialog.png) 85 | -------------------------------------------------------------------------------- /workshop/042_create_javascript_action_xml_extension/images/confirmation_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/042_create_javascript_action_xml_extension/images/confirmation_dialog.png -------------------------------------------------------------------------------- /workshop/042_create_javascript_action_xml_extension/images/main_menu_tools_preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/042_create_javascript_action_xml_extension/images/main_menu_tools_preferences.png -------------------------------------------------------------------------------- /workshop/042_create_javascript_action_xml_extension/images/preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/042_create_javascript_action_xml_extension/images/preferences.png -------------------------------------------------------------------------------- /workshop/042_create_javascript_action_xml_extension/images/preferences2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/042_create_javascript_action_xml_extension/images/preferences2.png -------------------------------------------------------------------------------- /workshop/042_create_javascript_action_xml_extension/images/run_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/042_create_javascript_action_xml_extension/images/run_dialog.png -------------------------------------------------------------------------------- /workshop/042_create_javascript_action_xml_extension/images/run_dialog_sql_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/042_create_javascript_action_xml_extension/images/run_dialog_sql_tab.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/check_for_updates_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/check_for_updates_1.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/check_for_updates_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/check_for_updates_2.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/clone_a_git_repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/clone_a_git_repository.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/clone_git_repo_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/clone_git_repo_1.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/clone_git_repo_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/clone_git_repo_2.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/clone_git_repo_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/clone_git_repo_3.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/cola_ingredients.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/cola_ingredients.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/cola_nutrition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/cola_nutrition.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/confirm_exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/confirm_exit.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/confirmation_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/confirmation_dialog.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/eclipse_workspace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/eclipse_workspace.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/existing_maven_projects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/existing_maven_projects.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/import_maven_projects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/import_maven_projects.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/import_projects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/import_projects.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/maven_build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/maven_build.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/maven_clean_package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/maven_clean_package.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/open_git_perspective.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/open_git_perspective.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/open_perspective.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/open_perspective.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/project_explorer_files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/project_explorer_files.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/reports.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/reports.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/run_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/run_dialog.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/soft-drinks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/soft-drinks.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/table_properties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/table_properties.png -------------------------------------------------------------------------------- /workshop/050_create_bundled_xml_extension/images/user_defined_extensions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/050_create_bundled_xml_extension/images/user_defined_extensions.png -------------------------------------------------------------------------------- /workshop/052_create_bundled_multilingual_xml_extension/images/beenden_bestaetigen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/052_create_bundled_multilingual_xml_extension/images/beenden_bestaetigen.png -------------------------------------------------------------------------------- /workshop/052_create_bundled_multilingual_xml_extension/images/berichte.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/052_create_bundled_multilingual_xml_extension/images/berichte.png -------------------------------------------------------------------------------- /workshop/052_create_bundled_multilingual_xml_extension/images/cola_ingredients.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/052_create_bundled_multilingual_xml_extension/images/cola_ingredients.png -------------------------------------------------------------------------------- /workshop/052_create_bundled_multilingual_xml_extension/images/cola_nutrition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/052_create_bundled_multilingual_xml_extension/images/cola_nutrition.png -------------------------------------------------------------------------------- /workshop/052_create_bundled_multilingual_xml_extension/images/confirmation_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/052_create_bundled_multilingual_xml_extension/images/confirmation_dialog.png -------------------------------------------------------------------------------- /workshop/052_create_bundled_multilingual_xml_extension/images/ctas_context_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/052_create_bundled_multilingual_xml_extension/images/ctas_context_menu.png -------------------------------------------------------------------------------- /workshop/052_create_bundled_multilingual_xml_extension/images/features_und_updates_verwalten.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/052_create_bundled_multilingual_xml_extension/images/features_und_updates_verwalten.png -------------------------------------------------------------------------------- /workshop/052_create_bundled_multilingual_xml_extension/images/nach_updates_suchen_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/052_create_bundled_multilingual_xml_extension/images/nach_updates_suchen_1.png -------------------------------------------------------------------------------- /workshop/052_create_bundled_multilingual_xml_extension/images/nach_updates_suchen_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/052_create_bundled_multilingual_xml_extension/images/nach_updates_suchen_2.png -------------------------------------------------------------------------------- /workshop/052_create_bundled_multilingual_xml_extension/images/neustart_bestaetigen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/052_create_bundled_multilingual_xml_extension/images/neustart_bestaetigen.png -------------------------------------------------------------------------------- /workshop/052_create_bundled_multilingual_xml_extension/images/run_dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/052_create_bundled_multilingual_xml_extension/images/run_dialog.png -------------------------------------------------------------------------------- /workshop/052_create_bundled_multilingual_xml_extension/images/soft-drinks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/052_create_bundled_multilingual_xml_extension/images/soft-drinks.png -------------------------------------------------------------------------------- /workshop/052_create_bundled_multilingual_xml_extension/images/tabellen_eigenschaften.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/052_create_bundled_multilingual_xml_extension/images/tabellen_eigenschaften.png -------------------------------------------------------------------------------- /workshop/060_extend_menubar/images/action_event_handled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/060_extend_menubar/images/action_event_handled.png -------------------------------------------------------------------------------- /workshop/060_extend_menubar/images/confirm_restart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/060_extend_menubar/images/confirm_restart.png -------------------------------------------------------------------------------- /workshop/060_extend_menubar/images/custom_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/060_extend_menubar/images/custom_menu.png -------------------------------------------------------------------------------- /workshop/060_extend_menubar/images/edit_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/060_extend_menubar/images/edit_menu.png -------------------------------------------------------------------------------- /workshop/060_extend_menubar/images/file_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/060_extend_menubar/images/file_menu.png -------------------------------------------------------------------------------- /workshop/060_extend_menubar/images/help_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/060_extend_menubar/images/help_menu.png -------------------------------------------------------------------------------- /workshop/060_extend_menubar/images/manage_features_and_updates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/060_extend_menubar/images/manage_features_and_updates.png -------------------------------------------------------------------------------- /workshop/060_extend_menubar/images/navigate_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/060_extend_menubar/images/navigate_menu.png -------------------------------------------------------------------------------- /workshop/060_extend_menubar/images/run_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/060_extend_menubar/images/run_menu.png -------------------------------------------------------------------------------- /workshop/060_extend_menubar/images/team_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/060_extend_menubar/images/team_menu.png -------------------------------------------------------------------------------- /workshop/060_extend_menubar/images/tools_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/060_extend_menubar/images/tools_menu.png -------------------------------------------------------------------------------- /workshop/060_extend_menubar/images/view_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/060_extend_menubar/images/view_menu.png -------------------------------------------------------------------------------- /workshop/060_extend_menubar/images/window_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/060_extend_menubar/images/window_menu.png -------------------------------------------------------------------------------- /workshop/070_extend_toolbar/README.md: -------------------------------------------------------------------------------- 1 | # Extend Toolbar 2 | 3 | ## 1. Start Eclipse 4 | 5 | Start Eclipse and select the `sqldev` workspace created in [Create Bundled XML Extension](https://github.com/PhilippSalvisberg/sqldev/tree/main/workshop/050_create_bundled_xml_extension). 6 | 7 | ## 2. Open example `070_toolbar` 8 | 9 | Select `File`->`Import...` from the main menu. 10 | 11 | Select `Existing Maven Projects...`, select the root directory `C:\git\sqldev\examples\070_toolbar` and press `Finish`. 12 | 13 | ## 3. Build the project 14 | 15 | Right click on the project, select `Run As` and click on `Maven build...`. 16 | 17 | Enter `clean package` in the `Goals` field and press `Run`. 18 | 19 | The console output should look similar to the following: 20 | 21 | ```text 22 | [[INFO] Scanning for projects... 23 | [INFO] 24 | [INFO] ---------< com.trivadis.sqldev:com.trivadis.sqldev.example70 >---------- 25 | [INFO] Building com.trivadis.sqldev.example70 1.0.0-SNAPSHOT 26 | [INFO] -------------------------------[ bundle ]------------------------------- 27 | ... 28 | [INFO] Building zip: C:\git\sqldev\examples\070_toolbar\target\Example70_for_SQLDev_1.0.0-SNAPSHOT.zip 29 | [INFO] ------------------------------------------------------------------------ 30 | [INFO] BUILD SUCCESS 31 | [INFO] ------------------------------------------------------------------------ 32 | [INFO] Total time: 9.160 s 33 | [INFO] Finished at: 2019-04-24T22:32:27+02:00 34 | [INFO] ------------------------------------------------------------------------ 35 | ``` 36 | 37 | ## 4. Start SQL Developer 38 | 39 | Start SQL Developer. 40 | 41 | ## 5. Disable Extension 42 | 43 | Select `Tools`->`Features` from the main menu. 44 | 45 | Open the `Database` node, deselect `Example 60 for SQL Developer` and press `Apply Changes`. 46 | 47 | Press `Yes` to restart SQL Developer. 48 | 49 | ## 6. Install Extension 50 | 51 | Select `Help`->`Check for Updates...` from the main menu. 52 | 53 | Click on `Install From Local File(s)`, enter `C:\git\sqldev\examples\070_toolbar\target\Example70_for_SQLDev_1.0.0-SNAPSHOT.zip` in `File Name(s)` and press `Next`. 54 | 55 | Press `Finish`. 56 | 57 | And Press `Yes` to restart SQL Developer. 58 | 59 | ## 7. Run 60 | 61 | ![Toolbar](./images/toolbar.png) 62 | 63 | Click on the first icon in the toolbar. 64 | 65 | ![Action event handled](./images/action_event_handled.png) 66 | 67 | ## 8. Important Artefacts/Sections 68 | 69 | | Artefact | Section | Notes | 70 | | -------- | ------- | ----- | 71 | | [`extensions.xml`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/070_toolbar/extension.xml#L17-L46) | | The toolbar, the action and the controller are defined here. | 72 | | [`ExampleController.java`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/070_toolbar/src/main/java/com/trivadis/sqldev/example70/ExampleController.java#L19-L23) | Handle Event| This is the controller class. The code is simplified since just one is event is handled in this controller. | 73 | 74 | ## 9. Debugging and Hot Deployment 75 | 76 | Follow the instructions in [Remote Debugging in Eclipse](https://github.com/PhilippSalvisberg/sqldev/blob/main/docs/remote-debugging.md) to set up remote debugging of an extension in SQL Developer. 77 | 78 | Set a breakpoint on line 21 in [`ExampleController.java`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/070_toolbar/src/main/java/com/trivadis/sqldev/example70/ExampleController.java#L21) in Eclipse and start the debugger. 79 | 80 | Press the toolbar item in SQL Developer. 81 | 82 | Inspect the `action` and `context` variables. 83 | 84 | ![Inspect Variables](./images/inspect_variables.png) 85 | 86 | Change String text on line 21 from `Action Name:` to `Performing Action Named:`. 87 | 88 | Press Ctrl-S to save the changes and deploy the changes immediatly to SQL Developer. 89 | 90 | Press F8 to resume processing. The following amended dialog box should be shown: 91 | 92 | ![Action event handled](./images/action_event_handled2.png) 93 | 94 | Disconnect the debugging session. 95 | 96 | Changes via hot deployment are temporary. They are lost after a restart of SQL Developer. 97 | -------------------------------------------------------------------------------- /workshop/070_extend_toolbar/images/action_event_handled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/070_extend_toolbar/images/action_event_handled.png -------------------------------------------------------------------------------- /workshop/070_extend_toolbar/images/action_event_handled2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/070_extend_toolbar/images/action_event_handled2.png -------------------------------------------------------------------------------- /workshop/070_extend_toolbar/images/inspect_variables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/070_extend_toolbar/images/inspect_variables.png -------------------------------------------------------------------------------- /workshop/070_extend_toolbar/images/toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/070_extend_toolbar/images/toolbar.png -------------------------------------------------------------------------------- /workshop/080_extend_context_menu/README.md: -------------------------------------------------------------------------------- 1 | # Extend Context Menu 2 | 3 | ## 1. Start Eclipse 4 | 5 | Start Eclipse and select the `sqldev` workspace created in [Create Bundled XML Extension](https://github.com/PhilippSalvisberg/sqldev/tree/main/workshop/050_create_bundled_xml_extension). 6 | 7 | ## 2. Open example `080_context_menu` 8 | 9 | Select `File`->`Import...` from the main menu. 10 | 11 | Select `Existing Maven Projects...`, select the root directory `C:\git\sqldev\examples\080_context_menu` and press `Finish`. 12 | 13 | ## 3. Build the project 14 | 15 | Right click on the project, select `Run As` and click on `Maven build...`. 16 | 17 | Enter `clean package` in the `Goals` field and press `Run`. 18 | 19 | The console output should look similar to the following: 20 | 21 | ```text 22 | [INFO] Scanning for projects... 23 | [INFO] 24 | [INFO] ---------< com.trivadis.sqldev:com.trivadis.sqldev.example80 >---------- 25 | [INFO] Building com.trivadis.sqldev.example80 1.0.0-SNAPSHOT 26 | [INFO] -------------------------------[ bundle ]------------------------------- 27 | ... 28 | [INFO] Building zip: C:\git\sqldev\examples\080_context_menu\target\Example80_for_SQLDev_1.0.0-SNAPSHOT.zip 29 | [INFO] ------------------------------------------------------------------------ 30 | [INFO] BUILD SUCCESS 31 | [INFO] ------------------------------------------------------------------------ 32 | [INFO] Total time: 8.817 s 33 | [INFO] Finished at: 2019-04-24T23:26:01+02:00 34 | [INFO] ------------------------------------------------------------------------ 35 | ``` 36 | 37 | ## 4. Start SQL Developer 38 | 39 | Start SQL Developer. 40 | 41 | ## 5. Disable Extension 42 | 43 | Select `Tools`->`Features` from the main menu. 44 | 45 | Open the `Database` node, deselect `Example 70 for SQL Developer` and press `Apply Changes`. 46 | 47 | Press `Yes` to restart SQL Developer. 48 | 49 | ## 6. Install Extension 50 | 51 | Select `Help`->`Check for Updates...` from the main menu. 52 | 53 | Click on `Install From Local File(s)`, enter `C:\git\sqldev\examples\080_context_menu\target\Example80_for_SQLDev_1.0.0-SNAPSHOT.zip` in `File Name(s)` and press `Next`. 54 | 55 | Press `Finish`. 56 | 57 | And Press `Yes` to restart SQL Developer. 58 | 59 | ## 7. Run 60 | 61 | ### 7.1 Connection Node Context Menu 62 | 63 | Right click on a connection and select `Context menu item 1`. 64 | 65 | ![Connection Context Menu Item](./images/connection_context_menu_item.png) 66 | 67 | The connection will be opened in the background and you should get a dialog similar to the following. 68 | 69 | ![Action event handled](./images/connection_action_event_handled.png) 70 | 71 | Please note that the password of the connection is shown. 72 | 73 | ### 7.2 Editor Context Menu 74 | 75 | Open a PL/SQL package, position the cursor somewhere in the editor, right click and select `Context menu item 2`. 76 | 77 | ![Editor Context Menu Item](./images/editor_context_menu_item.png) 78 | 79 | You should get a dialog similar to the following. 80 | 81 | ![Action event handled](./images/editor_action_event_handled.png) 82 | 83 | ## 8. Important Artefacts/Sections 84 | 85 | | Artefact | Section | Notes | 86 | | -------- | ------- | ----- | 87 | | [`extensions.xml`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/080_context_menu/extension.xml#L52-L60) | Connection Context Menu Item | Extends context menu for the site `db_nav`. To determine the node a custom rule `example-dbnode-is-db-connection` is used. | 88 | | [`extensions.xml`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/080_context_menu/extension.xml#L18-L25) | Rules | Here is the rule `example-dbnode-is-db-connection` defined. It checks if the node is an instance of a `DatabaseConnection` class. | 89 | | [`extensions.xml`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/080_context_menu/extension.xml#L61-L69) | Editor Context Menu Item | Extends context menu for the site `editor`. In this case the context menu should be shown aloways. Hence the predefined rule `always-enabled` is used. | 90 | | [`extensions.xml`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/080_context_menu/extension.xml#L27-L41) | Actions | All actions are defined here. | 91 | | [`extensions.xml`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/080_context_menu/extension.xml#L27-L41) | Controllers | All actions are handled in a single controller class named `ExampleController`. | 92 | | [`ExampleController.java`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/080_context_menu/src/main/java/com/trivadis/sqldev/example80/ExampleController.java#L90-L101) | Handle Event| This is the controller class. The two actions are identified here and processed in dedicated private methods [`handleConnection`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/080_context_menu/src/main/java/com/trivadis/sqldev/example80/ExampleController.java#L32-L75) and [`handleEditor`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/080_context_menu/src/main/java/com/trivadis/sqldev/example80/ExampleController.java#L77-L88) | 93 | -------------------------------------------------------------------------------- /workshop/080_extend_context_menu/images/connection_action_event_handled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/080_extend_context_menu/images/connection_action_event_handled.png -------------------------------------------------------------------------------- /workshop/080_extend_context_menu/images/connection_context_menu_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/080_extend_context_menu/images/connection_context_menu_item.png -------------------------------------------------------------------------------- /workshop/080_extend_context_menu/images/editor_action_event_handled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/080_extend_context_menu/images/editor_action_event_handled.png -------------------------------------------------------------------------------- /workshop/080_extend_context_menu/images/editor_context_menu_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/080_extend_context_menu/images/editor_context_menu_item.png -------------------------------------------------------------------------------- /workshop/090_add_preferences/README.md: -------------------------------------------------------------------------------- 1 | # Add Preferences 2 | 3 | ## 1. Start Eclipse 4 | 5 | Start Eclipse and select the `sqldev` workspace created in [Create Bundled XML Extension](https://github.com/PhilippSalvisberg/sqldev/tree/main/workshop/050_create_bundled_xml_extension). 6 | 7 | ## 2. Open example `090_preferences` 8 | 9 | Select `File`->`Import...` from the main menu. 10 | 11 | Select `Existing Maven Projects...`, select the root directory `C:\git\sqldev\examples\090_preferences` and press `Finish`. 12 | 13 | ## 3. Build the project 14 | 15 | Right click on the project, select `Run As` and click on `Maven build...`. 16 | 17 | Enter `clean package` in the `Goals` field and press `Run`. 18 | 19 | The console output should look similar to the following: 20 | 21 | ```text 22 | [INFO] Scanning for projects... 23 | [INFO] 24 | [INFO] ---------< com.trivadis.sqldev:com.trivadis.sqldev.example90 >---------- 25 | [INFO] Building com.trivadis.sqldev.example90 1.0.0-SNAPSHOT 26 | [INFO] -------------------------------[ bundle ]------------------------------- 27 | ... 28 | [INFO] Building zip: C:\git\sqldev\examples\090_preferences\target\Example90_for_SQLDev_1.0.0-SNAPSHOT.zip 29 | [INFO] ------------------------------------------------------------------------ 30 | [INFO] BUILD SUCCESS 31 | [INFO] ------------------------------------------------------------------------ 32 | [INFO] Total time: 11.245 s 33 | [INFO] Finished at: 2019-04-25T00:21:47+02:00 34 | [INFO] ------------------------------------------------------------------------ 35 | ``` 36 | 37 | ## 4. Start SQL Developer 38 | 39 | Start SQL Developer. 40 | 41 | ## 5. Disable Extension 42 | 43 | Select `Tools`->`Features` from the main menu. 44 | 45 | Open the `Database` node, deselect `Example 80 for SQL Developer` and press `Apply Changes`. 46 | 47 | Press `Yes` to restart SQL Developer. 48 | 49 | ## 6. Install Extension 50 | 51 | Select `Help`->`Check for Updates...` from the main menu. 52 | 53 | Click on `Install From Local File(s)`, enter `C:\git\sqldev\examples\090_preferences\target\Example90_for_SQLDev_1.0.0-SNAPSHOT.zip` in `File Name(s)` and press `Next`. 54 | 55 | Press `Finish`. 56 | 57 | And Press `Yes` to restart SQL Developer. 58 | 59 | ## 7. Run 60 | 61 | ### 7.1 Preferences 62 | 63 | Select `Tools`->`Preferences` from the main menu. 64 | 65 | Select `Example 90` in the Preferences dialog. 66 | 67 | ![Preferences](./images/preferences.png) 68 | 69 | Uncheck `Show password?` and press `OK`. 70 | 71 | ## 7.2 Connection Context Menu 72 | 73 | Right click on a closed connection and select `Context menu item 1`. 74 | 75 | ![Connection Context Menu Item](./images/connection_context_menu_item.png) 76 | 77 | The connection will be opened in the background and you should get a dialog similar to the following. 78 | 79 | ![Action event handled](./images/connection_action_event_handled.png) 80 | 81 | Please note that 82 | 83 | - The password of the connection is hidden 84 | - The connection is still closed 85 | - No database product and version information is shown 86 | 87 | ### 7.3 Change Preferences 88 | 89 | Change preferences for `Example 90` and verify the the impact. 90 | 91 | ## 8. Important Artefacts/Sections 92 | 93 | | Artefact | Section | Notes | 94 | | -------- | ------- | ----- | 95 | | [`extensions.xml`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/090_preferences/extension.xml#L70-L75) | Preferences | The class `PreferencePanel` is registered under `/preferences`. | 96 | | [`PreferencePanel.java`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/090_preferences/src/main/java/com/trivadis/sqldev/example90/PreferencePanel.java#L20-L28) | | The layout is defined here. It reads the model on entry and writes it on exit. | 97 | | [`PreferenceModel.java`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/090_preferences/src/main/java/com/trivadis/sqldev/example90/PreferenceModel.java#L21-L35) | | The getter and setter are defined here. The model is persisted via a provided `HashStructure`. | 98 | | [`ExampleController.java`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/090_preferences/src/main/java/com/trivadis/sqldev/example90/ExampleController.java#L50) | Reading Preferences | Instantiate preference model. | 99 | | [`ExampleController.java`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/090_preferences/src/main/java/com/trivadis/sqldev/example90/ExampleController.java#L59-L63) | Show password? | Conditional processing regarding password. | 100 | | [`ExampleController.java`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/090_preferences/src/main/java/com/trivadis/sqldev/example90/ExampleController.java#L65-L72) | Implicit connect? | Conditional processing regarding implicit connection | 101 | -------------------------------------------------------------------------------- /workshop/090_add_preferences/images/connection_action_event_handled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/090_add_preferences/images/connection_action_event_handled.png -------------------------------------------------------------------------------- /workshop/090_add_preferences/images/connection_context_menu_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/090_add_preferences/images/connection_context_menu_item.png -------------------------------------------------------------------------------- /workshop/090_add_preferences/images/preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/090_add_preferences/images/preferences.png -------------------------------------------------------------------------------- /workshop/100_add_dockable_window/README.md: -------------------------------------------------------------------------------- 1 | # Add Dockable Window 2 | 3 | ## 1. Start Eclipse 4 | 5 | Start Eclipse and select the `sqldev` workspace created in [Create Bundled XML Extension](https://github.com/PhilippSalvisberg/sqldev/tree/main/workshop/050_create_bundled_xml_extension). 6 | 7 | ## 2. Open example `100_dockable` 8 | 9 | Select `File`->`Import...` from the main menu. 10 | 11 | Select `Existing Maven Projects...`, select the root directory `C:\git\sqldev\examples\100_dockable` and press `Finish`. 12 | 13 | ## 3. Build the project 14 | 15 | Right click on the project, select `Run As` and click on `Maven build...`. 16 | 17 | Enter `clean package` in the `Goals` field and press `Run`. 18 | 19 | The console output should look similar to the following: 20 | 21 | ```text 22 | [INFO] Scanning for projects... 23 | [INFO] 24 | [INFO] ---------< com.trivadis.sqldev:com.trivadis.sqldev.example100 >--------- 25 | [INFO] Building com.trivadis.sqldev.example100 1.0.0-SNAPSHOT 26 | [INFO] -------------------------------[ bundle ]------------------------------- 27 | ... 28 | [INFO] Building zip: C:\git\sqldev\examples\100_dockable\target\Example100_for_SQLDev_1.0.0-SNAPSHOT.zip 29 | [INFO] ------------------------------------------------------------------------ 30 | [INFO] BUILD SUCCESS 31 | [INFO] ------------------------------------------------------------------------ 32 | [INFO] Total time: 7.649 s 33 | [INFO] Finished at: 2019-04-25T01:08:35+02:00 34 | [INFO] ------------------------------------------------------------------------ 35 | ``` 36 | 37 | ## 4. Start SQL Developer 38 | 39 | Start SQL Developer. 40 | 41 | ## 5. Disable Extension 42 | 43 | Select `Tools`->`Features` from the main menu. 44 | 45 | Open the `Database` node, deselect `Example 90 for SQL Developer` and press `Apply Changes`. 46 | 47 | Press `Yes` to restart SQL Developer. 48 | 49 | ## 6. Install Extension 50 | 51 | Select `Help`->`Check for Updates...` from the main menu. 52 | 53 | Click on `Install From Local File(s)`, enter `C:\git\sqldev\examples\100_dockable\target\Example100_for_SQLDev_1.0.0-SNAPSHOT.zip` in `File Name(s)` and press `Next`. 54 | 55 | Press `Finish`. 56 | 57 | And Press `Yes` to restart SQL Developer. 58 | 59 | ## 7. Run 60 | 61 | Select `View`->`View menu item 1` from the main menu. 62 | 63 | ![View menu item 1](./images/view_menu_item_1.png) 64 | 65 | The dockable window position is shown on it's default position on the left side (east). 66 | 67 | ![Default Position](./images/default_east_position.png) 68 | 69 | Drag the dockable window on the `Welcome Page` tab 70 | 71 | ![Drag](./images/drag_to_welcome_tab.png) 72 | 73 | And drop it. 74 | 75 | ![Drop](./images/drop_on_welcome_tab.png) 76 | 77 | ## 8. Important Artefacts/Sections 78 | 79 | | Artefact | Section | Notes | 80 | | -------- | ------- | ----- | 81 | | [`extensions.xml`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/100_dockable/extension.xml#L19-L21) | Dockable Factory | The dockable factory class `ExampleDockableFactory` is registered here with the id `EXAMPLE_FACTORY`. | 82 | | [`extensions.xml`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/100_dockable/extension.xml#L54-L59) | Dockable View | The dockable view id `EXAMPLE_VIEW` is registered here. | 83 | | [`DockableWindow.java`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/100_dockable/src/main/java/com/trivadis/sqldev/example100/ExampleDockable.java#L36-L44) | | The content of the dockable window is defined here. | 84 | | [`DockableFactory.java`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/100_dockable/src/main/java/com/trivadis/sqldev/example100/ExampleDockableFactory.java#L46-L49) | | The dockable window is instantiated via a `showDockable` call. | 85 | | [`ExampleController.java`](https://github.com/PhilippSalvisberg/sqldev/blob/main/examples/100_dockable/src/main/java/com/trivadis/sqldev/example100/ExampleController.java#L15) | | Show the dockable window via action event. | 86 | -------------------------------------------------------------------------------- /workshop/100_add_dockable_window/images/default_east_position.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/100_add_dockable_window/images/default_east_position.png -------------------------------------------------------------------------------- /workshop/100_add_dockable_window/images/drag_to_welcome_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/100_add_dockable_window/images/drag_to_welcome_tab.png -------------------------------------------------------------------------------- /workshop/100_add_dockable_window/images/drop_on_welcome_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/100_add_dockable_window/images/drop_on_welcome_tab.png -------------------------------------------------------------------------------- /workshop/100_add_dockable_window/images/view_menu_item_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/100_add_dockable_window/images/view_menu_item_1.png -------------------------------------------------------------------------------- /workshop/110_grid_table_menu/images/context_menu_for_multiple_cells_in_query_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/110_grid_table_menu/images/context_menu_for_multiple_cells_in_query_result.png -------------------------------------------------------------------------------- /workshop/110_grid_table_menu/images/context_menu_for_one_cell_in_query_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/110_grid_table_menu/images/context_menu_for_one_cell_in_query_result.png -------------------------------------------------------------------------------- /workshop/110_grid_table_menu/images/context_menu_item1_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/110_grid_table_menu/images/context_menu_item1_result.png -------------------------------------------------------------------------------- /workshop/110_grid_table_menu/images/context_menu_item2_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PhilippSalvisberg/sqldev/a1e1f7e0bafc8139fae79cf84796dfcef33b9d21/workshop/110_grid_table_menu/images/context_menu_item2_result.png --------------------------------------------------------------------------------