Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-02-06 06:45:22 +0000
committerUwe Stieber2012-02-06 06:45:22 +0000
commit7cf2200d6a24385ceaacefee9b9f8c31a474e740 (patch)
tree161430cae4473be8087b2c2a8b0d8ebfb2395596
parenta34f0562d1979cd73312e32a1ee7dd83dedebe5e (diff)
downloadorg.eclipse.tcf-7cf2200d6a24385ceaacefee9b9f8c31a474e740.tar.gz
org.eclipse.tcf-7cf2200d6a24385ceaacefee9b9f8c31a474e740.tar.xz
org.eclipse.tcf-7cf2200d6a24385ceaacefee9b9f8c31a474e740.zip
Target Explorer: Extract CDT core dependencies into a separate plugin
-rw-r--r--.gitignore2
-rw-r--r--pom.xml1
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.feature/feature.xml7
-rw-r--r--target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/feature.xml7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.options1
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core.cdt/META-INF/MANIFEST.MF16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core.cdt/build.properties5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core.cdt/plugin.properties12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core.cdt/pom.xml17
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/activator/CoreBundleActivator.java71
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/elf/ElfUtils.java73
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/nls/Messages.java32
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/nls/Messages.properties5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.properties15
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/META-INF/MANIFEST.MF4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/activator/UIPlugin.java55
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/selection/LaunchSelectionManager.java5
21 files changed, 297 insertions, 80 deletions
diff --git a/.gitignore b/.gitignore
index ff1bcaf20..280242293 100644
--- a/.gitignore
+++ b/.gitignore
@@ -67,6 +67,8 @@ tests/plugins/org.eclipse.tcf.debug.test/bin
# target explorer
/target_explorer/plugins/org.eclipse.tcf.te.core/target
/target_explorer/plugins/org.eclipse.tcf.te.core/bin
+/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/target
+/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/bin
/target_explorer/plugins/org.eclipse.tcf.te.launch.core/target
/target_explorer/plugins/org.eclipse.tcf.te.launch.core/bin
/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/target
diff --git a/pom.xml b/pom.xml
index 87faef074..d42c711c4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -61,6 +61,7 @@
<module>target_explorer/plugins/org.eclipse.tcf.te.runtime.statushandler</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.runtime.stepper</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.core</module>
+ <module>target_explorer/plugins/org.eclipse.tcf.te.core.cdt</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.launch.core</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.launch.ui</module>
<module>target_explorer/plugins/org.eclipse.tcf.te.ui</module>
diff --git a/target_explorer/features/org.eclipse.tcf.te.cdt.feature/feature.xml b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/feature.xml
index 363641c2a..0a3c723a8 100644
--- a/target_explorer/features/org.eclipse.tcf.te.cdt.feature/feature.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.feature/feature.xml
@@ -27,6 +27,13 @@
</requires>
<plugin
+ id="org.eclipse.tcf.te.core.cdt"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
id="org.eclipse.tcf.te.ui.terminals.process"
download-size="0"
install-size="0"
diff --git a/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/feature.xml b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/feature.xml
index adb95d686..116099494 100644
--- a/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/feature.xml
+++ b/target_explorer/features/org.eclipse.tcf.te.cdt.sdk.feature/feature.xml
@@ -23,6 +23,13 @@
</requires>
<plugin
+ id="org.eclipse.tcf.te.core.cdt.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
id="org.eclipse.tcf.te.ui.terminals.process.source"
download-size="0"
install-size="0"
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.options b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.options
new file mode 100644
index 000000000..5f7dba44d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.options
@@ -0,0 +1 @@
+org.eclipse.tcf.te.core.cdt/debugmode = 0
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.project b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.project
new file mode 100644
index 000000000..8f9ca3bbe
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.core.cdt</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..2bdb33c93
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Mon Feb 06 07:11:39 CET 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..584fc9ad0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.core.cdt;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.core.cdt.activator.CoreBundleActivator
+Bundle-Vendor: %providerName
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.cdt.core;bundle-version="5.3.1";visibility:=reexport,
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.core.cdt.activator;x-internal:=true,
+ org.eclipse.tcf.te.core.cdt.elf,
+ org.eclipse.tcf.te.core.cdt.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/build.properties
new file mode 100644
index 000000000..f4ae97015
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/plugin.properties
new file mode 100644
index 000000000..628019a1e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/plugin.properties
@@ -0,0 +1,12 @@
+##################################################################################
+# 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
+##################################################################################
+
+pluginName = Target Explorer, Core CDT Extensions
+providerName = Eclipse.org - TCF
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/pom.xml b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/pom.xml
new file mode 100644
index 000000000..a15454df8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/pom.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.tcf</groupId>
+ <artifactId>tcf-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+
+ <version>1.0.0.qualifier</version>
+ <artifactId>org.eclipse.tcf.te.core.cdt</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/activator/CoreBundleActivator.java
new file mode 100644
index 000000000..0cadf6a8f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/activator/CoreBundleActivator.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * 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.core.cdt.activator;
+
+import org.eclipse.tcf.te.runtime.tracing.TraceHandler;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class CoreBundleActivator implements BundleActivator {
+ // The bundle context
+ private static BundleContext context;
+ // The trace handler instance
+ private static TraceHandler traceHandler;
+
+ /**
+ * Returns the bundle context
+ *
+ * @return the bundle context
+ */
+ public static BundleContext getContext() {
+ return context;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getContext() != null && getContext().getBundle() != null) {
+ return getContext().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+
+ /**
+ * Returns the bundles trace handler.
+ *
+ * @return The bundles trace handler.
+ */
+ public static TraceHandler getTraceHandler() {
+ if (traceHandler == null) {
+ traceHandler = new TraceHandler(getUniqueIdentifier());
+ }
+ return traceHandler;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = bundleContext;
+ }
+
+ /* (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ CoreBundleActivator.context = null;
+ traceHandler = null;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/elf/ElfUtils.java b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/elf/ElfUtils.java
new file mode 100644
index 000000000..55c660900
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/elf/ElfUtils.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * 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.core.cdt.elf;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.cdt.utils.elf.Elf;
+import org.eclipse.cdt.utils.elf.Elf.ELFhdr;
+
+/**
+ * Provides ELF file utilities.
+ */
+public final class ElfUtils {
+
+ /**
+ * Returns the ELF image type if the specified file is an ELF file at all.
+ *
+ * @param file The file representation of the physical file to test. Must be not <code>null</code>!
+ * @return The ELF image type as defined within <code>org.eclipse.cdt.utils.elf.Elf.Attribute</code>, or <code>-1</code> if invalid or not detectable.
+ */
+ public static int getELFType(File file) throws IOException {
+ int type = -1;
+
+ if (file != null) {
+ Elf elfFile = null;
+ try {
+ elfFile = new Elf(file.getAbsolutePath());
+ type = elfFile.getAttributes().getType();
+ }
+ finally {
+ if (elfFile != null) {
+ elfFile.dispose();
+ }
+ elfFile = null;
+ }
+ }
+ return type;
+ }
+
+ /**
+ * Returns the ELF address class if the specified file is an ELF file at all.
+ *
+ * @param file The file representation of the physical file to test. Must be not <code>null</code>!
+ * @return The ELF address class as defined within <code>org.eclipse.cdt.utils.elf.Elf.ELFhdr.ELFCLASS*</code>. <code>ELFCLASSNONE</code> (0) if the ELF address class is not set.
+ */
+ public static int getELFClass(File file) throws IOException {
+ int elfclass = Elf.ELFhdr.ELFCLASSNONE;
+
+ if (file != null) {
+ Elf elfFile = null;
+ try {
+ elfFile = new Elf(file.getAbsolutePath());
+ elfclass = elfFile.getELFhdr().e_ident[ELFhdr.EI_CLASS];
+ }
+ finally {
+ if (elfFile != null) {
+ elfFile.dispose();
+ }
+ elfFile = null;
+ }
+ }
+ return elfclass;
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/nls/Messages.java
new file mode 100644
index 000000000..df035fa9e
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/nls/Messages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.core.cdt.nls;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Core plugin externalized strings management.
+ */
+public class Messages extends NLS {
+
+ // The plug-in resource bundle name
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.core.cdt.nls.Messages"; //$NON-NLS-1$
+
+ /**
+ * Static constructor.
+ */
+ static {
+ // Load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ // **** Declare externalized string id's down here *****
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/nls/Messages.properties
new file mode 100644
index 000000000..2e9bb961f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core.cdt/src/org/eclipse/tcf/te/core/cdt/nls/Messages.properties
@@ -0,0 +1,5 @@
+#
+# org.eclipse.tcf.te.core.cdt
+# Externalized Strings.
+#
+
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.java
index ae2936030..4ae8b490b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.java
@@ -29,12 +29,6 @@ public class Messages extends NLS {
// **** Declare externalized string id's down here *****
- public static String ConnectStrategyStepExecutor_checkPoint_normalizationNeeded;
- public static String ConnectStrategyStepExecutor_info_stepFailed;
- public static String ConnectStrategyStepExecutor_warning_stepFailed;
- public static String ConnectStrategyStepExecutor_error_stepFailed;
- public static String ConnectStrategyStepExecutor_stepFailed_debugInfo;
-
public static String ModelNodePersistableAdapter_export_invalidPersistable;
public static String ModelNodePersistableAdapter_export_unknownType;
public static String ModelNodePersistableAdapter_import_invalidReference;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.properties
index f80734b73..f5d3ceb4a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/nls/Messages.properties
@@ -3,21 +3,6 @@
# Externalized Strings.
#
-ConnectStrategyStepExecutor_checkPoint_normalizationNeeded=Step finished with this
-ConnectStrategyStepExecutor_info_stepFailed=Step finished with this information: {0}\n\n\
-Context: {1}\n\
-Connect Strategy: {2}\n\
-Connect Step: {3}
-ConnectStrategyStepExecutor_warning_stepFailed=Step finished with this warning: {0}\n\n\
-Context: {1}\n\
-Connect Strategy: {2}\n\
-Connect Step: {3}
-ConnectStrategyStepExecutor_error_stepFailed=Step finished with this error: {0}\n\n\
-Context: {1}\n\
-Connect Strategy: {2}\n\
-Connect Step: {3}
-ConnectStrategyStepExecutor_stepFailed_debugInfo=Debug info:\n{0}
-
ModelNodePersistableAdapter_export_invalidPersistable=Persistable for object type ''{0}'' provides incomplete information for property ''{1}''.
ModelNodePersistableAdapter_export_unknownType=No strategy to persist an object of type ''{0}'', key = ''{1}''.
ModelNodePersistableAdapter_import_invalidReference=Reference provides incomplete information for property ''{0}'' to restore the object.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/META-INF/MANIFEST.MF
index ee61142ad..dd52f3ceb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/META-INF/MANIFEST.MF
@@ -13,8 +13,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.tcf.te.runtime.model;bundle-version="1.0.0",
org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0",
org.eclipse.tcf.te.runtime.stepper;bundle-version="1.0.0",
- org.eclipse.tcf.te.launch.core;bundle-version="1.0.0",
- org.eclipse.cdt.core;bundle-version="5.3.1"
+ org.eclipse.tcf.te.core.cdt;bundle-version="1.0.0",
+ org.eclipse.tcf.te.launch.core;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/activator/UIPlugin.java
index b314ff35c..855dd8147 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/activator/UIPlugin.java
@@ -9,11 +9,6 @@
*******************************************************************************/
package org.eclipe.tcf.te.launch.ui.activator;
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.cdt.utils.elf.Elf;
-import org.eclipse.cdt.utils.elf.Elf.ELFhdr;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
@@ -116,54 +111,4 @@ public class UIPlugin extends AbstractUIPlugin {
public static ImageDescriptor getImageDescriptor(String key) {
return getDefault().getImageRegistry().getDescriptor(key);
}
-
- /**
- * Returns the ELF image type if the specified file is an ELF file at all.
- *
- * @param file The file representation of the physical file to test. Must be not <code>null</code>!
- * @return The ELF image type as defined within <code>org.eclipse.cdt.utils.elf.Elf.Attribute</code>, or <code>-1</code> if invalid or not detectable.
- */
- public int getELFType(File file) throws IOException {
- int type = -1;
-
- if (file != null) {
- Elf elfFile = null;
- try {
- elfFile = new Elf(file.getAbsolutePath());
- type = elfFile.getAttributes().getType();
- }
- finally {
- if (elfFile != null) {
- elfFile.dispose();
- }
- elfFile = null;
- }
- }
- return type;
- }
-
- /**
- * Returns the ELF address class if the specified file is an ELF file at all.
- *
- * @param file The file representation of the physical file to test. Must be not <code>null</code>!
- * @return The ELF address class as defined within <code>org.eclipse.cdt.utils.elf.Elf.ELFhdr.ELFCLASS*</code>. <code>ELFCLASSNONE</code> (0) if the ELF address class is not set.
- */
- public int getELFClass(File file) throws IOException {
- int elfclass = Elf.ELFhdr.ELFCLASSNONE;
-
- if (file != null) {
- Elf elfFile = null;
- try {
- elfFile = new Elf(file.getAbsolutePath());
- elfclass = elfFile.getELFhdr().e_ident[ELFhdr.EI_CLASS];
- }
- finally {
- if (elfFile != null) {
- elfFile.dispose();
- }
- elfFile = null;
- }
- }
- return elfclass;
- }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/selection/LaunchSelectionManager.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/selection/LaunchSelectionManager.java
index f7d1d35cc..bbc319513 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/selection/LaunchSelectionManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.ui/src/org/eclipe/tcf/te/launch/ui/selection/LaunchSelectionManager.java
@@ -32,6 +32,7 @@ import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.core.cdt.elf.ElfUtils;
import org.eclipse.tcf.te.launch.core.selection.LaunchSelection;
import org.eclipse.tcf.te.launch.core.selection.ProjectSelectionContext;
import org.eclipse.tcf.te.launch.core.selection.RemoteContextSelectionContext;
@@ -251,7 +252,7 @@ public class LaunchSelectionManager {
if (getLocation(file) != null) {
File filePath = getLocation(file).toFile();
try {
- int elfType = UIPlugin.getDefault().getELFType(filePath);
+ int elfType = ElfUtils.getELFType(filePath);
if (file.exists() &&
(elfType == Attribute.ELF_TYPE_EXE || elfType == Attribute.ELF_TYPE_OBJ)) {
location = file.getLocation();
@@ -273,7 +274,7 @@ public class LaunchSelectionManager {
location = getLocation(resource);
if (location != null) {
try {
- int elfType = UIPlugin.getDefault().getELFType(location.toFile());
+ int elfType = ElfUtils.getELFType(location.toFile());
if (elfType != Attribute.ELF_TYPE_EXE && elfType != Attribute.ELF_TYPE_OBJ) {
location = null;
}

Back to the top