add skeleton launcher for osgi runtimes


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@806293 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/sigil/eclipse/runtime/plugin.xml b/sigil/eclipse/runtime/plugin.xml
new file mode 100644
index 0000000..49d9878
--- /dev/null
+++ b/sigil/eclipse/runtime/plugin.xml
@@ -0,0 +1,534 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+    http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<?eclipse version="3.2"?>
+<plugin>
+   <extension point = "org.eclipse.debug.core.launchConfigurationTypes">
+	   <launchConfigurationType
+	   	   id="org.apache.felix.sigil.eclipse.runtime.OSGi"
+		   name="OSGi Application"
+		   delegate="org.apache.felix.sigil.eclipse.runtime.OSGiLauncher"
+		   modes= "run, debug"
+		   sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
+	       sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer">
+		</launchConfigurationType>
+	</extension>
+   <extension
+         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+      <launchConfigurationTabGroup
+            class="org.apache.felix.sigil.eclipse.runtime.config.OSGiLaunchConfigurationTabGroup"
+            id="org.apache.felix.sigil.eclipse.runtime.config.OSGiLaunchConfigurationTabGroup"
+            type="org.apache.felix.sigil.eclipse.runtime.OSGi"/>
+   </extension>
+   <extension
+         point="org.eclipse.debug.ui.launchShortcuts">
+      <shortcut
+            class="org.apache.felix.sigil.eclipse.runtime.shortcut.OSGiLaunchShortCut"
+            icon="etc/images/newton.png"
+            id="org.cauldron.sigil.launching.shortcut"
+            label="OSGi Application"
+            modes="run,debug">
+         <contextualLaunch>
+            <enablement>
+               <with variable="selection">
+                  <count value="1"/>
+                  <iterate>
+                     <or>
+	                     <instanceof value="org.eclipse.jdt.core.IJavaProject"/>
+                         <test
+                               property="org.apache.felix.sigil.isSigilProject"
+                               value="true"/>
+	                 </or>
+                  </iterate>
+               </with>
+            </enablement>
+         </contextualLaunch>
+      </shortcut>
+   </extension>
+   <extension
+         point="org.eclipse.jdt.launching.classpathProviders">
+      <classpathProvider
+            class="org.cauldron.sigil.runtime.launch.NewtonSourcePathProvider"
+            id="org.cauldron.sigil.classpath.Provider"/>
+   </extension>
+   <extension
+         point="org.eclipse.debug.ui.launchConfigurationTypeImages">
+      <launchConfigurationTypeImage
+            configTypeID="org.apache.felix.sigil.eclipse.runtime.OSGi"
+            icon="etc/images/newton.png"
+            id="org.apache.felix.sigil.eclipse.runtime.OSGi">
+      </launchConfigurationTypeImage>
+   </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            id="org.apache.felix.sigil.runtime.commands.installProject"
+            name="%commandInstallProject">
+      </command>
+      <command
+            id="org.apache.felix.sigil.runtime.commands.uninstallProject"
+            name="%commandUninstallProject">
+      </command>
+      <command
+            id="org.apache.felix.sigil.runtime.commands.reinstallProject"
+            name="%commandReinstallProject">
+      </command>
+      <command
+            id="org.apache.felix.sigil.runtime.commands.startProject"
+            name="%commandStartProject">
+      </command>
+      <command
+            id="org.apache.felix.sigil.runtime.commands.stopProject"
+            name="%commandStopProject">
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.ui.commandImages">
+      <image
+            commandId="org.apache.felix.sigil.runtime.commands.installProject"
+            icon="etc/images/installBundle.png">
+      </image>
+      <image
+            commandId="org.apache.felix.sigil.runtime.commands.uninstallProject"
+            icon="etc/images/uninstallBundle.png">
+      </image>
+      <image
+            commandId="org.apache.felix.sigil.runtime.commands.reinstallProject"
+            icon="etc/images/refreshBundle.png">
+      </image>
+      <image
+            commandId="org.apache.felix.sigil.runtime.commands.startProject"
+            icon="etc/images/startBundle.png">
+      </image>
+      <image
+            commandId="org.apache.felix.sigil.runtime.commands.stopProject"
+            icon="etc/images/stopBundle.png">
+      </image>
+   </extension>
+   <extension
+         point="org.eclipse.ui.handlers">
+      <handler
+            class="org.cauldron.sigil.runtime.handlers.project.SelectionProjectHandler:install"
+            commandId="org.apache.felix.sigil.runtime.commands.installProject">
+         <activeWhen>
+            <with
+                  variable="selection">
+               <iterate
+                     ifEmpty="false"
+                     operator="or">
+                  <and>
+                     <or>
+	                     <instanceof
+	                           value="org.eclipse.core.resources.IFile">
+	                     </instanceof>
+	                     <instanceof
+	                           value="org.eclipse.core.resources.IProject">
+	                     </instanceof>
+	                 </or>
+                     <test
+                           property="org.cauldron.sigil.isSigilProject"
+                           value="true">
+                     </test>
+                  </and>
+               </iterate>
+            </with>
+         </activeWhen>
+      </handler>      
+      <handler
+            class="org.cauldron.sigil.runtime.handlers.project.SelectionProjectHandler:start"
+            commandId="org.apache.felix.sigil.runtime.commands.startProject">
+         <activeWhen>
+            <with
+                  variable="selection">
+               <iterate
+                     ifEmpty="false"
+                     operator="or">
+                  <and>
+                     <or>
+	                     <instanceof
+	                           value="org.eclipse.core.resources.IFile">
+	                     </instanceof>
+	                     <instanceof
+	                           value="org.eclipse.core.resources.IProject">
+	                     </instanceof>
+	                 </or>
+                     <test
+                           property="org.cauldron.sigil.isSigilProject"
+                           value="true">
+                     </test>
+                  </and>
+               </iterate>
+            </with>
+         </activeWhen>
+      </handler>  
+                <handler
+            class="org.cauldron.sigil.runtime.handlers.project.SelectionProjectHandler:stop"
+            commandId="org.apache.felix.sigil.runtime.commands.stopProject">
+         <activeWhen>
+            <with
+                  variable="selection">
+               <iterate
+                     ifEmpty="false"
+                     operator="or">
+                  <and>
+                     <or>
+	                     <instanceof
+	                           value="org.eclipse.core.resources.IFile">
+	                     </instanceof>
+	                     <instanceof
+	                           value="org.eclipse.core.resources.IProject">
+	                     </instanceof>
+	                 </or>
+                     <test
+                           property="org.cauldron.sigil.isSigilProject"
+                           value="true">
+                     </test>
+                  </and>
+               </iterate>
+            </with>
+         </activeWhen>
+      </handler>      
+      <handler
+            class="org.cauldron.sigil.runtime.handlers.project.SelectionProjectHandler:uninstall"
+            commandId="org.apache.felix.sigil.runtime.commands.uninstallProject">
+         <activeWhen>
+            <with
+                  variable="selection">
+               <iterate
+                     ifEmpty="false"
+                     operator="or">
+                  <and>
+                     <or>
+	                     <instanceof
+	                           value="org.eclipse.core.resources.IFile">
+	                     </instanceof>
+	                     <instanceof
+	                           value="org.eclipse.core.resources.IProject">
+	                     </instanceof>
+	                 </or>
+                     <test
+                           property="org.cauldron.sigil.isSigilProject"
+                           value="true">
+                     </test>
+                  </and>
+               </iterate>
+            </with>
+         </activeWhen>
+      </handler>      
+      <handler
+            class="org.cauldron.sigil.runtime.handlers.project.SelectionProjectHandler:reinstall"
+            commandId="org.apache.felix.sigil.runtime.commands.reinstallProject">
+         <activeWhen>
+            <with
+                  variable="selection">
+               <iterate
+                     ifEmpty="false"
+                     operator="or">
+                  <and>
+                     <or>
+	                     <instanceof
+	                           value="org.eclipse.core.resources.IFile">
+	                     </instanceof>
+	                     <instanceof
+	                           value="org.eclipse.core.resources.IProject">
+	                     </instanceof>
+	                 </or>
+                     <test
+                           property="org.cauldron.sigil.isSigilProject"
+                           value="true">
+                     </test>
+                  </and>
+               </iterate>
+            </with>
+         </activeWhen>
+      </handler>      
+      <handler
+            class="org.cauldron.sigil.runtime.handlers.project.EditorProjectHandler:install"
+            commandId="org.apache.felix.sigil.runtime.commands.installProject">
+         <activeWhen>
+            <with
+                  variable="activePartId">
+               <equals
+                     value="org.cauldron.sigil.editors.SigilProjectEditor">
+               </equals>
+            </with>
+         </activeWhen>
+      </handler>
+      <handler
+            class="org.cauldron.sigil.runtime.handlers.project.EditorProjectHandler:uninstall"
+            commandId="org.apache.felix.sigil.runtime.commands.uninstallProject">
+         <activeWhen>
+            <with
+                  variable="activePartId">
+               <equals
+                     value="org.cauldron.sigil.editors.SigilProjectEditor">
+               </equals>
+            </with>
+         </activeWhen>
+      </handler>
+      <handler
+            class="org.cauldron.sigil.runtime.handlers.project.EditorProjectHandler:reinstall"
+            commandId="org.apache.felix.sigil.runtime.commands.reinstallProject">
+         <activeWhen>
+            <with
+                  variable="activePartId">
+               <equals
+                     value="org.cauldron.sigil.editors.SigilProjectEditor">
+               </equals>
+            </with>
+         </activeWhen>
+      </handler>
+   </extension>
+   <extension
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            locationURI="popup:org.eclipse.ui.popup.any">
+         <separator
+               name="org.cauldron.sigil.runtime.separator"
+               visible="true">
+         </separator>
+            <command
+                  commandId="org.apache.felix.sigil.runtime.commands.installProject"
+                  label="Install Project"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="true">
+               </visibleWhen>
+            </command>
+            <command
+                  commandId="org.apache.felix.sigil.runtime.commands.uninstallProject"
+                  label="Uninstall Project"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="true">
+               </visibleWhen>
+            </command>
+            <command
+                  commandId="org.apache.felix.sigil.runtime.commands.reinstallProject"
+                  label="Reinstall Project"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="true">
+               </visibleWhen>
+            </command>
+            <command
+                  commandId="org.apache.felix.sigil.runtime.commands.startProject"
+                  label="Start Project"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="true">
+               </visibleWhen>
+            </command>
+            <command
+                  commandId="org.apache.felix.sigil.runtime.commands.stopProject"
+                  label="Stop Project"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="true">
+               </visibleWhen>
+            </command>
+      </menuContribution>
+      <menuContribution
+            locationURI="toolbar:org.eclipse.ui.main.toolbar">
+         <toolbar
+               id="org.cauldron.sigil.runtime.toolbar1">
+            <command
+                  commandId="org.apache.felix.sigil.runtime.commands.installProject"
+                  label="Install Project"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="true">
+                  <with
+                        variable="activePartId">
+                     <equals
+                           value="org.cauldron.sigil.editors.SigilProjectEditor">
+                     </equals>
+                  </with>
+               </visibleWhen>
+            </command>
+            <command
+                  commandId="org.apache.felix.sigil.runtime.commands.uninstallProject"
+                  label="Uninstall Project"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="true">
+                  <with
+                        variable="activePartId">
+                     <equals
+                           value="org.cauldron.sigil.editors.SigilProjectEditor">
+                     </equals>
+                  </with>
+               </visibleWhen>
+            </command>
+            <command
+                  commandId="org.apache.felix.sigil.runtime.commands.reinstallProject"
+                  label="Re Install Project"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="true">
+                  <with
+                        variable="activePartId">
+                     <equals
+                           value="org.cauldron.sigil.editors.SigilProjectEditor">
+                     </equals>
+                  </with>
+               </visibleWhen>
+            </command>
+            <command
+                  commandId="org.apache.felix.sigil.runtime.commands.startProject"
+                  label="Start Project"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="true">
+                  <with
+                        variable="activePartId">
+                     <equals
+                           value="org.cauldron.sigil.editors.SigilProjectEditor">
+                     </equals>
+                  </with>
+               </visibleWhen>
+            </command>
+            <command
+                  commandId="org.apache.felix.sigil.runtime.commands.stopProject"
+                  label="Stop Project"
+                  style="push">
+               <visibleWhen
+                     checkEnabled="true">
+                  <with
+                        variable="activePartId">
+                     <equals
+                           value="org.cauldron.sigil.editors.SigilProjectEditor">
+                     </equals>
+                  </with>
+               </visibleWhen>
+            </command>
+         </toolbar>
+      </menuContribution>
+   </extension>
+   <!-- extension
+         point="org.eclipse.ui.contexts">
+      <context
+            id="org.cauldron.sigil.runtime.contexts.compositeEditor"
+            name="Composite Editor"
+            parentId="org.eclipse.ui.textEditorScope">
+      </context>
+   </extension>
+   <extension
+         point="org.eclipse.ui.bindings">
+      <key
+            commandId="org.apache.felix.sigil.runtime.commands.installComposite"
+            contextId="org.cauldron.sigil.runtime.contexts.compositeEditor"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+I">
+      </key>
+      <key
+            commandId="org.apache.felix.sigil.runtime.commands.uninstallComposite"
+            contextId="org.cauldron.sigil.runtime.contexts.compositeEditor"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+U">
+      </key>
+      <key
+            commandId="org.apache.felix.sigil.runtime.commands.reinstallComposite"
+            contextId="org.cauldron.sigil.runtime.contexts.compositeEditor"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+M2+I">
+      </key>
+   </extension -->
+   <!-- extension
+         point="org.eclipse.ui.views">
+      <view
+            category="org.cauldron.sigil.ui.views"
+            class="org.cauldron.sigil.runtime.views.NewtonInstancesView"
+            icon="etc/images/newton.png"
+            id="org.cauldron.sigil.runtime.newtonInstancesView"
+            name="Newton Instances"
+            restorable="true">
+      </view>
+   </extension -->
+   <!-- extension
+         point="org.eclipse.core.runtime.adapters">
+      <factory
+            adaptableType="org.cauldron.sigil.runtime.registry.INewtonRegistry"
+            class="org.cauldron.sigil.runtime.views.DeferredAdapterFactory">
+         <adapter
+               type="org.eclipse.ui.progress.IDeferredWorkbenchAdapter">
+         </adapter>
+      </factory>
+      <factory
+            adaptableType="org.cauldron.sigil.runtime.registry.INewtonInstance"
+            class="org.cauldron.sigil.runtime.views.DeferredAdapterFactory">
+         <adapter
+               type="org.eclipse.ui.progress.IDeferredWorkbenchAdapter">
+         </adapter>
+      </factory>
+      <factory
+            adaptableType="org.cauldron.sigil.runtime.model.IBundleState"
+            class="org.cauldron.sigil.runtime.views.DeferredAdapterFactory">
+         <adapter
+               type="org.eclipse.ui.progress.IDeferredWorkbenchAdapter">
+         </adapter>
+      </factory>
+   </extension -->
+   <!-- extension
+         point="org.eclipse.ui.perspectiveExtensions">
+      <perspectiveExtension
+            targetID="org.cauldron.sigil.ui.perspective1">
+         <viewShortcut
+               id="org.cauldron.sigil.runtime.newtonInstancesView">
+         </viewShortcut>
+      </perspectiveExtension>
+   </extension -->
+   <!-- extension
+         point="org.eclipse.core.runtime.preferences">
+      <initializer
+            class="org.cauldron.sigil.runtime.prefs.PreferenceInitializer">
+      </initializer>
+   </extension -->
+   <!-- extension
+         point="org.eclipse.ui.preferencePages">
+      <page
+            category="org.cauldron.sigil.ui.preferences.SigilPreferencePage"
+            class="org.cauldron.sigil.runtime.prefs.RuntimePreferencesPage"
+            id="org.cauldron.sigil.runtime.preferences.RuntimePreferencesPage"
+            name="Runtime">
+      </page>
+   </extension -->
+   <!-- extension
+         point="org.cauldron.sigil.installbuilder">
+      <builder
+            class="org.cauldron.sigil.runtime.install.NewtonV1_2InstallBuilder">
+      </builder>
+      <builder
+            class="org.cauldron.sigil.runtime.install.NewtonV1_3InstallBuilder">
+      </builder>
+      <builder
+            class="org.cauldron.sigil.runtime.install.NewtonV1_4InstallBuilder">
+      </builder>
+   </extension -->
+   <!-- extension
+         point="org.cauldron.sigil.repositoryprovider">
+      <provider
+            class="org.cauldron.sigil.runtime.repository.PlatformRepositoryProvider"
+            defaultLevel="-2"
+            dynamic="false"
+            id="org.cauldron.sigil.runtime.provider"
+            type="OSGi Platform Repository">
+      </provider>
+   </extension -->
+</plugin>