Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2012-06-18 07:32:11 +0000
committerUwe Stieber2012-06-18 08:07:55 +0000
commitae60b7594a2b6a69891b4eeef373401657a4e997 (patch)
treef2280ac831bb4388a3fb5226b1e3cb0e8c3b899d /target_explorer/plugins/org.eclipse.tcf.te.launch.core
parent4bb8e30d69a4451b945a9bd72dec0f52e6006ce0 (diff)
downloadorg.eclipse.tcf-ae60b7594a2b6a69891b4eeef373401657a4e997.tar.gz
org.eclipse.tcf-ae60b7594a2b6a69891b4eeef373401657a4e997.tar.xz
org.eclipse.tcf-ae60b7594a2b6a69891b4eeef373401657a4e997.zip
Target Explorer: ADD attach launch
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.launch.core')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/AbstractLaunchConfigurationDelegate.java56
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java34
2 files changed, 33 insertions, 57 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/AbstractLaunchConfigurationDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/AbstractLaunchConfigurationDelegate.java
deleted file mode 100644
index 3a3fff567..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/AbstractLaunchConfigurationDelegate.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.launch.core.delegates;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
-import org.eclipse.tcf.te.launch.core.nls.Messages;
-
-/**
- * Abstract launch configuration delegate implementation.
- */
-public abstract class AbstractLaunchConfigurationDelegate extends LaunchConfigurationDelegate {
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#buildProjects(org.eclipse.core.resources.IProject[], org.eclipse.core.runtime.IProgressMonitor)
- * <p>
- * This method is a copy of the super implementation, except it does not lock the workspace to perform the build.
- * This is required to support "Edit while build is ongoing".
- */
- @Override
- protected void buildProjects(final IProject[] projects, IProgressMonitor monitor) throws CoreException {
- IWorkspaceRunnable build = new IWorkspaceRunnable(){
- @Override
- public void run(IProgressMonitor pm) throws CoreException {
- SubMonitor localmonitor = SubMonitor.convert(pm, Messages.AbstractLaunchConfigurationDelegate_scoped_incremental_build, projects.length);
- try {
- for (int i = 0; i < projects.length; i++ ) {
- if (localmonitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- projects[i].build(IncrementalProjectBuilder.INCREMENTAL_BUILD, localmonitor.newChild(1));
- }
- } finally {
- localmonitor.done();
- }
- }
- };
- ResourcesPlugin.getWorkspace().run(build, null, IWorkspace.AVOID_UPDATE, monitor);
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java
index a77bb7086..ce100c35c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/delegates/LaunchConfigurationDelegate.java
@@ -15,14 +15,19 @@ import java.util.List;
import java.util.ListIterator;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -68,7 +73,34 @@ import org.eclipse.tcf.te.runtime.stepper.stepper.Stepper;
* <li>The launch configuration delegate creates launches of type {@link Launch}.</li>
* </ul>
*/
-public class LaunchConfigurationDelegate extends AbstractLaunchConfigurationDelegate {
+public class LaunchConfigurationDelegate extends org.eclipse.debug.core.model.LaunchConfigurationDelegate {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#buildProjects(org.eclipse.core.resources.IProject[], org.eclipse.core.runtime.IProgressMonitor)
+ * <p>
+ * This method is a copy of the super implementation, except it does not lock the workspace to perform the build.
+ * This is required to support "Edit while build is ongoing".
+ */
+ @Override
+ protected void buildProjects(final IProject[] projects, IProgressMonitor monitor) throws CoreException {
+ IWorkspaceRunnable build = new IWorkspaceRunnable(){
+ @Override
+ public void run(IProgressMonitor pm) throws CoreException {
+ SubMonitor localmonitor = SubMonitor.convert(pm, Messages.AbstractLaunchConfigurationDelegate_scoped_incremental_build, projects.length);
+ try {
+ for (IProject project : projects) {
+ if (localmonitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, localmonitor.newChild(1));
+ }
+ } finally {
+ localmonitor.done();
+ }
+ }
+ };
+ ResourcesPlugin.getWorkspace().run(build, null, IWorkspace.AVOID_UPDATE, monitor);
+ }
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)

Back to the top