--- a/org.symbian.tools.wrttools.debug.core/plugin.xml Mon Jun 07 11:10:26 2010 -0700
+++ b/org.symbian.tools.wrttools.debug.core/plugin.xml Mon Jun 07 11:54:39 2010 -0700
@@ -181,7 +181,7 @@
</or>
</enablement>
<action
- class="org.eclipse.debug.internal.ui.actions.DebugLastAction"
+ class="org.symbian.tools.wrttools.debug.ui.actions.DebugAction"
enablesFor="+"
icon="icons/debug_exc.gif"
id="org.eclipse.debug.ui.contextualLaunch.debug.submenu"
@@ -288,11 +288,12 @@
id="org.symbian.tools.wrttools.debug.core.mainActions"
label="WRT Debug">
<action
- class="org.eclipse.debug.internal.ui.actions.DebugLastAction"
+ class="org.symbian.tools.wrttools.debug.ui.actions.DebugAction"
helpContextId="debug_last_action_context"
icon="icons/debug_exc.gif"
id="org.symbian.tools.wrttools.debug.core.debug"
label="Debug"
+ menubarPath="org.eclipse.ui.run/relaunchGroup"
style="push"
toolbarPath="debug">
</action>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.wrttools.debug.core/src/org/symbian/tools/wrttools/debug/ui/actions/DebugAction.java Mon Jun 07 11:54:39 2010 -0700
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Symbian Foundation - initial contribution.
+ * Contributors:
+ * Description:
+ * Overview:
+ * Details:
+ * Platforms/Drives/Compatibility:
+ * Assumptions/Requirement/Pre-requisites:
+ * Failures and causes:
+ */
+package org.symbian.tools.wrttools.debug.ui.actions;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.debug.internal.ui.actions.DebugLastAction;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.symbian.tools.wrttools.util.ProjectUtils;
+
+@SuppressWarnings("restriction")
+public class DebugAction extends DebugLastAction {
+ @Override
+ public void run(IAction action) {
+ boolean hasWrtProjects = false;
+ IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ for (IProject project : projects) {
+ if (project.isAccessible() && ProjectUtils.hasWrtNature(project)) {
+ hasWrtProjects = true;
+ break;
+ }
+ }
+ if (hasWrtProjects) {
+ super.run(action);
+ } else {
+ MessageDialog.openInformation(getShell(), "Cannot launch debugger",
+ "There are no open projects in your workspace");
+ }
+ }
+}
--- a/org.symbian.tools.wrttools.product/plugin.xml Mon Jun 07 11:10:26 2010 -0700
+++ b/org.symbian.tools.wrttools.product/plugin.xml Mon Jun 07 11:54:39 2010 -0700
@@ -81,6 +81,42 @@
</activityPatternBinding>
<activityPatternBinding
activityId="org.symbian.tools.wrttools.product.wtp"
+ pattern="org\.eclipse\.debug\.ui/org\.eclipse\.debug\.ui\.launchActionSet">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.symbian.tools.wrttools.product.wtp"
+ pattern="org\.eclipse\.debug\.ui/org\.eclipse\.debug\.ui\.actions\.DebugLast">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.symbian.tools.wrttools.product.wtp"
+ pattern="org\.eclipse\.debug\.ui/org\.eclipse\.debug\.ui\.actions\.RunLast">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.symbian.tools.wrttools.product.wtp"
+ pattern="org\.eclipse\.debug\.ui/org\.eclipse\.debug\.ui\.actions\.OpenDebugConfigurations">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.symbian.tools.wrttools.product.wtp"
+ pattern="org\.eclipse\.debug\.ui/org\.eclipse\.debug\.ui\.actions\.OpenRunConfigurations">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.symbian.tools.wrttools.product.wtp"
+ pattern="org\.eclipse\.debug\.ui/org\.eclipse\.debug\.internal\.ui\.actions\.DebugHistoryMenuAction">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.symbian.tools.wrttools.product.wtp"
+ pattern="org\.eclipse\.debug\.ui/org\.eclipse\.debug\.internal\.ui\.actions\.RunHistoryMenuAction">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.symbian.tools.wrttools.product.wtp"
+ pattern="org\.eclipse\.debug\.ui/org\.eclipse\.debug\.internal\.ui\.actions\.RunWithConfigurationAction">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.symbian.tools.wrttools.product.wtp"
+ pattern="org\.eclipse\.debug\.ui/org\.eclipse\.debug\.internal\.ui\.actions\.DebugWithConfigurationAction">
+ </activityPatternBinding>
+ <activityPatternBinding
+ activityId="org.symbian.tools.wrttools.product.wtp"
pattern="org\.eclipse\.wst\.xml\.ui/org\.eclipse\.wst\.xml\.ui\.XMLExampleProjectCreationWizard">
</activityPatternBinding>
<activityPatternBinding