1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-02 22:55:26 +02:00

[173265] [api] Need systemType -> subsystemConfiguration association. Part 2: Added systemType extension point additional attribut

This commit is contained in:
Uwe Stieber 2007-02-09 15:56:31 +00:00
parent 53e096fc18
commit 672368f0af
3 changed files with 43 additions and 23 deletions

View file

@ -6,13 +6,7 @@
<meta.schema plugin="org.eclipse.rse.core" id="systemTypes" name="RSE System Types"/>
</appInfo>
<documentation>
This extension point is used in combination with the org.eclipse.rse.ui.subsystemConfigurations
extension point for defining new subsystems, which appear under a connection when it is expanded in the
Remote Systems view. The systemTypes extension point allows subsystem providers to define a new system
type that appears in the list of valid system types in the New Connection wizard, used by users when defining
a new connection to a remote system. The system type is simply a string identifying the operating system
type, such as Solaris, and an pair of icons used to identify connections to systems of this type. One
icon is used when the connection is not connected, while the other is used when there is a live connection.
This extension point is used in combination with the &quot;org.eclipse.rse.ui.subsystemConfigurations&quot; extension point for defining new subsystems, which appear under a connection when it is expanded in the Remote Systems view. The systemTypes extension point allows subsystem providers to define a new system type that appears in the list of valid system types in the New Connection wizard, used by users when defining a new connection to a remote system. The system type is simply a string identifying the operating system type, such as Solaris, and an pair of icons used to identify connections to systems of this type. One icon is used when the connection is not connected, while the other is used when there is a live connection.
</documentation>
</annotation>
@ -123,6 +117,16 @@ If not specified, a default icon will be used by RSE.
</documentation>
</annotation>
</attribute>
<attribute name="subsystemConfigurationIds" type="string">
<annotation>
<documentation>
A semicolon separated list of fully qualified subsystem configuration ids this system type wants to get registered against.
&lt;p&gt;
&lt;b&gt;Note:&lt;/b&gt; The list specified here does not imply that the corresponding subsystem configurations exist. The list contains only possibilites, not requirements.
</documentation>
</annotation>
</attribute>
</complexType>
</element>
@ -170,9 +174,9 @@ If not specified, a default icon will be used by RSE.
&lt;systemType id=&quot;com.acme.systemtype.Solaris&quot;
name=&quot;Solaris&quot;
description=&quot;Connects to Solaris systems.&quot;
icon=&quot;icons/solaris.gif&quot;
iconLive=&quot;icons/solarisLive.gif&quot;&gt;
&lt;/systemType&gt;
icon=&quot;icons/solaris.gif&quot;
iconLive=&quot;icons/solarisLive.gif&quot;&gt;
&lt;/systemType&gt;
&lt;/extension&gt;
&lt;/pre&gt;
&lt;/p&gt;

View file

@ -115,11 +115,12 @@ public interface IRSESystemType extends IAdaptable {
/**
* Returns a list of fully qualified known subsystem configuration id's that
* this system type wants to be registered against. More subsystem configurations
* can be added through the <tt>subsystemConfigurations</tt> extension point.
* this system type wants to be registered against.
* More subsystem configurations can be added through the <tt>subsystemConfigurations</tt>
* extension point.
* <p>
* <b>Note:</b> The list returned here does not imply that the corresponding
* subsystem configurations exist. The list contains only possibilites not
* subsystem configurations exist. The list contains only possibilites not,
* requirements.
*
* @return The list of subsystem configuration id or <code>null</code>.

View file

@ -16,6 +16,9 @@
package org.eclipse.rse.core.internal;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.Platform;
@ -35,13 +38,15 @@ public class RSESystemType implements IRSESystemType {
private static final String ATTR_ICONLIVE = "iconLive"; //$NON-NLS-1$
private static final String ATTR_ENABLEOFFLINE = "enableOffline"; //$NON-NLS-1$
private static final String ATTR_VALUE = "value"; //$NON-NLS-1$
private static final String ATTR_SUBSYSTEMCONFIGURATIONS = "subsystemConfigurationIds"; //$NON-NLS-1$
String id = null;
String name = null;
String description = null;
HashMap properties;
Bundle definingBundle = null;
private String id = null;
private String name = null;
private String description = null;
private Map properties;
private Bundle definingBundle = null;
private String[] subsystemConfigurationIds;
/**
* Constructor for an object representing a system type.
* @param element the configuration element describing the system type
@ -60,8 +65,20 @@ public class RSESystemType implements IRSESystemType {
if (iconLive != null) properties.put(IRSESystemTypeConstants.ICON_LIVE, iconLive);
String enableOffline = element.getAttribute(ATTR_ENABLEOFFLINE);
if (enableOffline != null) properties.put(IRSESystemTypeConstants.ENABLE_OFFLINE, enableOffline);
definingBundle = Platform.getBundle(element.getContributor().getName());
List subsystemConfigs = new LinkedList();
String attribute = element.getAttribute(ATTR_SUBSYSTEMCONFIGURATIONS);
if (attribute != null) {
// split the list of subsystem configuration ids.
String[] splitted = attribute.split(";"); //$NON-NLS-1$
// normalize the list of subsystem configuration ids
for (int i = 0; i < splitted.length; i++) {
subsystemConfigs.add(splitted[i].trim());
}
}
subsystemConfigurationIds = (String[])subsystemConfigs.toArray(new String[subsystemConfigs.size()]);
}
/**
@ -125,9 +142,7 @@ public class RSESystemType implements IRSESystemType {
* @see org.eclipse.rse.core.IRSESystemType#getSubsystemConfigurationIds()
*/
public String[] getSubsystemConfigurationIds() {
// We are not proposing any subsystem configuration here
// by default.
return null;
return subsystemConfigurationIds;
}
/**