Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-03-16 08:41:43 +0000
committerUwe Stieber2012-03-16 08:41:43 +0000
commitd33fc2597cf5104cf3da6dd6d0e8518d36832cc2 (patch)
treed9a7d7fa7259315fea23e69cd27ff193aa0e4cd9
parent6ff98f737cbf5b289d149b49dd5cd1823be72052 (diff)
downloadorg.eclipse.tcf-d33fc2597cf5104cf3da6dd6d0e8518d36832cc2.tar.gz
org.eclipse.tcf-d33fc2597cf5104cf3da6dd6d0e8518d36832cc2.tar.xz
org.eclipse.tcf-d33fc2597cf5104cf3da6dd6d0e8518d36832cc2.zip
Launches: Mark the TCF remote application launch filtered by default
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/META-INF/MANIFEST.MF8
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/plugin.xml5
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/Activator.java2
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/StartupPreferencesInitializer.java67
4 files changed, 82 insertions, 0 deletions
diff --git a/plugins/org.eclipse.tcf.cdt.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.tcf.cdt.ui/META-INF/MANIFEST.MF
index 9737f58a4..af761700a 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.tcf.cdt.ui/META-INF/MANIFEST.MF
@@ -25,3 +25,11 @@ Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %providerName
+Export-Package: org.eclipse.tcf.internal.cdt.launch;x-internal:=true,
+ org.eclipse.tcf.internal.cdt.ui;x-internal:=true,
+ org.eclipse.tcf.internal.cdt.ui.breakpoints;x-internal:=true,
+ org.eclipse.tcf.internal.cdt.ui.commands;x-internal:=true,
+ org.eclipse.tcf.internal.cdt.ui.disassembly;x-internal:=true,
+ org.eclipse.tcf.internal.cdt.ui.hover;x-internal:=true,
+ org.eclipse.tcf.internal.cdt.ui.launch;x-internal:=true,
+ org.eclipse.tcf.internal.cdt.ui.sourcelookup;x-internal:=true
diff --git a/plugins/org.eclipse.tcf.cdt.ui/plugin.xml b/plugins/org.eclipse.tcf.cdt.ui/plugin.xml
index cde009c22..faef75e1b 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/plugin.xml
+++ b/plugins/org.eclipse.tcf.cdt.ui/plugin.xml
@@ -345,4 +345,9 @@
name="%editor.sourceNotFound.name">
</editor>
</extension>
+
+ <!-- Needed to hide the "TCF Remote Application" launch without disabling it alltogether. -->
+ <extension point="org.eclipse.ui.startup">
+ <startup class="org.eclipse.tcf.internal.cdt.ui.StartupPreferencesInitializer"/>
+ </extension>
</plugin>
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/Activator.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/Activator.java
index 7aef6bc2c..253c88814 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/Activator.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/Activator.java
@@ -30,6 +30,7 @@ public class Activator extends AbstractUIPlugin {
private static TCFBreakpointStatusListener bp_status_listener;
private static TCFBreakpointActions bp_actions;
+ @Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
@@ -42,6 +43,7 @@ public class Activator extends AbstractUIPlugin {
});
}
+ @Override
public void stop(BundleContext context) throws Exception {
Protocol.invokeAndWait(new Runnable() {
public void run() {
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/StartupPreferencesInitializer.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/StartupPreferencesInitializer.java
new file mode 100644
index 000000000..087c01860
--- /dev/null
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/StartupPreferencesInitializer.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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.internal.cdt.ui;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.ui.IStartup;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Set the default TCF CDT plugin preferences
+ */
+@SuppressWarnings("restriction")
+public class StartupPreferencesInitializer extends AbstractPreferenceInitializer implements IStartup {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IStartup#earlyStartup()
+ */
+ public void earlyStartup() {
+ PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
+
+ public void run() {
+ initializeDefaultPreferences();
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+
+ // "TCF Remote Application" launch is hidden by default.
+ // No longer supported or maintained.
+ IPreferenceStore store = DebugUIPlugin.getDefault().getPreferenceStore();
+ if (store != null) {
+ store.setValue(IInternalDebugUIConstants.PREF_FILTER_LAUNCH_TYPES, true);
+
+ boolean added = false;
+ String typeId = "org.eclipse.tcf.cdt.launch.remoteApplicationLaunchType"; //$NON-NLS-1$
+
+ String typeList = store.getString(IInternalDebugUIConstants.PREF_FILTER_TYPE_LIST);
+ if ("".equals(typeList)) typeList = store.getDefaultString(IInternalDebugUIConstants.PREF_FILTER_TYPE_LIST);
+ if ("".equals(typeList)) {
+ typeList = typeId;
+ added = true;
+ } else if (!typeList.contains(typeId)) {
+ typeList = typeList + "," + typeId; //$NON-NLS-1$
+ added = true;
+ }
+ if (added) {
+ store.putValue(IInternalDebugUIConstants.PREF_FILTER_TYPE_LIST, typeList);
+ }
+ }
+ }
+
+}

Back to the top