Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2012-11-06 12:21:12 +0000
committerTobias Schwarz2012-11-06 12:21:12 +0000
commit0521f21fd2bc5c2edbdad96208a54e75f5ca65d0 (patch)
treee8df890e04fd9d37ac80f6d9b350bffe9c61c763 /target_explorer/plugins/org.eclipse.tcf.te.launch.core
parent9a54b160c879a8b69d8d2b16d7596102019956bd (diff)
downloadorg.eclipse.tcf-0521f21fd2bc5c2edbdad96208a54e75f5ca65d0.tar.gz
org.eclipse.tcf-0521f21fd2bc5c2edbdad96208a54e75f5ca65d0.tar.xz
org.eclipse.tcf-0521f21fd2bc5c2edbdad96208a54e75f5ca65d0.zip
[Target Explorer] change launch config persistence für launch config
editor pages
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/activator/CoreBundleActivator.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/LaunchConfigTypeBindingsManager.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/DelegatingLaunchConfigurationListener.java83
3 files changed, 2 insertions, 89 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java
index 32d1dc6c3..9772e20d4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java
@@ -11,7 +11,6 @@ package org.eclipse.tcf.te.launch.core.activator;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfigurationListener;
-import org.eclipse.tcf.te.launch.core.internal.DelegatingLaunchConfigurationListener;
import org.eclipse.tcf.te.runtime.preferences.ScopedEclipsePreferences;
import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
import org.osgi.framework.BundleActivator;
@@ -79,9 +78,6 @@ public class CoreBundleActivator implements BundleActivator {
@Override
public void start(BundleContext bundleContext) throws Exception {
CoreBundleActivator.context = bundleContext;
-
- launchConfigListener = new DelegatingLaunchConfigurationListener();
- DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(launchConfigListener);
}
/*
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/LaunchConfigTypeBindingsManager.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/LaunchConfigTypeBindingsManager.java
index 7f480fc16..0102b4af8 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/LaunchConfigTypeBindingsManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/bindings/LaunchConfigTypeBindingsManager.java
@@ -95,7 +95,7 @@ public class LaunchConfigTypeBindingsManager {
LaunchConfigTypeBinding binding = bindings.get(typeId);
ILaunchConfigurationType launchConfigType = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType(typeId);
- return (launchConfigType != null && launchConfigType.isPublic() &&
+ return (launchConfigType != null &&
(selection.getLaunchMode() == null || launchConfigType.supportsMode(selection.getLaunchMode())) &&
binding != null && binding.validate(selection) == EvaluationResult.TRUE);
}
@@ -113,7 +113,7 @@ public class LaunchConfigTypeBindingsManager {
LaunchConfigTypeBinding binding = bindings.get(typeId);
ILaunchConfigurationType launchConfigType = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType(typeId);
- return (launchConfigType != null && launchConfigType.isPublic() &&
+ return (launchConfigType != null &&
(mode == null || launchConfigType.supportsMode(mode)) &&
binding != null && binding.validate(mode, context) != EvaluationResult.FALSE);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/DelegatingLaunchConfigurationListener.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/DelegatingLaunchConfigurationListener.java
deleted file mode 100644
index be699d776..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/internal/DelegatingLaunchConfigurationListener.java
+++ /dev/null
@@ -1,83 +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.internal;
-
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationListener;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.tcf.te.launch.core.lm.LaunchManager;
-import org.eclipse.tcf.te.launch.core.lm.interfaces.ILaunchManagerDelegate;
-
-/**
- * DelegatingLaunchConfigurationListener
- */
-public class DelegatingLaunchConfigurationListener implements ILaunchConfigurationListener {
-
- /**
- * Constructor.
- */
- public DelegatingLaunchConfigurationListener() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration)
- */
- @Override
- public void launchConfigurationAdded(ILaunchConfiguration configuration) {
- if (configuration instanceof ILaunchConfigurationWorkingCopy) {
- return;
- }
- ILaunchConfigurationListener listener = getListeningDelegate(configuration);
- if (listener != null) {
- listener.launchConfigurationAdded(configuration);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationChanged(org.eclipse.debug.core.ILaunchConfiguration)
- */
- @Override
- public void launchConfigurationChanged(ILaunchConfiguration configuration) {
- if (configuration instanceof ILaunchConfigurationWorkingCopy) {
- return;
- }
- ILaunchConfigurationListener listener = getListeningDelegate(configuration);
- if (listener != null) {
- listener.launchConfigurationChanged(configuration);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationRemoved(org.eclipse.debug.core.ILaunchConfiguration)
- */
- @Override
- public void launchConfigurationRemoved(ILaunchConfiguration configuration) {
- if (configuration instanceof ILaunchConfigurationWorkingCopy) {
- return;
- }
- ILaunchConfigurationListener listener = getListeningDelegate(configuration);
- if (listener != null) {
- listener.launchConfigurationRemoved(configuration);
- }
- }
-
- private ILaunchConfigurationListener getListeningDelegate(ILaunchConfiguration configuration) {
- try {
- ILaunchManagerDelegate delegate = LaunchManager.getInstance().getLaunchManagerDelegate(configuration.getType(), ""); //$NON-NLS-1$
- if (delegate instanceof ILaunchConfigurationListener) {
- return (ILaunchConfigurationListener)delegate;
- }
- }
- catch (Exception e) {
- }
- return null;
- }
-}

Back to the top