Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2011-12-02 05:47:57 +0000
committerUwe Stieber2011-12-02 05:47:57 +0000
commit4548b374b46032d5f4703b4bf0d6a1e725672fd5 (patch)
treeab96457e935a347a60904ee8100ebf68510b0e2b /target_explorer/plugins/org.eclipse.tcf.te.core
parent8cf3b1a1135df5cd35a1ea208cff9e10574c374e (diff)
downloadorg.eclipse.tcf-4548b374b46032d5f4703b4bf0d6a1e725672fd5.tar.gz
org.eclipse.tcf-4548b374b46032d5f4703b4bf0d6a1e725672fd5.tar.xz
org.eclipse.tcf-4548b374b46032d5f4703b4bf0d6a1e725672fd5.zip
Target Explorer: Remove some unused parts which turned out not to be needed
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.core')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/plugin.xml19
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/schema/connectStrategies.exsd283
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/schema/connectionTypeBindings.exsd144
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/schema/connectionTypes.exsd230
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/ConnectionType.java227
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/interfaces/IConnectStrategy.java91
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/interfaces/IConnectionType.java56
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/interfaces/IConnectionTypeConstants.java115
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/managers/ConnectStrategyExtensionPointManager.java133
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/managers/ConnectionTypeBindingsManager.java257
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/managers/ConnectionTypeExtensionPointManager.java84
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/strategy/ConnectStrategyStepExecutor.java101
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/strategy/ConnectStrategyStepGroup.java59
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/strategy/ConnectStrategyStepper.java141
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/model/interfaces/IConnectable.java93
16 files changed, 0 insertions, 2038 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF
index fc52156d6..27bdfda4c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/META-INF/MANIFEST.MF
@@ -19,10 +19,5 @@ Export-Package: org.eclipse.tcf.te.core.activator;x-internal:=true,
org.eclipse.tcf.te.core.adapters,
org.eclipse.tcf.te.core.async,
org.eclipse.tcf.te.core.async.interfaces,
- org.eclipse.tcf.te.core.connection,
- org.eclipse.tcf.te.core.connection.interfaces,
- org.eclipse.tcf.te.core.connection.managers,
- org.eclipse.tcf.te.core.connection.strategy,
- org.eclipse.tcf.te.core.model.interfaces,
org.eclipse.tcf.te.core.nls;x-internal:=true,
org.eclipse.tcf.te.core.utils.text
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.xml
index da351761c..b9d868d1e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.core/plugin.xml
@@ -2,10 +2,6 @@
<?eclipse version="3.4"?>
<plugin>
-<!-- Extension point contributions -->
- <extension-point id="connectionTypes" name="Connection Type Contributions" schema="schema/connectionTypes.exsd"/>
- <extension-point id="connectionTypeBindings" name="Connection Type Bindings Contributions" schema="schema/connectionTypeBindings.exsd"/>
-
<!-- Adapter factory contributions -->
<extension point="org.eclipse.core.runtime.adapters">
<factory
@@ -27,19 +23,4 @@
</extension>
-<!-- Reusable core expression fragments -->
- <extension point="org.eclipse.core.expressions.definitions">
-
- <!-- Expression to test if the selection contains only one element which
- is an connectable model node -->
- <definition id="te.core.expression.isConnectable">
- <with variable="selection">
- <count value="1"/>
- <iterate operator="and" ifEmpty="false">
- <instanceof value="org.eclipse.tcf.te.core.model.interfaces.IConnectable"/>
- </iterate>
- </with>
- </definition>
- </extension>
-
</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/schema/connectStrategies.exsd b/target_explorer/plugins/org.eclipse.tcf.te.core/schema/connectStrategies.exsd
deleted file mode 100644
index fb240a9db..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/schema/connectStrategies.exsd
+++ /dev/null
@@ -1,283 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tcf.te.core" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.tcf.te.core" id="connectStrategies" name="Connect Strategies"/>
- </appinfo>
- <documentation>
- This extension point is used to contribute connect strategies.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="connectStrategy" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="connectStrategy">
- <annotation>
- <documentation>
- Declares a Target Explorer connect strategy contribution.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="class" minOccurs="0" maxOccurs="1"/>
- <element ref="description" minOccurs="0" maxOccurs="1"/>
- <element ref="stepGroups" minOccurs="0" maxOccurs="1"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The unique id of the connect strategy.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- The label representing the connect strategy within the UI.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
- The connect strategy class that implements &lt;code&gt;org.eclipse.tcf.te.core.connection.interfaces.IConnectStrategy&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.core.connection.AbstractConnectStrategy&lt;/code&gt;.
-&lt;p&gt;
-The connect strategy implementation class must be specified either by the class attribute or the class child element!
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.core.connection.AbstractConnectStrategy:org.eclipse.tcf.te.core.connection.interfaces.IConnectStrategy"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="description" type="string">
- <annotation>
- <documentation>
- A short description of the connect strategy to be presented in the UI.
- </documentation>
- </annotation>
- </element>
-
- <element name="class">
- <annotation>
- <documentation>
- &lt;p&gt;Used when creating an &lt;code&gt;IExecutableExtension&lt;/code&gt; with a named parameter, or more than one.&lt;/p&gt;
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
- The connect strategy class that implements &lt;code&gt;org.eclipse.tcf.te.core.connection.interfaces.IConnectStrategy&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.core.connection.AbstractConnectStrategy&lt;/code&gt;.
-&lt;p&gt;
-The connect strategy implementation class must be specified either by the class attribute or the class child element!
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.core.connection.AbstractConnectStrategy:org.eclipse.tcf.te.core.connection.interfaces.IConnectStrategy"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="parameter">
- <annotation>
- <documentation>
- &lt;p&gt;A parameter for an &lt;code&gt;IExecutableExtension&lt;/code&gt;.&lt;/p&gt;
- </documentation>
- </annotation>
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- &lt;p&gt;The parameter name.&lt;/p&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="value" type="string" use="required">
- <annotation>
- <documentation>
- &lt;p&gt;The parameter value.&lt;/p&gt;
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="stepGroups">
- <annotation>
- <documentation>
- The container the step groups are declared in.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="stepGroup" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="stepGroup">
- <annotation>
- <documentation>
- A connect strategy step group.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="step" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="id" use="required">
- <annotation>
- <documentation>
- The unique id of the connect strategy step group.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier"/>
- </appinfo>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="org.eclipse.tcf.te.core.steps.connect">
- </enumeration>
- <enumeration value="org.eclipse.tcf.te.core.steps.disconnect">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- <attribute name="label" type="string">
- <annotation>
- <documentation>
- The label representing the step group in the UI.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="step">
- <annotation>
- <documentation>
- A connect strategy step.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The unique id of the connect strategy step.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- The label representing the connect strategy step in the UI.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- The class implementing the connect strategy step.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.tcf.te.core.stepper.interfaces.IContextStep"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- Target Explorer 1.0.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- This is an example of the extension point usage:
-&lt;p&gt;
-&lt;pre&gt;&lt;code&gt;
- &lt;extension point=&quot;org.eclipse.tcf.te.core.connectStrategies&quot;&gt;
- &lt;connectStrategy
- id=&quot;org.eclipse.tcf.te.core.strategies.SshConnectStrategy&quot;
- class=&quot;org.eclipse.tcf.te.core.connection.strategies.SshConnectStrategy&quot;
- label=&quot;Ssh Connect Strategy&quot;&gt;
- &lt;/connectStrategy&gt;
- &lt;/extension&gt;
-&lt;/code&gt;&lt;/pre&gt;
- </documentation>
- </annotation>
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2011 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.
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiInfo"/>
- </appinfo>
- <documentation>
- The provider of a connect strategy must implement &lt;samp&gt;org.eclipse.tcf.te.core.interfaces.IConnectStrategy&lt;/samp&gt;.
- </documentation>
- </annotation>
-
-</schema>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/schema/connectionTypeBindings.exsd b/target_explorer/plugins/org.eclipse.tcf.te.core/schema/connectionTypeBindings.exsd
deleted file mode 100644
index 7b5bda24b..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/schema/connectionTypeBindings.exsd
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tcf.te.core" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.tcf.te.core" id="connectionTypeBindings" name="Connection Type Bindings"/>
- </appinfo>
- <documentation>
- This extension point is used to contribute connection types bindings.
- </documentation>
- </annotation>
-
- <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="connectionTypeBinding" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="connectionTypeBinding">
- <annotation>
- <documentation>
- Declares a connection type binding.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="connectStrategy" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="enablement" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="connectionTypeId" type="string" use="required">
- <annotation>
- <documentation>
- The full qualified id of the connection type contribution.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="connectStrategy">
- <annotation>
- <documentation>
- The connect strategy to bind to the connection type.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The full qualified id of the connect strategy contribution.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.core.connectStrategies/connectStrategy/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="overwrite" type="string">
- <annotation>
- <documentation>
- The full qualified id of the connect strategy contribution to overwrite by this contribution.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.core.connectStrategies/connectStrategy/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- Target Explorer 1.0.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- This is an example of the extension point usage:
-&lt;p&gt;
-&lt;pre&gt;
- &lt;connectionTypeBinding connectionTypeId=&quot;org.eclipse.tcf.te.core.connection.ssh&quot;&gt;
- &lt;enablement&gt;
- ...
- &lt;/enablement&gt;
- ...
- &lt;/connectionTypeBinding&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2011 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.
- </documentation>
- </annotation>
-
-</schema>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/schema/connectionTypes.exsd b/target_explorer/plugins/org.eclipse.tcf.te.core/schema/connectionTypes.exsd
deleted file mode 100644
index 706a3a62c..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/schema/connectionTypes.exsd
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tcf.te.core" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.tcf.te.core" id="connectionTypes" name="Connection Types"/>
- </appinfo>
- <documentation>
- This extension point is used to contribute connection types.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="connectionType" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="connectionType">
- <annotation>
- <documentation>
- Declares a Target Explorer connection type contribution.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="class" minOccurs="0" maxOccurs="1"/>
- <element ref="description" minOccurs="0" maxOccurs="1"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The unique id of the connection type contribution.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="label" type="string" use="required">
- <annotation>
- <documentation>
- The label representing the connection type within the UI.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
- The connection type class that implements &lt;code&gt;org.eclipse.tcf.te.core.connection.interfaces.IConnectionType&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.core.connection.ConnectionType&lt;/code&gt;.
-&lt;p&gt;
-The connection type implementation class must be specified either by the class attribute or the class child element!
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.core.connection.ConnectionType:org.eclipse.tcf.te.core.connection.interfaces.IConnectionType"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="isEnabled" type="boolean" use="default" value="true">
- <annotation>
- <documentation>
- Setting this attribute to &lt;code&gt;false&lt;/code&gt; disables this connection type explicitly. If set to &lt;code&gt;true&lt;/code&gt;, the connection type may be still disabled by other conditions like disabled capabilities.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="shortName" type="string">
- <annotation>
- <documentation>
- An optional short name for the connection type for default naming of connections and launches.
-&lt;p&gt;
-Can be specified as parameter if the connection type implementation class is specified with the class child element. The parameter key is &quot;shortname&quot;.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="categoryId" type="string">
- <annotation>
- <documentation>
- The category id this connection type will be sorted in within the new connection wizard.
-&lt;p&gt;
-Can be specified as parameter if the connection type implementation class is specified with the class child element. The parameter key is &quot;categoryId&quot;.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.rse.ui.newConnectionWizards/category/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="description" type="string">
- <annotation>
- <documentation>
- A short description of the connection type to be presented in the UI.
- </documentation>
- </annotation>
- </element>
-
- <element name="class">
- <annotation>
- <documentation>
- &lt;p&gt;Used when creating an &lt;code&gt;IExecutableExtension&lt;/code&gt; with a named parameter, or more than one.&lt;/p&gt;
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="class" type="string">
- <annotation>
- <documentation>
- The connection type class that implements &lt;code&gt;org.eclipse.tcf.te.core.connection.interfaces.IConnectionType&lt;/code&gt; or extends &lt;code&gt;org.eclipse.tcf.te.core.connection.ConnectionType&lt;/code&gt;.
-&lt;p&gt;
-The connection type implementation class must be specified either by the class attribute or the class child element!
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.tcf.te.core.connection.ConnectionType:org.eclipse.tcf.te.core.connection.interfaces.IConnectionType"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="parameter">
- <annotation>
- <documentation>
- &lt;p&gt;A parameter for an &lt;code&gt;IExecutableExtension&lt;/code&gt;.&lt;/p&gt;
- </documentation>
- </annotation>
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- &lt;p&gt;The parameter name.&lt;/p&gt;
- </documentation>
- </annotation>
- </attribute>
- <attribute name="value" type="string" use="required">
- <annotation>
- <documentation>
- &lt;p&gt;The parameter value.&lt;/p&gt;
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- Target Explorer 1.0.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- This is an example of the extension point usage:
-&lt;p&gt;
-&lt;pre&gt;&lt;code&gt;
- &lt;extension point=&quot;org.eclipse.tcf.te.core.connectionTypes&quot;&gt;
- &lt;connectionType
- id=&quot;org.eclipse.tcf.te.core.connection.ssh&quot;
- class=&quot;org.eclipse.tcf.te.core.connection.types.SSHConnectionType&quot;
- shortName=&quot;SSH&quot;
- label=&quot;SSH Connection&quot;
- isEnabled=&quot;true&quot;&gt;
- &lt;/connectionType&gt;
- &lt;/extension&gt;
-&lt;/code&gt;&lt;/pre&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- The provider of a connection type must implement &lt;samp&gt;org.eclipse.tcf.te.core.interfaces.IConnectionType&lt;/samp&gt;.
- </documentation>
- </annotation>
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2011 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.
- </documentation>
- </annotation>
-
-</schema>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/ConnectionType.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/ConnectionType.java
deleted file mode 100644
index 52a907f62..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/ConnectionType.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.connection;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.tcf.te.core.activator.CoreBundleActivator;
-import org.eclipse.tcf.te.core.connection.interfaces.IConnectionType;
-import org.eclipse.tcf.te.core.connection.interfaces.IConnectionTypeConstants;
-import org.eclipse.tcf.te.core.utils.text.StringUtil;
-import org.eclipse.tcf.te.runtime.nls.Messages;
-import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
-
-/**
- * Connection type implementation.
- */
-public class ConnectionType extends PropertiesContainer implements IConnectionType {
-
- /**
- * Initialize the default connection type properties.
- * <p>
- * <b>Note:</b> This method is called from {@link #setInitializationData(IConfigurationElement, String, Object)}.
- */
- protected void initDefaultProperties() {
- setProperty(IConnectionTypeConstants.PROPERTY_DEFINING_BUNDLE, null);
- setProperty(IConnectionTypeConstants.PROPERTY_ID, null);
- setProperty(IConnectionTypeConstants.PROPERTY_LABEL, ""); //$NON-NLS-1$
- setProperty(IConnectionTypeConstants.PROPERTY_SHORTNAME, ""); //$NON-NLS-1$
- setProperty(IConnectionTypeConstants.PROPERTY_DESCRIPTION, ""); //$NON-NLS-1$
- setProperty(IConnectionTypeConstants.PROPERTY_CATEGORY_ID, null);
- setProperty(IConnectionTypeConstants.PROPERTY_SUPPORTS_EARLY_FINISH, false);
- setProperty(IConnectionTypeConstants.PROPERTY_ENABLED, true);
- setProperty(IConnectionTypeConstants.PROPERTY_LAST_INVALID_CAUSE, null);
- setProperty(IConnectionTypeConstants.PROPERTY_CONNECT_IMMEDIATELY, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
- */
- @Override
- @SuppressWarnings("unchecked")
- public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
- // Initialize the default properties first
- initDefaultProperties();
-
- // read the connection type attributes from the configuration element and apply
- if (config != null && config.getName().equals("connectionType")) { //$NON-NLS-1$
-
- // Set the id if an id attribute is specified and the id had been not
- // yet set by the connection type implementation class.
- // Throws an exception if the id is empty or null.
- String id = config.getAttribute("id"); //$NON-NLS-1$
- if (getId() == null && id != null && id.length() > 0) {
- setProperty(IConnectionTypeConstants.PROPERTY_ID, id);
- } else {
- throw createMissingMandatoryAttributeException("id", config.getContributor().getName()); //$NON-NLS-1$
- }
-
- // Initialize the label field by reading the <label> extension attribute if present.
- String label = config.getAttribute("label"); //$NON-NLS-1$
- if (label != null && label.length() > 0) {
- setProperty(IConnectionTypeConstants.PROPERTY_LABEL, label);
- } else {
- throw createMissingMandatoryAttributeException("label", config.getContributor().getName()); //$NON-NLS-1$
- }
-
- // Initialize the description field by reading the "<description>" extension child element if present.
- IConfigurationElement[] children = config.getChildren("description"); //$NON-NLS-1$
- // Only one description element is allow. All other will be ignored
- if (children.length > 0) {
- IConfigurationElement description = children[0];
- String value = description.getValue();
- setProperty(IConnectionTypeConstants.PROPERTY_DESCRIPTION, value != null ? value.trim() : ""); //$NON-NLS-1$
- }
-
- // Get the enabled attribute
- String isEnabled = config.getAttribute("isEnabled"); //$NON-NLS-1$
-
- // We allow to overwrite the enabled attribute from the plugin.xml
- // via a .options file property:
- //
- // The options file key is: <contribution plugin>/connectionType/<id>/enabled = true
- StringBuilder debugKey = new StringBuilder(config.getContributor().getName());
- debugKey.append("/connectionType/"); //$NON-NLS-1$
- debugKey.append(id.replaceAll("\\s", "_")); //$NON-NLS-1$ //$NON-NLS-2$
- debugKey.append("/enabled"); //$NON-NLS-1$
-
- if (Boolean.parseBoolean(Platform.getDebugOption(debugKey.toString()))) {
- isEnabled = "true"; //$NON-NLS-1$
- }
-
- // Apply the enabled attribute
- if (isEnabled != null && isEnabled.length() > 0 && (isEnabled.equalsIgnoreCase("true") || isEnabled.equalsIgnoreCase("false"))) { //$NON-NLS-1$ //$NON-NLS-2$
- setProperty(IConnectionTypeConstants.PROPERTY_ENABLED, Boolean.valueOf(isEnabled).booleanValue());
- }
-
- // Get the short name attribute
- String shortName = config.getAttribute("shortName"); //$NON-NLS-1$
- if (shortName != null && shortName.length() > 0) {
- setProperty(IConnectionTypeConstants.PROPERTY_SHORTNAME, shortName);
- }
-
- // Get the new connection wizard category id
- String categoryId = config.getAttribute("categoryId"); //$NON-NLS-1$
- if (categoryId != null && categoryId.length() > 0) {
- setProperty(IConnectionTypeConstants.PROPERTY_CATEGORY_ID, categoryId);
- }
- }
-
- // Check the initialization data object. Can be either a string or a hash table.
- if (data instanceof String) {
- // Tokenize the string and take the pairs as properties
- String[] params = StringUtil.tokenize((String)data, 0, false);
- for (int i = 0; i < params.length - 1; i++) {
- // Parameter key is the first parameter
- String paramKey = params[i];
- // Parameter value is the second parameter
- String paramValue = (i + 1) < params.length ? params[++i] : null;
- // Don't apply a property with the same name if already set (protects
- // explicit attributes like "shortName", "isEnabled" or "categoryId").
- if (paramKey != null && getProperty(paramKey) != null) continue;
- // Store it
- if (paramKey != null) setProperty(paramKey, paramValue);
- }
- }
- else if (data instanceof Map<?,?>) {
- // Just copy the map content to the properties
- Map<String, String> params = (Map<String, String>)data;
- for (String paramKey : params.keySet()) {
- // If the short name is already set, don't overwrite it
- if (IConnectionTypeConstants.PROPERTY_SHORTNAME.equals(paramKey) && getProperty(paramKey) != null) continue;
- // Store it
- if (paramKey != null) setProperty(paramKey, params.get(paramKey));
- }
- }
- }
-
- /**
- * Creates a new {@link CoreException} to be thrown if a mandatory extension attribute
- * is missing.
- *
- * @param attributeName The attribute name. Must be not <code>null</code>.
- * @param extensionId The extension id. Must be not <code>null</code>.
- *
- * @return The {@link CoreException} instance.
- */
- protected CoreException createMissingMandatoryAttributeException(String attributeName, String extensionId) {
- Assert.isNotNull(attributeName);
- Assert.isNotNull(extensionId);
-
- return new CoreException(new Status(IStatus.ERROR,
- CoreBundleActivator.getUniqueIdentifier(),
- 0,
- NLS.bind(Messages.Extension_error_missingRequiredAttribute, attributeName, extensionId),
- null));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension#getId()
- */
- @Override
- public final String getId() {
- return getStringProperty(IConnectionTypeConstants.PROPERTY_ID);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension#getLabel()
- */
- @Override
- public final String getLabel() {
- return getStringProperty(IConnectionTypeConstants.PROPERTY_LABEL);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension#getDescription()
- */
- @Override
- public final String getDescription() {
- return getStringProperty(IConnectionTypeConstants.PROPERTY_DESCRIPTION);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.core.connection.interfaces.IConnectionType#isEnabled()
- */
- @Override
- public boolean isEnabled() {
- return getBooleanProperty(IConnectionTypeConstants.PROPERTY_ENABLED) /*&& ConnectionTypeBindingsManager.getInstance().isConnectionTypeEnabled(getId())*/;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.core.connection.interfaces.IConnectionType#isValid()
- */
- @Override
- public boolean isValid() {
- setProperty(IConnectionTypeConstants.PROPERTY_LAST_INVALID_CAUSE, null);
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
- */
- @Override
- public Object getAdapter(Class adapter) {
- // If the requested adapter is a connection service type,
- // forward to the connection type service manager
-// if (IConnectionTypeService.class.isAssignableFrom(adapter)) {
-// IConnectionTypeService service = ConnectionTypeServiceManager.getInstance().getService(getId(), adapter);
-// if (service != null) return service;
-// }
- return super.getAdapter(adapter);
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/interfaces/IConnectStrategy.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/interfaces/IConnectStrategy.java
deleted file mode 100644
index e707bba10..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/interfaces/IConnectStrategy.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.connection.interfaces;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.tcf.te.core.model.interfaces.IConnectable;
-import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
-
-/**
- * A connect strategy.
- * <p>
- * The connect strategy describes the step to perform to connect or disconnect
- * to or from a given context.
- */
-public interface IConnectStrategy extends IExecutableExtension {
-
- /**
- * Check if the given connectable is valid for this connect strategy.
- *
- * @param connectable The connectable context. Must not be <code>null</code>.
- * @return An error message if the connectable context is invalid, </code>null</code> if it is valid.
- */
- public String validate(IConnectable connectable);
-
- /**
- * Check if prerequisites for connecting are valid.
- * <p>
- * Don't run any time-consuming checks.
- *
- * @param connectable The connectable context. Must not be <code>null</code>.
- * @return <code>True</code> if the connectable can be connected, <code>false</code> otherwise.
- */
- public boolean canConnect(IConnectable connectable);
-
- /**
- * Check if prerequisites for disconnecting are valid.
- * <p>
- * Don't run any time-consuming checks.
- *
- * @param connectable The connectable context. Must not be <code>null</code>.
- * @return <code>True</code> if the connectable can be disconnected, <code>false</code> otherwise.
- */
- public boolean canDisconnect(IConnectable connectable);
-
- /**
- * Connect the context.
- * <p>
- * The connect will be performed by the eclipse job model when no external progress monitor is given.
- * If the connect sequence finished or failed or got canceled, the given callback is called if not <code>null</code>.
- *
- * @param connectable The connectable context. Must not be <code>null</code>.
- * @param progress An possible external progress monitor or <code>null</code>.
- * @param ticksToUse The ticks to use.
- * @param cb The callback to call when completed.
- * @param autoAttach <code>false</code> to avoid auto attaching.
- */
- public void connect(IConnectable connectable, IProgressMonitor progress, int ticksToUse, ICallback cb, boolean autoAttach);
-
- /**
- * Disconnect the context.
- * <p>
- * The connect will be performed by the eclipse job model when no external progress monitor is given.
- * If the connect sequence finished or failed , the given callback is called if not <code>null</code>.
- *
- * @param connectable The connectable context. Must not be <code>null</code>.
- * @param progress An possible external progress monitor or <code>null</code>.
- * @param cb The callback to call when completed.
- * @param useJob <code>true</code> if the disconnect should run in a job.
- * @param quitting <code>true</code> if disconnect is called during workbench shutdown.
- */
- public void disconnect(IConnectable connectable, IProgressMonitor progress, int ticksToUse, ICallback cb, boolean quitting);
-
- /**
- * Returns if or if not this connect strategy describes a connection type
- * of the given family.
- *
- * @param connectable The connectable context or <code>null</code>.
- * @param typeFamily The connection type family id.
- *
- * @return <code>True</code> if this connect strategy describes a connection type of the given family.
- */
- public boolean isConnectionTypeFamily(IConnectable connectable, long typeFamily);
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/interfaces/IConnectionType.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/interfaces/IConnectionType.java
deleted file mode 100644
index dfd710c44..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/interfaces/IConnectionType.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.connection.interfaces;
-
-import org.eclipse.tcf.te.runtime.interfaces.extensions.IExecutableExtension;
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-
-/**
- * A connection type.
- * <p>
- * Each node on each level of the Target Explorer tree can be bound to a connection type. Child
- * nodes does inherit the connection type of the parent nodes automatically if not bound to another
- * connection type explicitly.
- * <p>
- * A node can be bound to a single connection type only. The first connection type with an
- * enablement matching a node is chosen if multiple connection types would match.
- * <p>
- * Connection types not bound to any enablement are considered invalid. Enablements are
- * contributed through the connection type bindings extension point. Multiple enablements
- * from different plug-ins are allowed. The ordering of multiple enablements is undefined and
- * given by the order the extension points are provided to the extension point manager by
- * the Eclipse platform.
- * <p>
- * Connection types can bind connection type specific services through the connection type
- * bindings extension point.
- */
-public interface IConnectionType extends IPropertiesContainer, IExecutableExtension {
-
- /**
- * Returns if or if not this connection type has been explicitly disabled by the
- * connection type contributor.
- * <p>
- * Even if this method returns <code>true</code>, connection types might be still
- * disabled by other conditions like disabled capabilities.
- *
- * @return <code>True</code> if the connection type is enabled, <code>false</code> otherwise.
- */
- public boolean isEnabled();
-
- /**
- * Returns if or if not this connection types is valid.
- * <p>
- * A connection type is considered valid if all prerequisites like installed plug-ins or
- * products, runtime platforms or licensing conditions are fulfilled.
- *
- * @return <code>True</code> if the connection type is valid, <code>false</code> otherwise.
- */
- public boolean isValid();
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/interfaces/IConnectionTypeConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/interfaces/IConnectionTypeConstants.java
deleted file mode 100644
index 5c88feed8..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/interfaces/IConnectionTypeConstants.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.connection.interfaces;
-
-import org.osgi.framework.Bundle;
-
-/**
- * Connection type property constant definitions.
- */
-public interface IConnectionTypeConstants {
-
- /**
- * The bundle which is contributing the connection type definition.
- * <p>
- * Type: {@link Bundle}
- */
- public static final String PROPERTY_DEFINING_BUNDLE = "definingBundle"; //$NON-NLS-1$
-
- /**
- * The connection type unique id.
- * <p>
- * Type: {@link String}
- */
- public static final String PROPERTY_ID = "id"; //$NON-NLS-1$
-
- /**
- * The connection type label for representing the connection type within the UI.
- * <p>
- * Type: {@link String}
- */
- public static final String PROPERTY_LABEL = "label"; //$NON-NLS-1$
-
- /**
- * The connection type description.
- * <p>
- * The description is presented to the user within the new connection wizard to give the user a
- * hint what the connection type can be used for.
- * <p>
- * Type: {@link String}
- */
- public static final String PROPERTY_DESCRIPTION = "description"; //$NON-NLS-1$
-
- /**
- * The connection type short name.
- * <p>
- * The short name is used to construct a default connection name for new connections of this
- * type.
- * <p>
- * Type: {@link String}
- */
- public static final String PROPERTY_SHORTNAME = "shortname"; //$NON-NLS-1$
-
- /**
- * The connection type category id.
- * <p>
- * The id of the category the connection type is associated with. The categories are visualized
- * to the user by grouping connection types of the same category within the new connection
- * wizard.
- * <p>
- * Type: {@link String}
- */
- public static final String PROPERTY_CATEGORY_ID = "categoryId"; //$NON-NLS-1$
-
- /**
- * Supports early finish.
- * <p>
- * The user can finish the new connection wizard early. The user is not required to walk through
- * all available new connection wizard pages, associated with this connection type.
- * <p>
- * Type: {@link Boolean}
- */
- public static final String PROPERTY_SUPPORTS_EARLY_FINISH = "supportsEarlyFinish"; //$NON-NLS-1$
-
- /**
- * The connection types explicit enabled state.
- * <p>
- * Type: {@link Boolean}
- */
- public static final String PROPERTY_ENABLED = "enabled"; //$NON-NLS-1$
-
- /**
- * Instances of this target connection type can be created by the user via the
- * "New Connection" wizard UI. The default value is <code>true</code>.
- * <p>
- * Type: {@link Boolean}
- */
- public static final String PROPERTY_IS_USER_CREATABLE = "isUserCreatable"; //$NON-NLS-1$
-
- /**
- * The connection type last invalidation cause.
- * <p>
- * User readable string presented within the UI (error log) to inform the user why this
- * connection type had been set invalid.
- * <p>
- * Type: {@link String}
- */
- public static final String PROPERTY_LAST_INVALID_CAUSE = "lastInvalidCause"; //$NON-NLS-1$
-
- /**
- * Property to control if newly created connections of this connection type will be connected
- * immediately. This property is effective as long the user did not modified the setting via the
- * new connection wizard. The users last choice for this connection type is remembered by the
- * new connection wizard via the wizards dialog settings history (per workspace).
- * <p>
- * Type: {@link Boolean}
- */
- public static final String PROPERTY_CONNECT_IMMEDIATELY = "connectImmediately"; //$NON-NLS-1$
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/managers/ConnectStrategyExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/managers/ConnectStrategyExtensionPointManager.java
deleted file mode 100644
index 47c0f5e36..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/managers/ConnectStrategyExtensionPointManager.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.connection.managers;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tcf.te.core.connection.interfaces.IConnectStrategy;
-import org.eclipse.tcf.te.core.connection.strategy.ConnectStrategyStepGroup;
-import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroup;
-
-/**
- * Connect strategy extension point manager implementation.
- * <p>
- * The class is not intended to be subclassed by clients.
- */
-public class ConnectStrategyExtensionPointManager extends AbstractExtensionPointManager<IConnectStrategy> {
-
- protected class ConnectStrategyExtensionPointProxy extends ExecutableExtensionProxy<IConnectStrategy> {
- private final Map<String, IContextStepGroup> stepGroups = new LinkedHashMap<String, IContextStepGroup>();
-
- public ConnectStrategyExtensionPointProxy(IConfigurationElement element) throws CoreException {
- super(element);
- loadGroups(element);
- }
-
- private void loadGroups(IConfigurationElement element) {
- for (IConfigurationElement stepGroupsElement : element.getChildren("stepGroups")) { //$NON-NLS-1$
- for (IConfigurationElement stepGroupElement : stepGroupsElement.getChildren("stepGroup")) { //$NON-NLS-1$
- IContextStepGroup stepGroup = new ConnectStrategyStepGroup();
- try {
- stepGroup.setInitializationData(stepGroupElement, stepGroupElement.getName(), null);
- stepGroups.put(stepGroup.getId(), stepGroup);
- }
- catch (CoreException e) {
- }
- }
- }
- }
-
- public IContextStepGroup getStepGroup(String stepGroupId) {
- return stepGroups.get(stepGroupId);
- }
- }
-
- /*
- * Thread save singleton instance creation.
- */
- private static class LazyConnectStrategyExtensionPointManager {
- public static ConnectStrategyExtensionPointManager instance = new ConnectStrategyExtensionPointManager();
- }
-
- /**
- * Returns the singleton instance for the connection type bindings manager.
- */
- public static ConnectStrategyExtensionPointManager getInstance() {
- return LazyConnectStrategyExtensionPointManager.instance;
- }
-
- /**
- * Constructor.
- */
- /* default */ ConnectStrategyExtensionPointManager() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
- */
- @Override
- protected String getExtensionPointId() {
- return "org.eclipse.tcf.te.core.connectStrategies"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
- */
- @Override
- protected String getConfigurationElementName() {
- return "connectStrategy"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#doCreateExtensionProxy(org.eclipse.core.runtime.IConfigurationElement)
- */
- @Override
- protected ExecutableExtensionProxy<IConnectStrategy> doCreateExtensionProxy(IConfigurationElement element) throws CoreException {
- return new ConnectStrategyExtensionPointProxy(element);
- }
-
- /**
- * Returns the connect strategy instance for the given id.
- *
- * @param id The connect strategy id or <code>null</code>.
- * @return Returns the connect strategy instance or <code>null</code>.
- */
- public IConnectStrategy getConnectStrategy(String connectStrategyId) {
- if (connectStrategyId == null) {
- return null;
- }
-
- IConnectStrategy connectStrategy = null;
- if (getExtensions().containsKey(connectStrategyId)) {
- ExecutableExtensionProxy<IConnectStrategy> proxy = getExtensions().get(connectStrategyId);
- // Get the extension instance
- connectStrategy = proxy.getInstance();
- }
-
- return connectStrategy;
- }
-
- public IContextStepGroup getStepGroup(String connectStrategyId, String stepGroupId) {
- if (connectStrategyId == null || stepGroupId == null) {
- return null;
- }
-
- if (getExtensions().containsKey(connectStrategyId)) {
- ConnectStrategyExtensionPointProxy proxy = (ConnectStrategyExtensionPointProxy)getExtensions().get(connectStrategyId);
- return proxy.getStepGroup(stepGroupId);
- }
- return null;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/managers/ConnectionTypeBindingsManager.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/managers/ConnectionTypeBindingsManager.java
deleted file mode 100644
index 92870e2ac..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/managers/ConnectionTypeBindingsManager.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.connection.managers;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.tcf.te.core.connection.interfaces.IConnectStrategy;
-import org.eclipse.tcf.te.core.connection.interfaces.IConnectionType;
-
-/**
- * Connection type bindings extension point manager implementation.
- */
-public class ConnectionTypeBindingsManager {
-
- /**
- * Immutable class describing a connect strategy binding.
- */
- private final static class ConnectStrategyBinding {
- public final String id;
- public final String overwrite;
-
- public ConnectStrategyBinding(String id, String overwrite) {
- this.id = id;
- this.overwrite = overwrite;
- }
- }
-
- // Flag to remember if the extension point got already read and processed.
- private boolean initialized;
-
- // The map between connection type id's and their associated connect strategies.
- private final Map<String, List<ConnectStrategyBinding>> typeIdToStrategyId = new LinkedHashMap<String, List<ConnectStrategyBinding>>();
-
- // The sub extension point manager instances
- private final ConnectionTypeExtensionPointManager connectionTypeManger = new ConnectionTypeExtensionPointManager();
-
- /*
- * Thread save singleton instance creation.
- */
- private static class LazyConnectionTypeBindingsManager {
- public static ConnectionTypeBindingsManager instance = new ConnectionTypeBindingsManager();
- }
-
- /**
- * Returns the singleton instance for the connection type bindings manager.
- */
- public static ConnectionTypeBindingsManager getInstance() {
- return LazyConnectionTypeBindingsManager.instance;
- }
-
- /**
- * Constructor.
- */
- ConnectionTypeBindingsManager() {
- initialized = false;
- initialize();
- }
-
- /**
- * Initialize the connection type bindings manager and triggers to load and read the managed
- * extension points.
- */
- public void initialize() {
- if (initialized) {
- return;
- }
- // load and register the connection type bindings
- loadConnectionTypeBindings();
- initialized = true;
- }
-
- // ***** BEGIN: Section extension point management *****
-
- /**
- * Load and register all connection type id shortcuts.
- */
- private void loadConnectionTypeBindings() {
- // load all target connection type bindings and register them
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint point = registry.getExtensionPoint("org.eclipse.tcf.te.core.connectionTypeBindings"); //$NON-NLS-1$
- if (point != null) {
- // load target connection type bindings
- IExtension[] typeBindings = point.getExtensions();
- for (IExtension typeBinding : typeBindings) {
- // load configuration elements
- IConfigurationElement[] configElements = typeBinding.getConfigurationElements();
- for (IConfigurationElement configElement : configElements) {
- // handle connection type binding
- if ("connectionTypeBinding".equals(configElement.getName())) { //$NON-NLS-1$
- String connectionTypeId = configElement.getAttribute("connectionTypeId"); //$NON-NLS-1$
- // load connect strategy binding
- IConfigurationElement[] connectStrategy = configElement.getChildren("connectStrategy"); //$NON-NLS-1$
- for (IConfigurationElement element : connectStrategy) {
- String connectStrategyId = element.getAttribute("id"); //$NON-NLS-1$
- String connectStrategyOverwrite = element.getAttribute("overwrite"); //$NON-NLS-1$
- if (connectStrategyId != null && connectStrategyId.length() > 0) {
- registerConnectStrategyBinding(connectionTypeId.trim(), connectStrategyId.trim(), connectStrategyOverwrite != null ? connectStrategyOverwrite.trim() : null);
- }
- }
- }
- }
- }
- }
- }
-
- // ***** END: Section extension point management *****
-
- // ***** BEGIN: Section connect strategy management *****
-
- /**
- * Register a binding between a connection type id and a connect strategy id. Bindings
- * registered for the same connection type will be overwritten using the overwrite attribute. If
- * the connect strategy id is <code>null</code>, possibly registered bindings are removed.
- *
- * @param typeId The connection type id. Must not be <code>null</code> and not empty.
- * @param strategyId The connect strategy id or <code>null</code>.
- * @param overwrite The connect strategy id that should be overwritten by this id.
- */
- public void registerConnectStrategyBinding(String typeId, String strategyId, String overwrite) {
- Assert.isNotNull(typeId);
- Assert.isTrue(typeId.trim().length() > 0);
-
- if (strategyId != null && strategyId.trim().length() > 0) {
- List<ConnectStrategyBinding> bindings = typeIdToStrategyId.get(typeId.trim());
- if (bindings == null) {
- bindings = new ArrayList<ConnectStrategyBinding>();
- typeIdToStrategyId.put(typeId.trim(), bindings);
- }
- ConnectStrategyBinding binding = new ConnectStrategyBinding(strategyId.trim(), overwrite != null ? overwrite.trim() : null);
- bindings.add(binding);
- Collections.sort(bindings, new Comparator<ConnectStrategyBinding>() {
- @Override
- public int compare(ConnectStrategyBinding o1, ConnectStrategyBinding o2) {
- // handle multiple id's without overwrite (alphabetical order)
- if (o1.overwrite == null && o2.overwrite == null) {
- return o1.id.compareTo(o2.id);
- }
- // handle overwrite the same id twice (alphabetical order)
- if (o1.overwrite != null && o2.overwrite != null && o1.overwrite.equals(o2.overwrite)) {
- return o1.id.compareTo(o2.id);
- }
- // handle recursive overwrite (alphabetical order)
- if (o1.overwrite != null && o1.overwrite.equals(o2.id) && o2.overwrite != null && o2.overwrite.equals(o1.id)) {
- return o1.id.compareTo(o2.id);
- }
- // o1 overwrites o2
- if (o1.overwrite != null && o1.overwrite.equals(o2.id)) {
- return -1;
- }
- // o2 overwrites o1
- if (o2.overwrite != null && o2.overwrite.equals(o1.id)) {
- return 1;
- }
- // fallback alphabetical order
- return o1.id.compareTo(o2.id);
- }
- });
-
- } else if (strategyId == null) {
- typeIdToStrategyId.remove(typeId.trim());
- }
- }
-
- /**
- * Returns the corresponding connect strategy id for the given connection type id.
- *
- * @param typeId The connection type id. Must not be <code>null</code> and not empty!
- * @return The connect strategy id if registered or <code>null</code>.
- */
- public String getConnectStrategyId(String typeId) {
- if (typeId != null && typeId.trim().length() > 0) {
- List<ConnectStrategyBinding> bindings = typeIdToStrategyId.get(typeId.trim());
- return bindings != null && !bindings.isEmpty() ? bindings.get(0).id : null;
- }
- return null;
- }
-
- /**
- * Returns the corresponding <code>IConnectStrategy</code> for the given connection type id.
- *
- * @param typeId The connection type id. Must not be <code>null</code>.
- * @return The corresponding connect strategy object or <code>null</code>.
- */
- public IConnectStrategy getConnectStrategy(String typeId) {
- Assert.isNotNull(typeId);
- String connectStrategyId = getConnectStrategyId(typeId);
- return ConnectStrategyExtensionPointManager.getInstance().getConnectStrategy(connectStrategyId);
- }
-
- // ***** END: Section connect strategy management *****
-
- // ***** BEGIN: Section connection type management *****
-
- /**
- * Returns the list of all contributed connection types.
- *
- * @return The list of contributed connection types, or an empty array.
- */
- public IConnectionType[] getConnectionTypes() {
- return connectionTypeManger.getConnectionTypes();
- }
-
- /**
- * Returns the corresponding <code>IConnectionType</code> for the given connection type id.
- *
- * @param typeId The connection type id. Must not be <code>null</code>.
- * @return The corresponding connection type object or <code>null</code>.
- */
- public IConnectionType getConnectionType(String typeId) {
- Assert.isNotNull(typeId);
- return connectionTypeManger.getConnectionType(typeId);
- }
-
- /**
- * Returns the corresponding <code>IConnectionType</code> for the given connectable context object.
- *
- * @param context The connectable context object. Must not be <code>null</code>
- * @return The corresponding target connection type object or <code>null</code>.
- */
- public IConnectionType getConnectionType(Object context) {
- Assert.isNotNull(context);
- return null;
- }
-
- /**
- * Checks if the connection type, specified by the given type id, is enabled.
- * <p>
- * A connection type is enabled when at least one enablement evaluates to <code>true</code>.
- *
- * @param typeId The connection type id. Must not be <code>null</code>.
- * @return <code>True</code> if the connection type is enabled, <code>false</code> otherwise.
- */
- public boolean isConnectionTypeEnabled(String typeId) {
- Assert.isNotNull(typeId);
- return true;
- }
-
- // ***** END: Section connection type management *****
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/managers/ConnectionTypeExtensionPointManager.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/managers/ConnectionTypeExtensionPointManager.java
deleted file mode 100644
index 3483833c5..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/managers/ConnectionTypeExtensionPointManager.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.connection.managers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.te.core.connection.interfaces.IConnectionType;
-import org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
-
-/**
- * Connection type extension point manager implementation.
- * <p>
- * The class is not intended to be subclassed by clients.
- */
-public final class ConnectionTypeExtensionPointManager extends AbstractExtensionPointManager<IConnectionType> {
-
- /**
- * Constructor.
- */
- /* default */ ConnectionTypeExtensionPointManager() {
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getExtensionPointId()
- */
- @Override
- protected String getExtensionPointId() {
- return "org.eclipse.tcf.te.core.connectionTypes"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.AbstractExtensionPointManager#getConfigurationElementName()
- */
- @Override
- protected String getConfigurationElementName() {
- return "connectionType"; //$NON-NLS-1$
- }
-
- /**
- * Returns the list of all contributed connection types.
- *
- * @return The list of contributed connection types, or an empty array.
- */
- public IConnectionType[] getConnectionTypes() {
- List<IConnectionType> types = new ArrayList<IConnectionType>();
- Collection<ExecutableExtensionProxy<IConnectionType>> proxies = getExtensions().values();
- for (ExecutableExtensionProxy<IConnectionType> proxy : proxies)
- if (proxy.getInstance() != null && !types.contains(proxy.getInstance()))
- types.add(proxy.getInstance());
-
- return types.toArray(new IConnectionType[types.size()]);
- }
-
- /**
- * Returns the connection type identified by its unique id. If no connection
- * type with the specified id is registered, <code>null</code> is returned.
- *
- * @param id The unique id of the connection type. Must not be <code>null</code>
- * @return The connection type or <code>null</code>.
- */
- public IConnectionType getConnectionType(String id) {
- Assert.isNotNull(id);
-
- IConnectionType connectionType = null;
- if (getExtensions().containsKey(id)) {
- ExecutableExtensionProxy<IConnectionType> proxy = getExtensions().get(id);
- connectionType = proxy.getInstance();
- }
-
- return connectionType;
- }
-
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/strategy/ConnectStrategyStepExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/strategy/ConnectStrategyStepExecutor.java
deleted file mode 100644
index c4c59d420..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/strategy/ConnectStrategyStepExecutor.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.connection.strategy;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.tcf.te.core.activator.CoreBundleActivator;
-import org.eclipse.tcf.te.core.nls.Messages;
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepExecutor;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IContext;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
-
-/**
- * Connect strategy step executor implementation.
- */
-public class ConnectStrategyStepExecutor extends AbstractContextStepExecutor {
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepExecutor#formatMessage(java.lang.String, int, org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.tcf.te.runtime.stepper.interfaces.IContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer)
- */
- @Override
- protected String formatMessage(String message, int severity, IContextStep step, IFullQualifiedId id, IContext context, IPropertiesContainer data) {
- String template = null;
-
- switch (severity) {
- case IStatus.INFO:
- template = Messages.ConnectStrategyStepExecutor_info_stepFailed;
- break;
- case IStatus.WARNING:
- template = Messages.ConnectStrategyStepExecutor_warning_stepFailed;
- break;
- case IStatus.ERROR:
- template = Messages.ConnectStrategyStepExecutor_error_stepFailed;
- break;
- }
-
- // If we cannot determine the formatted message template, just return the message as is
- if (template == null) {
- return message;
- }
-
- // Split the message. The first sentence is shown more prominent on the top,
- // the rest as additional information below the step information.
- String[] splittedMsg = message != null ? message.split("[\t\n\r\f]+", 2) : new String[] { null, null }; //$NON-NLS-1$
-
- // Format the core message
- String formattedMessage = NLS.bind(template, new String[] { splittedMsg[0],
- context.getContextName(),
- ConnectStrategyStepper.getConnectStrategy(data).getLabel(),
- step.getLabel()
- });
-
- // Get the context information
- String contextInfo = formatContextInfo(context);
- if (contextInfo != null) {
- formattedMessage += "\n\n" + contextInfo; //$NON-NLS-1$
- }
-
- // If we have more information available, append them
- if (splittedMsg.length > 1 && splittedMsg[1] != null && !"".equals(splittedMsg[1])) { //$NON-NLS-1$
- formattedMessage += "\n\n" + splittedMsg[1]; //$NON-NLS-1$
- }
-
- // In debug mode, there is even more information to add
- if (CoreBundleActivator.getTraceHandler().isSlotEnabled(1, null)) {
- formattedMessage += "\n\n" + NLS.bind(Messages.ConnectStrategyStepExecutor_stepFailed_debugInfo, id.toString()); //$NON-NLS-1$
- }
-
- return formattedMessage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.AbstractContextStepExecutor#isExceptionMessageFormatted(java.lang.String)
- */
- @Override
- protected boolean isExceptionMessageFormatted(String message) {
- Assert.isNotNull(message);
- return message.startsWith(Messages.ConnectStrategyStepExecutor_checkPoint_normalizationNeeded);
- }
-
- /**
- * Determines additional context information to show in the failure message.
- *
- * @param context The context. Must not be <code>null</code>.
- * @return The additional context information string or <code>null</code>.
- */
- protected String formatContextInfo(IContext context) {
- Assert.isNotNull(context);
- return context.getContextInfo();
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/strategy/ConnectStrategyStepGroup.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/strategy/ConnectStrategyStepGroup.java
deleted file mode 100644
index 7110a0a4a..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/strategy/ConnectStrategyStepGroup.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.connection.strategy;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.tcf.te.runtime.extensions.ExecutableExtensionProxy;
-import org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepGroup;
-import org.eclipse.tcf.te.runtime.stepper.extensions.ContextStepGroupable;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroupable;
-
-/**
- * Connect strategy step group implementation.
- */
-public class ConnectStrategyStepGroup extends AbstractContextStepGroup {
-
- private final List<ExecutableExtensionProxy<IContextStep>> steps = new ArrayList<ExecutableExtensionProxy<IContextStep>>();
-
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepGroup#doSetInitializationData(org.eclipse.core.runtime.IConfigurationElement, java.lang.String, java.lang.Object)
- */
- @Override
- public void doSetInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
- super.doSetInitializationData(config, propertyName, data);
-
- for (IConfigurationElement stepElement : config.getChildren("step")) { //$NON-NLS-1$
- ExecutableExtensionProxy<IContextStep> step = new ExecutableExtensionProxy<IContextStep>(stepElement);
- steps.add(step);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroup#getSteps(java.lang.String, java.lang.String)
- */
- @Override
- public IContextStepGroupable[] getSteps(String type, String subType) throws CoreException {
- List<IContextStepGroupable> steps = new ArrayList<IContextStepGroupable>();
- for (ExecutableExtensionProxy<IContextStep> stepProxy : this.steps) {
- IContextStep step = stepProxy.newInstance();
- if (step != null) {
- IContextStepGroupable groupable = new ContextStepGroupable(step);
- steps.add(groupable);
- }
- }
- return !steps.isEmpty() ? steps.toArray(new IContextStepGroupable[steps.size()]) : NO_STEPS;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/strategy/ConnectStrategyStepper.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/strategy/ConnectStrategyStepper.java
deleted file mode 100644
index e9f6017b2..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/connection/strategy/ConnectStrategyStepper.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.connection.strategy;
-
-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.tcf.te.core.connection.interfaces.IConnectStrategy;
-import org.eclipse.tcf.te.core.connection.managers.ConnectStrategyExtensionPointManager;
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tcf.te.runtime.stepper.activator.CoreBundleActivator;
-import org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepper;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IContext;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepExecutor;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStepGroup;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.IVariantDelegate;
-import org.eclipse.tcf.te.runtime.stepper.interfaces.tracing.ITraceIds;
-
-/**
- * A connect strategy stepper.
- */
-@SuppressWarnings("restriction")
-public class ConnectStrategyStepper extends AbstractContextStepper {
-
- public static final String PROPERTY_CONNECT_STRATEGY = "connectStrategy"; //$NON-NLS-1$
-
- private final IContext context;
- private final String stepGroupId;
-
- /**
- * Constructor.
- */
- public ConnectStrategyStepper(IContext context, String stepGroupId, boolean cancelable) {
- super();
- this.context = context;
- this.stepGroupId = stepGroupId;
- setCancelable(cancelable);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepper#initialize(org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public void initialize(IPropertiesContainer data, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor) throws IllegalStateException {
- Assert.isNotNull(getConnectStrategy(data));
- super.initialize(data, fullQualifiedId, monitor);
- }
-
- /**
- * Get the connect strategy.
- *
- * @param data The data object.
- * @return The connect strategy.
- */
- public static final IConnectStrategy getConnectStrategy(IPropertiesContainer data) {
- Assert.isNotNull(data);
- Assert.isTrue(data.getProperty(PROPERTY_CONNECT_STRATEGY) instanceof IConnectStrategy);
- return (IConnectStrategy)data.getProperty(PROPERTY_CONNECT_STRATEGY);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.extensions.ExecutableExtension#getId()
- */
- @Override
- public String getId() {
- String id = super.getId();
- return id != null ? id : "org.eclipse.tcf.te.core.stepper.ConnectStrategyStepper"; //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.AbstractContextStepper#getType()
- */
- @Override
- protected String getType() {
- return getData() != null ? getConnectStrategy(getData()).getId() : null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.AbstractContextStepper#getSubType()
- */
- @Override
- protected String getSubType() {
- return stepGroupId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.AbstractContextStepper#getName()
- */
- @Override
- protected String getName() {
- return context.getContextName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.AbstractContextStepper#getVariantDelegate()
- */
- @Override
- protected IVariantDelegate getVariantDelegate() throws CoreException {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.extensions.AbstractContextStepper#doCreateStepExecutor(org.eclipse.tcf.te.runtime.stepper.interfaces.IContextStep, java.lang.String, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId)
- */
- @Override
- protected IContextStepExecutor doCreateStepExecutor(IContextStep step, String secondaryId, IFullQualifiedId fullQualifiedStepId) {
- return new ConnectStrategyStepExecutor();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.AbstractContextStepper#getStepGroup(java.lang.String, java.lang.String, java.lang.String)
- */
- @Override
- public IContextStepGroup getStepGroup(String connectStrategyId, String stepGroupId, String variant) {
- CoreBundleActivator.getTraceHandler().trace("ConnectStrategyStepper#getStepGroup:" //$NON-NLS-1$
- + " connectStrategyId = '" + connectStrategyId + "'" //$NON-NLS-1$ //$NON-NLS-2$
- + ", stepGroupId = '" + stepGroupId + "'" //$NON-NLS-1$ //$NON-NLS-2$
- + (variant != null && variant.length() > 0 ? ", variant = '" + variant + "'" : ""), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- 0, ITraceIds.TRACE_STEPPING, IStatus.WARNING, this);
-
- return ConnectStrategyExtensionPointManager.getInstance().getStepGroup(connectStrategyId, stepGroupId);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.tcf.te.runtime.stepper.AbstractContextStepper#getContexts()
- */
- @Override
- protected IContext[] getContexts() {
- return new IContext[] { context };
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/model/interfaces/IConnectable.java b/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/model/interfaces/IConnectable.java
deleted file mode 100644
index 2ee795ee3..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.core/src/org/eclipse/tcf/te/core/model/interfaces/IConnectable.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.model.interfaces;
-
-
-/**
- * Interface to be implemented by model nodes which can be connected.
- */
-public interface IConnectable {
-
- /**
- * Property: Connect state.
- */
- public static final String PROPERTY_CONNECT_STATE = "connectstate.transient"; //$NON-NLS-1$
-
- /**
- * Property: Connect sub state.
- */
- public static final String PROPERTY_CONNECT_SUB_STATE = "connectSubState.transient"; //$NON-NLS-1$
-
- public static final int STATE_UNREACHABLE = -1;
- public static final int STATE_UNCONNECTED = 0;
- public static final int STATE_DISCONNECTING = 1;
- public static final int STATE_CONNECTING = 2;
- public static final int STATE_CONNECTED = 3;
-
- public static final int SUB_STATE_NORMAL = 0;
- public static final int SUB_STATE_CONNECT_SEND = 1;
- public static final int SUB_STATE_DISCONNECT_SEND = 2;
- public static final int SUB_STATE_REBOOT_MANUAL = 3;
-
- public static final int USER_SUB_STATE_BASE = 10;
-
- /**
- * Returns whether or not this context is connectable.
- *
- * @return <code>true</code> if this context is connectable.
- */
- public boolean isConnectable();
-
- /**
- * Returns the connect state of this context.
- *
- * @return The connect state.
- */
- public int getConnectState();
-
- /**
- * Set the connect state of for this context.
- *
- * @param connectState The new connect state.
- * @return <code>true</code> if the state has changed.
- */
- public boolean setConnectState(int connectState);
-
- /**
- * Check the current state.
- *
- * @param connectState The connect state to check.
- * @return <code>true</code> if the current connect state equals the given one.
- */
- public boolean isConnectState(int connectState);
-
- /**
- * Returns the connect sub state of this context.
- *
- * @return The connect sub state.
- */
- public int getConnectSubState();
-
- /**
- * Set the connect sub state of for this context.
- *
- * @param connectSubState The connect sub state to check.
- * @return <code>true</code> if the state has changed.
- */
- public boolean setConnectSubState(int connectSubState);
-
- /**
- * Check the current sub state.
- *
- * @param connectSubState The connect sub state to check.
- * @return <code>true</code> if the current connect sub state equals the given one.
- */
- public boolean isConnectSubState(int connectSubState);
-}

Back to the top