# HG changeset patch # User Eugene Ostroukhov # Date 1283545557 25200 # Node ID 356e574037782de7d7aa85ad08f9537b87a51a18 # Parent f0031abe2cd6af89963e144715fc857208d939ad Debugger action was moved to Symbian-specific plugin as it slightly conflicts with Eclipse.org policy diff -r f0031abe2cd6 -r 356e57403778 plugins/org.symbian.tools.tmw.debug/icons/debug_exc.gif Binary file plugins/org.symbian.tools.tmw.debug/icons/debug_exc.gif has changed diff -r f0031abe2cd6 -r 356e57403778 plugins/org.symbian.tools.tmw.debug/plugin.xml --- a/plugins/org.symbian.tools.tmw.debug/plugin.xml Thu Sep 02 16:34:16 2010 -0700 +++ b/plugins/org.symbian.tools.tmw.debug/plugin.xml Fri Sep 03 13:25:57 2010 -0700 @@ -15,7 +15,7 @@ id="org.symbian.tools.tmwtools.debug" name="Tools for Mobile Web"> + id="org.symbian.tools.wrttools.wrtwords"> @@ -144,52 +144,6 @@ menubarPath="group.properties"> - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -236,15 +190,6 @@ - - - - - - - - - - - - + + + @@ -260,6 +263,9 @@ id="org.symbian.tools.wrttools.mainPerspective"> + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r f0031abe2cd6 -r 356e57403778 plugins/org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/actions/DebugAction.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/org.symbian.tools.wrttools.product/src/org/symbian/tools/wrttools/product/actions/DebugAction.java Fri Sep 03 13:25:57 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.product.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.tmw.core.TMWCore; + +@SuppressWarnings("restriction") +public class DebugAction extends DebugLastAction { + @Override + public void run(IAction action) { + boolean hasTmwProjects = false; + IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); + for (IProject project : projects) { + if (project.isAccessible() && TMWCore.create(project) != null) { + hasTmwProjects = true; + break; + } + } + if (hasTmwProjects) { + super.run(action); + } else { + MessageDialog.openInformation(getShell(), "Cannot launch debugger", + "There are no open projects in your workspace"); + } + } +}