You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2010/07/22 23:58:19 UTC
svn commit: r966873 - in /pivot/trunk/eclipse: ./
src/org/apache/pivot/eclipse/
Author: gbrown
Date: Thu Jul 22 21:58:19 2010
New Revision: 966873
URL: http://svn.apache.org/viewvc?rev=966873&view=rev
Log:
Updates to Eclipse plugin.
Added:
pivot/trunk/eclipse/src/org/apache/pivot/eclipse/PivotApplicationLaunchShortcut.java
pivot/trunk/eclipse/src/org/apache/pivot/eclipse/PivotScriptApplicationLaunchShortcut.java
- copied, changed from r966599, pivot/trunk/eclipse/src/org/apache/pivot/eclipse/ScriptApplicationLaunchShortcut.java
Removed:
pivot/trunk/eclipse/src/org/apache/pivot/eclipse/ScriptApplicationLaunchConfigurationDelegate.java
pivot/trunk/eclipse/src/org/apache/pivot/eclipse/ScriptApplicationLaunchShortcut.java
pivot/trunk/eclipse/src/org/apache/pivot/eclipse/ScriptApplicationMainTab.java
pivot/trunk/eclipse/src/org/apache/pivot/eclipse/ScriptApplicationTabGroup.java
Modified:
pivot/trunk/eclipse/plugin.xml
Modified: pivot/trunk/eclipse/plugin.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/eclipse/plugin.xml?rev=966873&r1=966872&r2=966873&view=diff
==============================================================================
--- pivot/trunk/eclipse/plugin.xml (original)
+++ pivot/trunk/eclipse/plugin.xml Thu Jul 22 21:58:19 2010
@@ -16,37 +16,50 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
See the License for the specific language governing permissions and
limitations under the License.
-->
-
<plugin>
- <extension point="org.eclipse.debug.core.launchConfigurationTypes">
- <launchConfigurationType name="Pivot Script Application"
- delegate="org.apache.pivot.eclipse.ScriptApplicationLaunchDelegate"
- id="org.apache.pivot.eclipse.scriptApplication"
- modes="run, debug"/>
- </extension>
-
- <extension point="org.eclipse.debug.ui.launchConfigurationTypeImages">
- <launchConfigurationTypeImage icon="icons/logo-notext-16x16.png"
- configTypeID="org.apache.pivot.eclipse.scriptApplication"
- id="org.apache.pivot.eclipse.launchConfigurationTypeImage.scriptApplication">
- </launchConfigurationTypeImage>
- </extension>
-
- <extension point="org.eclipse.debug.ui.launchConfigurationTabGroups">
- <launchConfigurationTabGroup type="org.apache.pivot.eclipse.scriptApplication"
- class="org.apache.pivot.eclipse.ScriptApplicationTabGroup"
- id="org.apache.pivot.eclipse.launchConfigurationTabGroup.scriptApplication">
- </launchConfigurationTabGroup>
+ <extension point="org.eclipse.debug.ui.launchShortcuts">
+ <shortcut class="org.apache.pivot.eclipse.PivotApplicationLaunchShortcut"
+ icon="icons/logo-notext-16x16.png"
+ label="Pivot Application"
+ id="org.apache.pivot.eclipse.pivotApplicationLaunchShortcut"
+ modes="run, debug">
+ <contextualLaunch>
+ <enablement>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate>
+ <and>
+ <instanceof value="org.eclipse.jdt.core.IJavaElement"/>
+ <test property="org.eclipse.jdt.launching.extendsInterface"
+ args="org.apache.pivot.wtk.Application"/>
+ </and>
+ </iterate>
+ </with>
+ </enablement>
+ </contextualLaunch>
+ </shortcut>
</extension>
<extension point="org.eclipse.debug.ui.launchShortcuts">
- <shortcut class="org.eclipse.jdt.debug.ui.launchConfigurations.JavaAppletLaunchShortcut"
- description="%AppletLaunchShortcut.description"
- helpContextId="org.eclipse.jdt.debug.ui.shortcut_java_applet"
- icon="$nl$/icons/full/etool16/java_applet.gif"
- id="org.eclipse.jdt.debug.ui.javaAppletShortcut"
- label="%AppletShortcut.label"
+ <shortcut class="org.apache.pivot.eclipse.PivotScriptApplicationLaunchShortcut"
+ icon="icons/logo-notext-16x16.png"
+ label="Pivot Script Application"
+ id="org.apache.pivot.eclipse.pivotScriptApplicationLaunchShortcut"
modes="run, debug">
+ <contextualLaunch>
+ <enablement>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate>
+ <and>
+ <instanceof value="org.eclipse.core.resources.IFile"/>
+ <test property="org.eclipse.debug.ui.matchesPattern"
+ value="*.bxml"/>
+ </and>
+ </iterate>
+ </with>
+ </enablement>
+ </contextualLaunch>
</shortcut>
</extension>
</plugin>
\ No newline at end of file
Added: pivot/trunk/eclipse/src/org/apache/pivot/eclipse/PivotApplicationLaunchShortcut.java
URL: http://svn.apache.org/viewvc/pivot/trunk/eclipse/src/org/apache/pivot/eclipse/PivotApplicationLaunchShortcut.java?rev=966873&view=auto
==============================================================================
--- pivot/trunk/eclipse/src/org/apache/pivot/eclipse/PivotApplicationLaunchShortcut.java (added)
+++ pivot/trunk/eclipse/src/org/apache/pivot/eclipse/PivotApplicationLaunchShortcut.java Thu Jul 22 21:58:19 2010
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+package org.apache.pivot.eclipse;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.debug.ui.launchConfigurations.JavaLaunchShortcut;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jface.operation.IRunnableContext;
+
+public class PivotApplicationLaunchShortcut extends JavaLaunchShortcut {
+ @Override
+ protected ILaunchConfiguration createConfiguration(IType type) {
+ // TODO
+ return null;
+ }
+
+ @Override
+ protected ILaunchConfigurationType getConfigurationType() {
+ ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
+ return launchManager.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
+ }
+
+ @Override
+ protected IType[] findTypes(Object[] elements, IRunnableContext context)
+ throws InterruptedException, CoreException {
+ // TODO
+ return null;
+ }
+
+ @Override
+ protected String getTypeSelectionTitle() {
+ return "Select Type"; // TODO i18n
+ }
+
+ @Override
+ protected String getEditorEmptyMessage() {
+ return "Editor does not contain a launchable type."; // TODO i18n
+ }
+
+ @Override
+ protected String getSelectionEmptyMessage() {
+ return "Selection does not contain a launchable type."; // TODO i18n
+ }
+}
Copied: pivot/trunk/eclipse/src/org/apache/pivot/eclipse/PivotScriptApplicationLaunchShortcut.java (from r966599, pivot/trunk/eclipse/src/org/apache/pivot/eclipse/ScriptApplicationLaunchShortcut.java)
URL: http://svn.apache.org/viewvc/pivot/trunk/eclipse/src/org/apache/pivot/eclipse/PivotScriptApplicationLaunchShortcut.java?p2=pivot/trunk/eclipse/src/org/apache/pivot/eclipse/PivotScriptApplicationLaunchShortcut.java&p1=pivot/trunk/eclipse/src/org/apache/pivot/eclipse/ScriptApplicationLaunchShortcut.java&r1=966599&r2=966873&rev=966873&view=diff
==============================================================================
--- pivot/trunk/eclipse/src/org/apache/pivot/eclipse/ScriptApplicationLaunchShortcut.java (original)
+++ pivot/trunk/eclipse/src/org/apache/pivot/eclipse/PivotScriptApplicationLaunchShortcut.java Thu Jul 22 21:58:19 2010
@@ -16,48 +16,6 @@
*/
package org.apache.pivot.eclipse;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.debug.ui.launchConfigurations.JavaLaunchShortcut;
-import org.eclipse.jface.operation.IRunnableContext;
-
-public class ScriptApplicationLaunchShortcut extends JavaLaunchShortcut {
- @Override
- protected ILaunchConfiguration createConfiguration(IType type) {
- // TODO
- return null;
- }
-
- @Override
- protected ILaunchConfigurationType getConfigurationType() {
- // TODO
- return null;
- }
-
- @Override
- protected IType[] findTypes(Object[] elements, IRunnableContext context)
- throws InterruptedException, CoreException {
- // TODO
- return null;
- }
-
- @Override
- protected String getTypeSelectionTitle() {
- // TODO
- return null;
- }
-
- @Override
- protected String getEditorEmptyMessage() {
- // TODO
- return null;
- }
-
- @Override
- protected String getSelectionEmptyMessage() {
- // TODO
- return null;
- }
+public class PivotScriptApplicationLaunchShortcut extends PivotApplicationLaunchShortcut {
+ // TODO
}