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:
parent
53e096fc18
commit
672368f0af
3 changed files with 43 additions and 23 deletions
|
@ -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 "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.
|
||||
</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.
|
||||
<p>
|
||||
<b>Note:</b> 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.
|
|||
<systemType id="com.acme.systemtype.Solaris"
|
||||
name="Solaris"
|
||||
description="Connects to Solaris systems."
|
||||
icon="icons/solaris.gif"
|
||||
iconLive="icons/solarisLive.gif">
|
||||
</systemType>
|
||||
icon="icons/solaris.gif"
|
||||
iconLive="icons/solarisLive.gif">
|
||||
</systemType>
|
||||
</extension>
|
||||
</pre>
|
||||
</p>
|
||||
|
|
|
@ -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>.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue