|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | +Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
| 4 | +
|
| 5 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +you may not use this file except in compliance with the License. |
| 7 | +You may obtain a copy of the License at |
| 8 | +
|
| 9 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +
|
| 11 | +Unless required by applicable law or agreed to in writing, software |
| 12 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +See the License for the specific language governing permissions and |
| 15 | +limitations under the License. |
| 16 | +--> |
| 17 | + |
| 18 | +<extension xmlns="http://jcp.org/jsr/198/extension-manifest" |
| 19 | + id="@@extension.id@@" version="@@extension.version@@.@@extension.build@@" |
| 20 | + esdk-version="1.0" |
| 21 | + rsbundle-class="@@extension.resources@@"> |
| 22 | + |
| 23 | + <name>@@extension.name@@</name> |
| 24 | + <owner>@@extension.owner@@ @@extension.owner.url@@</owner> |
| 25 | + |
| 26 | +<!-- |
| 27 | + <feature-category xmlns="http://xmlns.oracle.com/ide/extension" id="example-category"> |
| 28 | + <name>${CATEGORY_NAME}</name> |
| 29 | + <description>${CATEGORY_DESCRIPTION}</description> |
| 30 | + </feature-category> |
| 31 | + Duplicate category definitions cause a severe error to be logged. |
| 32 | + Only way around it from the outside I can think of is an extension just to add |
| 33 | + the category and all the others dependent on it. |
| 34 | + The pre-defined ones are: |
| 35 | +{db-category=Database, ide-category=IDE, db-migrations-category=Database Migrations, |
| 36 | + database-category=Database Development, java-se-category=Java SE, |
| 37 | + vcs-category=Version Control, xml-category=XML} |
| 38 | +and example-category=Examples, if you've installed the XMLPackedExample |
| 39 | +Not supplying a category or giving a non-existent one will just show the extension |
| 40 | +at the root of the features tree. |
| 41 | + --> |
| 42 | + <feature id="@@extension.id@@" xmlns="http://xmlns.oracle.com/ide/extension"> |
| 43 | + <name>@@extension.name@@</name> |
| 44 | + <description>@@extension.descr@@</description> |
| 45 | + <type> |
| 46 | + <service can-user-disable="true" reload-if-used="true"/> |
| 47 | + </type> |
| 48 | + </feature> |
| 49 | + <trigger-hooks xmlns="http://xmlns.oracle.com/ide/extension"> |
| 50 | + <rules> |
| 51 | + <!-- Need to have rule for the declarations below, but it is a "severe" |
| 52 | + exception to duplicate them. Need to collate a list of the existing |
| 53 | + ones - seems there would be little chance new ones are really needed. --> |
| 54 | + |
| 55 | + <!-- See ActionController.doAction - we are counting on this --> |
| 56 | + <rule id="insertTemplateAction-view-is-editorPaneContainer" type="context-has-view"> |
| 57 | + <parameters> |
| 58 | + <param name="view-class" value="oracle.javatools.editor.BasicEditorPaneContainer"/> |
| 59 | + </parameters> |
| 60 | + </rule> |
| 61 | + </rules> |
| 62 | + <triggers xmlns:c="http://xmlns.oracle.com/ide/customization"> |
| 63 | + <actions xmlns="http://xmlns.oracle.com/jdeveloper/1013/extension"> |
| 64 | + <action id="InsertTemplateAction_ID"> |
| 65 | + <properties> |
| 66 | + <property name="Name">${ACTION_LABEL}</property> |
| 67 | + <!-- You could also use your own by putting path in rsbundle |
| 68 | + e.g., MY_ICON = /oracle/db/example/sqldeveloper/extension/dependency/icons/my_icon.png |
| 69 | + and referencing its key as res:${MY_ICON} --> |
| 70 | + <!-- <property name="SmallIcon">${OracleIcons.DUKE}</property> --> |
| 71 | + </properties> |
| 72 | + </action> |
| 73 | + </actions> |
| 74 | + <controllers xmlns="http://xmlns.oracle.com/ide/extension"> |
| 75 | + <controller class="oracle.db.example.sqldeveloper.extension.insertTemplateAction.ActionController"> |
| 76 | + <!-- Not needed if the context-menu-hook is using a rule to determine if it shows up at all? --> |
| 77 | + <update-rules> |
| 78 | + <update-rule rule="insertTemplateAction-view-is-editorPaneContainer"> |
| 79 | + <action id="InsertTemplateAction_ID"/> |
| 80 | + </update-rule> |
| 81 | + </update-rules> |
| 82 | + </controller> |
| 83 | + </controllers> |
| 84 | + <context-menu-hook rule="insertTemplateAction-view-is-editorPaneContainer"> |
| 85 | + <site idref="editor"/> <!-- can do multiple e.g.;, "db_nav;editor" --> |
| 86 | + <menu> |
| 87 | + <section xmlns="http://jcp.org/jsr/198/extension-manifest" id="SECTION_WINDOW_CTXT_MENU" weight="1.0"> |
| 88 | + <item action-ref="InsertTemplateAction_ID" weight="1.0"/> |
| 89 | + </section> |
| 90 | + </menu> |
| 91 | + </context-menu-hook> |
| 92 | + |
| 93 | + <!-- When placed here in the trigger-hooks section, these will be loaded right away --> |
| 94 | + <sqldev-action-hook xmlns="http://xmlns.oracle.com/sqldeveloper/sqldev-actions"> |
| 95 | + <!-- This is the directory to read all action *.xml from |
| 96 | + <actionDescriptor package="oracle.db.example.sqldeveloper.extension.dependency.action"/> |
| 97 | + --> |
| 98 | + </sqldev-action-hook> |
| 99 | + <sqldev-navigator-hook xmlns="http://xmlns.oracle.com/sqldeveloper/sqldev-navigator"> |
| 100 | + <!-- These are the navigator XML files to read |
| 101 | + <descriptor>/oracle/db/example/sqldeveloper/extension/dependency/navigator/DependencyExampleNavigator.xml</descriptor> |
| 102 | + --> |
| 103 | + </sqldev-navigator-hook> |
| 104 | + <!-- viewer-hook cannot be a trigger --> |
| 105 | + <!-- BUT doing this will add a menu toggle entry in the connection |
| 106 | + context menu for Manage Features->your feature for users to |
| 107 | + enable/disable xml based things with requiredFeatures="your dynamic id" |
| 108 | + See oracle.db.example.sqldeveloper.extension.dependency.viewer.DependencyExampleGraphViewer.xml |
| 109 | + AS A SIDE EFFECT, enabling it the 1st time will fully load the extension |
| 110 | + --> |
| 111 | + <!-- Need to check on this. Works in current dev version, but not EA1. |
| 112 | + SO FOR NOW, you have to use the context menu show viewer once then object viewers |
| 113 | + opened afterwards will have the dependency viewer tab --> |
| 114 | + <!-- |
| 115 | + <sqldev-feature-hook xmlns="http://xmlns.oracle.com/sqldeveloper/sqldev-feature"> |
| 116 | + <dynamicFeature id="dependencyObjectViewerExample">${DEPENDENCY_VIEWER_TAB_LABEL}</dynamicFeature> |
| 117 | + </sqldev-feature-hook> |
| 118 | + --> |
| 119 | + </triggers> |
| 120 | + </trigger-hooks> |
| 121 | + <hooks> |
| 122 | + <jdeveloper-hook xmlns="http://xmlns.oracle.com/jdeveloper/1013/extension"> |
| 123 | + <addins> |
| 124 | + <!-- |
| 125 | + <addin>oracle.db.example.sqldeveloper.extension.dumpObjectTypes.DumpObjectTypesAddin</addin> |
| 126 | + --> |
| 127 | + </addins> |
| 128 | + </jdeveloper-hook> |
| 129 | + <!-- When placed here in the hooks section, these won't be loaded until the extension is by one of the above triggers --> |
| 130 | + <sqldev-action-hook xmlns="http://xmlns.oracle.com/sqldeveloper/sqldev-actions"> |
| 131 | + <!-- This is the directory to read all action *.xml from |
| 132 | + <actionDescriptor package="oracle.db.example.sqldeveloper.extension.dependency.action.xml"/> |
| 133 | + --> |
| 134 | + </sqldev-action-hook> |
| 135 | + <sqldev-navigator-hook xmlns="http://xmlns.oracle.com/sqldeveloper/sqldev-navigator"> |
| 136 | + <!-- These are the navigator XML files to read |
| 137 | + <descriptor>oracle.db.example.sqldeveloper.extension.dependency/navigator/DependencyExampleNavigator.xml</descriptor> |
| 138 | + --> |
| 139 | + </sqldev-navigator-hook> |
| 140 | + <!-- viewer-hook cannot be a trigger --> |
| 141 | + <sqldev-viewer-hook xmlns="http://xmlns.oracle.com/sqldeveloper/sqldev-viewers"> |
| 142 | + <!-- This is the directory to read all viewer *.xml from |
| 143 | + <viewerDescriptor package="oracle.db.example.sqldeveloper.extension.dependency.viewer"/> |
| 144 | + --> |
| 145 | + </sqldev-viewer-hook> |
| 146 | + |
| 147 | + </hooks> |
| 148 | + |
| 149 | +</extension> |
0 commit comments