WEB开发网
开发学院软件开发Java Eclipse 和 HSQLDB: 将关系数据库服务器嵌入到 Ec... 阅读

Eclipse 和 HSQLDB: 将关系数据库服务器嵌入到 Eclipse 中,第 2 部分

 2009-12-16 00:00:00 来源:WEB开发网   
核心提示: 当 Java 项目没有插件自己定义的性质时“Add HSQLDB Engine nature”是可见的,最后,Eclipse 和 HSQLDB: 将关系数据库服务器嵌入到 Eclipse 中,第 2 部分(5),当 Java 项目具有我们的新性质时,“Remo

当 Java 项目没有插件自己定义的性质时“Add HSQLDB Engine nature”是可见的。

最后,当 Java 项目具有我们的新性质时,“Remove HSQLDB Engine nature”可见。



清单 4. plugin.xml 清单文件中定义 HSQLDB 菜单操作的片断
  <extension 
     point="org.eclipse.ui.popupMenus"> 
   <objectContribution 
      objectClass="org.eclipse.core.resources.IFile" 
      nameFilter="*.sql" 
      id="hsqldb.ui.SQLScriptFiles"> 
     <visibility> 
      <objectState 
         name="projectNature" 
         value="hsqldb.ui.hsqldbEngine"> 
      </objectState> 
     </visibility> 
     <action 
        label="Run HSQLDB Script" 
        class="hsqldb.ui.popup.actions.HsqldbRunScript" 
        menubarPath="additions" 
        enablesFor="1" 
        id="hsqldb.ui.HsqldbRunScript"> 
      <enablement> 
        <objectState 
           name="projectSessionProperty" 
           value="hsqldb.ui.running"> 
        </objectState> 
      </enablement> 
     </action> 
   </objectContribution> 
   <objectContribution 
      objectClass="org.eclipse.jdt.core.IJavaProject" 
      id="hsqldb.ui.HsqldbEngineMenu"> 
     <menu 
        label="HSQLDB" 
        path="additions" 
        id="hsqldb.ui.HsqldbProject"> 
      <separator 
         name="hsqldb.ui.group1"> 
      </separator> 
      <separator 
         name="hsqldb.ui.group2"> 
      </separator> 
     </menu> 
   </objectContribution> 
   <objectContribution 
      objectClass="org.eclipse.jdt.core.IJavaProject" 
      id="hsqldb.ui.HsqldbEngineActions"> 
     <visibility> 
      <objectState 
         name="nature" 
         value="hsqldb.ui.hsqldbEngine"> 
      </objectState> 
     </visibility> 
     <action 
        label="Run Database Manager (Standalone)" 
        icon="icons/dbmansa.gif" 
        class="hsqldb.ui.popup.actions.RunDatabaseManagerStandalone" 
        menubarPath="hsqldb.ui.HsqldbProject/group1" 
        enablesFor="1" 
        id="hsqldb.ui.RunDatabaseManagerStandalone"> 
      <enablement> 
        <not> 
         <objectState 
            name="sessionProperty" 
            value="hsqldb.ui.running"> 
         </objectState> 
        </not> 
      </enablement> 
     </action> 
     <action 
        label="Run Database Manager (Client)" 
        icon="icons/dbman.gif" 
        class="hsqldb.ui.popup.actions.RunDatabaseManager" 
        menubarPath="hsqldb.ui.HsqldbProject/group1" 
        enablesFor="1" 
        id="hsqldb.ui.RunDatabaseManager"> 
      <enablement> 
        <objectState 
           name="sessionProperty" 
           value="hsqldb.ui.running"> 
        </objectState> 
      </enablement> 
     </action> 
     <action 
        label="Stop HSQLDB Server" 
        icon="icons/stop.gif" 
        class="hsqldb.ui.popup.actions.StopHsqldbServer" 
        menubarPath="hsqldb.ui.HsqldbProject/group1" 
        enablesFor="1" 
        id="hsqldb.ui.StopHsqldbServer"> 
      <enablement> 
        <objectState 
           name="sessionProperty" 
           value="hsqldb.ui.running"> 
        </objectState> 
      </enablement> 
     </action> 
     <action 
        label="Start HSQLDB Server" 
        icon="icons/start.gif" 
        class="hsqldb.ui.popup.actions.StartHsqldbServer" 
        menubarPath="hsqldb.ui.HsqldbProject/group1" 
        enablesFor="1" 
        id="hsqldb.ui.StartHsqldbServer"> 
      <enablement> 
        <not> 
         <objectState 
            name="sessionProperty" 
            value="hsqldb.ui.running"> 
         </objectState> 
        </not> 
      </enablement> 
     </action> 
   </objectContribution> 
   <objectContribution 
      objectClass="org.eclipse.jdt.core.IJavaProject" 
      id="hsqldb.ui.JavaProjects"> 
     <visibility> 
      <not> 
        <objectState 
           name="nature" 
           value="hsqldb.ui.hsqldbEngine"> 
        </objectState> 
      </not> 
     </visibility> 
     <action 
        label="Add Database Engine nature" 
        class="hsqldb.ui.popup.actions.AddDBEngineNature" 
        menubarPath="hsqldb.ui.HsqldbProject/group2" 
        enablesFor="1" 
        id="hsqldb.ui.AddDBEngineNature"> 
     </action> 
   </objectContribution> 
   <objectContribution 
      objectClass="org.eclipse.jdt.core.IJavaProject" 
      id="hsqldb.ui.HsqldbEngineProjects"> 
     <visibility> 
      <objectState 
         name="nature" 
         value="hsqldb.ui.hsqldbEngine"> 
      </objectState> 
     </visibility> 
     <action 
        label="Remove Database Engine nature" 
        class="hsqldb.ui.popup.actions.RemoveDBEngineNature" 
        menubarPath="hsqldb.ui.HsqldbProject/group2" 
        enablesFor="1" 
        id="hsqldb.ui.AddDBEngineNature"> 
     </action> 
   </objectContribution> 
  </extension> 

上一页  1 2 3 4 5 6 7 8 9 10  下一页

Tags:Eclipse HSQLDB 关系

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接