mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 03:45:35 +02:00
[162081] deprecated "systemTypes" attribute of subsystemConfigurations extension point has been removed
This commit is contained in:
parent
3ae5b5049e
commit
55e4312233
17 changed files with 79 additions and 124 deletions
|
@ -25,6 +25,7 @@ Martin Oberhuber (Wind River) - initial API and implementation
|
||||||
point="org.eclipse.rse.ui.subsystemConfigurations">
|
point="org.eclipse.rse.ui.subsystemConfigurations">
|
||||||
<configuration
|
<configuration
|
||||||
systemTypeIds="org.eclipse.rse.examples.daytime.systemtype"
|
systemTypeIds="org.eclipse.rse.examples.daytime.systemtype"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%Files"
|
name="%Files"
|
||||||
description="%FilesDescription"
|
description="%FilesDescription"
|
||||||
iconlive="icons/full/obj16/systemfileslive_obj.gif"
|
iconlive="icons/full/obj16/systemfileslive_obj.gif"
|
||||||
|
@ -42,6 +43,7 @@ Martin Oberhuber (Wind River) - initial API and implementation
|
||||||
point="org.eclipse.rse.ui.subsystemConfigurations">
|
point="org.eclipse.rse.ui.subsystemConfigurations">
|
||||||
<configuration
|
<configuration
|
||||||
systemTypeIds="org.eclipse.rse.examples.daytime.systemtype;org.eclipse.rse.systemtype.unix"
|
systemTypeIds="org.eclipse.rse.examples.daytime.systemtype;org.eclipse.rse.systemtype.unix"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%DaytimeSubsystemName"
|
name="%DaytimeSubsystemName"
|
||||||
description="%DaytimeDescription"
|
description="%DaytimeDescription"
|
||||||
iconlive="icons/full/obj16/daytimelive_obj.gif"
|
iconlive="icons/full/obj16/daytimelive_obj.gif"
|
||||||
|
|
|
@ -63,6 +63,7 @@ Martin Oberhuber (Wind River) - Adapted original tutorial code to Open RSE.
|
||||||
<configuration
|
<configuration
|
||||||
id="samples.subsystems.factory"
|
id="samples.subsystems.factory"
|
||||||
systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.windows"
|
systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.windows"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="Teams"
|
name="Teams"
|
||||||
class="samples.subsystems.DeveloperSubSystemConfiguration"
|
class="samples.subsystems.DeveloperSubSystemConfiguration"
|
||||||
category="users"
|
category="users"
|
||||||
|
|
|
@ -50,12 +50,6 @@ public interface ISubSystemConfigurationProxy {
|
||||||
*/
|
*/
|
||||||
public Bundle getDeclaringBundle();
|
public Bundle getDeclaringBundle();
|
||||||
|
|
||||||
/**
|
|
||||||
* Return value of the <samp>systemTypes</samp> xml attribute.
|
|
||||||
* Return the system type names this subsystem configuration supports.
|
|
||||||
*/
|
|
||||||
public String getDeclaredSystemTypeNames();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return value of the <samp>systemTypeIds</samp> xml attribute.
|
* Return value of the <samp>systemTypeIds</samp> xml attribute.
|
||||||
* Return the system type ids this subsystem configuration supports.
|
* Return the system type ids this subsystem configuration supports.
|
||||||
|
|
|
@ -25,6 +25,7 @@ Contributors:
|
||||||
point="org.eclipse.rse.ui.subsystemConfigurations">
|
point="org.eclipse.rse.ui.subsystemConfigurations">
|
||||||
<factory
|
<factory
|
||||||
systemTypeIds="org.eclipse.rse.systemtype.local"
|
systemTypeIds="org.eclipse.rse.systemtype.local"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%Factory.LocalProcesses"
|
name="%Factory.LocalProcesses"
|
||||||
iconlive="icons/full/obj16/activeprocess.gif"
|
iconlive="icons/full/obj16/activeprocess.gif"
|
||||||
icon="icons/full/obj16/activeprocess.gif"
|
icon="icons/full/obj16/activeprocess.gif"
|
||||||
|
|
|
@ -22,6 +22,7 @@ Contributors:
|
||||||
point="org.eclipse.rse.ui.subsystemConfigurations">
|
point="org.eclipse.rse.ui.subsystemConfigurations">
|
||||||
<configuration
|
<configuration
|
||||||
systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix"
|
systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%Files"
|
name="%Files"
|
||||||
description="%FilesDescription"
|
description="%FilesDescription"
|
||||||
iconlive="icons/full/obj16/systemfileslive_obj.gif"
|
iconlive="icons/full/obj16/systemfileslive_obj.gif"
|
||||||
|
@ -35,6 +36,7 @@ Contributors:
|
||||||
|
|
||||||
<configuration
|
<configuration
|
||||||
systemTypeIds="org.eclipse.rse.systemtype.windows"
|
systemTypeIds="org.eclipse.rse.systemtype.windows"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%Files"
|
name="%Files"
|
||||||
description="%FilesDescription"
|
description="%FilesDescription"
|
||||||
iconlive="icons/full/obj16/systemfileslive_obj.gif"
|
iconlive="icons/full/obj16/systemfileslive_obj.gif"
|
||||||
|
|
|
@ -28,6 +28,7 @@ Martin Oberhuber (Wind River) - add FTP Only system type
|
||||||
<extension point="org.eclipse.rse.ui.subsystemConfigurations">
|
<extension point="org.eclipse.rse.ui.subsystemConfigurations">
|
||||||
<configuration
|
<configuration
|
||||||
systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.windows;org.eclipse.rse.systemtype.ftp"
|
systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.windows;org.eclipse.rse.systemtype.ftp"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%Files"
|
name="%Files"
|
||||||
description="%FilesDescription"
|
description="%FilesDescription"
|
||||||
iconlive="icons/full/obj16/systemfileslive_obj.gif"
|
iconlive="icons/full/obj16/systemfileslive_obj.gif"
|
||||||
|
|
|
@ -22,6 +22,7 @@ Contributors:
|
||||||
point="org.eclipse.rse.ui.subsystemConfigurations">
|
point="org.eclipse.rse.ui.subsystemConfigurations">
|
||||||
<configuration
|
<configuration
|
||||||
systemTypeIds="org.eclipse.rse.systemtype.local"
|
systemTypeIds="org.eclipse.rse.systemtype.local"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%Files"
|
name="%Files"
|
||||||
description="%FilesDescription"
|
description="%FilesDescription"
|
||||||
iconlive="icons/full/obj16/systemfileslive_obj.gif"
|
iconlive="icons/full/obj16/systemfileslive_obj.gif"
|
||||||
|
|
|
@ -15,6 +15,7 @@ Martin Oberhuber - initial API and implementation
|
||||||
point="org.eclipse.rse.ui.subsystemConfigurations">
|
point="org.eclipse.rse.ui.subsystemConfigurations">
|
||||||
<configuration
|
<configuration
|
||||||
systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.aix;org.eclipse.rse.systemtype.ssh"
|
systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.aix;org.eclipse.rse.systemtype.ssh"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%SshFileSubsystemName"
|
name="%SshFileSubsystemName"
|
||||||
description="%SshFileSubsystemDescription"
|
description="%SshFileSubsystemDescription"
|
||||||
iconlive="icons/full/obj16/systemfileslive_obj.gif"
|
iconlive="icons/full/obj16/systemfileslive_obj.gif"
|
||||||
|
|
|
@ -26,6 +26,7 @@ Contributors:
|
||||||
point="org.eclipse.rse.ui.subsystemConfigurations">
|
point="org.eclipse.rse.ui.subsystemConfigurations">
|
||||||
<configuration
|
<configuration
|
||||||
systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix"
|
systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%Processes"
|
name="%Processes"
|
||||||
description="%ProcessesDescription"
|
description="%ProcessesDescription"
|
||||||
iconlive="icons/full/obj16/processsubsystemlive_obj.gif"
|
iconlive="icons/full/obj16/processsubsystemlive_obj.gif"
|
||||||
|
|
|
@ -23,6 +23,7 @@ Contributors:
|
||||||
point="org.eclipse.rse.ui.subsystemConfigurations">
|
point="org.eclipse.rse.ui.subsystemConfigurations">
|
||||||
<configuration
|
<configuration
|
||||||
systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.windows"
|
systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.windows"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%Shells"
|
name="%Shells"
|
||||||
description="%ShellsDescription"
|
description="%ShellsDescription"
|
||||||
iconlive="icons/full/obj16/systemcommandslive_obj.gif"
|
iconlive="icons/full/obj16/systemcommandslive_obj.gif"
|
||||||
|
|
|
@ -26,6 +26,7 @@ Contributors:
|
||||||
point="org.eclipse.rse.ui.subsystemConfigurations">
|
point="org.eclipse.rse.ui.subsystemConfigurations">
|
||||||
<configuration
|
<configuration
|
||||||
systemTypeIds="org.eclipse.rse.systemtype.local"
|
systemTypeIds="org.eclipse.rse.systemtype.local"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%Shells"
|
name="%Shells"
|
||||||
description="%ShellsDescription"
|
description="%ShellsDescription"
|
||||||
iconlive="icons/full/obj16/systemcommandslive_obj.gif"
|
iconlive="icons/full/obj16/systemcommandslive_obj.gif"
|
||||||
|
|
|
@ -15,6 +15,7 @@ Martin Oberhuber - initial API and implementation
|
||||||
point="org.eclipse.rse.ui.subsystemConfigurations">
|
point="org.eclipse.rse.ui.subsystemConfigurations">
|
||||||
<configuration
|
<configuration
|
||||||
systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.aix;org.eclipse.rse.systemtype.ssh"
|
systemTypeIds="org.eclipse.rse.systemtype.linux;org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.aix;org.eclipse.rse.systemtype.ssh"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%SshShellSubsystemName"
|
name="%SshShellSubsystemName"
|
||||||
description="%SshShellSubsystemDescription"
|
description="%SshShellSubsystemDescription"
|
||||||
iconlive="icons/full/obj16/systemcommandslive_obj.gif"
|
iconlive="icons/full/obj16/systemcommandslive_obj.gif"
|
||||||
|
|
|
@ -28,6 +28,7 @@ Contributors:
|
||||||
<!-- point="org.eclipse.rse.ui.subsystemConfigurations"> -->
|
<!-- point="org.eclipse.rse.ui.subsystemConfigurations"> -->
|
||||||
<!-- <configuration -->
|
<!-- <configuration -->
|
||||||
<!-- systemTypeIds="org.eclipse.rse.systemtype.local;org.eclipse.rse.systemtype.unix"-->
|
<!-- systemTypeIds="org.eclipse.rse.systemtype.local;org.eclipse.rse.systemtype.unix"-->
|
||||||
|
<!-- supportsAllSystemTypes="false" -->
|
||||||
<!-- name="Files" -->
|
<!-- name="Files" -->
|
||||||
<!-- description="This subsystem allows you to work with files on local or remote systems."-->
|
<!-- description="This subsystem allows you to work with files on local or remote systems."-->
|
||||||
<!-- icon="icons/filesubsys.gif" -->
|
<!-- icon="icons/filesubsys.gif" -->
|
||||||
|
|
|
@ -66,50 +66,6 @@ as a folder name for information contained by the subsystem configuration, or by
|
||||||
</documentation>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="vendor" type="string" use="required">
|
|
||||||
<annotation>
|
|
||||||
<documentation>
|
|
||||||
Name of the vendor supplying this subsystem configuration.
|
|
||||||
</documentation>
|
|
||||||
<appInfo>
|
|
||||||
<meta.attribute translatable="true"/>
|
|
||||||
</appInfo>
|
|
||||||
</annotation>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="icon" type="string" use="required">
|
|
||||||
<annotation>
|
|
||||||
<documentation>
|
|
||||||
The icon to dipslay for subsystems of this configuration, when not connected.
|
|
||||||
Specify the path of the .gif file, relative to your plugin directory.
|
|
||||||
</documentation>
|
|
||||||
<appInfo>
|
|
||||||
<meta.attribute kind="resource"/>
|
|
||||||
</appInfo>
|
|
||||||
</annotation>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="iconlive" type="string" use="required">
|
|
||||||
<annotation>
|
|
||||||
<documentation>
|
|
||||||
The icon to display for subsystems of this configuration, when there is a live connection. This
|
|
||||||
is usually derived from the normal icon, but adorned with a bright green arrow. Specify
|
|
||||||
a path to the icon's .gif file, relative to your plugin directory.
|
|
||||||
</documentation>
|
|
||||||
<appInfo>
|
|
||||||
<meta.attribute kind="resource"/>
|
|
||||||
</appInfo>
|
|
||||||
</annotation>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="class" type="string" use="required">
|
|
||||||
<annotation>
|
|
||||||
<documentation>
|
|
||||||
A class that implements <samp>org.eclipse.rse.core.subsystems.ISubSystemConfiguration</samp>.
|
|
||||||
It is recommended to extend <samp>org.eclipse.rse.core.subsystems.SubSystemConfiguration</samp> or <samp>org.eclipse.rse.core.servicesubsystem.ServiceSubSystemConfiguration</samp>.
|
|
||||||
</documentation>
|
|
||||||
<appInfo>
|
|
||||||
<meta.attribute kind="java" basedOn="org.eclipse.rse.core.subsystems.SubSystemConfiguration:org.eclipse.rse.core.subsystems.ISubSystemConfiguration"/>
|
|
||||||
</appInfo>
|
|
||||||
</annotation>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="name" type="string" use="required">
|
<attribute name="name" type="string" use="required">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<documentation>
|
||||||
|
@ -132,27 +88,64 @@ These appear in configuration and properties pages for subsystems.
|
||||||
</appInfo>
|
</appInfo>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="systemTypes" type="string">
|
<attribute name="vendor" type="string" use="required">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<documentation>
|
||||||
A semicolon separated list of system type names that subsystems from this configuration support. For example, "Unix;Linux".
|
Name of the vendor supplying this subsystem configuration.
|
||||||
If not specified and the "systemTypeIds" attribute is not specified, defaults to all system types. The wildcards '*' and '?' are accepted.
|
|
||||||
<p>
|
|
||||||
<b>Deprecated:</b> Use the systemTypeIds attribute instead.
|
|
||||||
</documentation>
|
</documentation>
|
||||||
<appInfo>
|
<appInfo>
|
||||||
<meta.attribute deprecated="true"/>
|
<meta.attribute translatable="true"/>
|
||||||
</appInfo>
|
</appInfo>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<attribute name="class" type="string" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
A class that implements <samp>org.eclipse.rse.core.subsystems.ISubSystemConfiguration</samp>.
|
||||||
|
It is recommended to extend <samp>org.eclipse.rse.core.subsystems.SubSystemConfiguration</samp> or <samp>org.eclipse.rse.core.servicesubsystem.ServiceSubSystemConfiguration</samp>.
|
||||||
|
</documentation>
|
||||||
|
<appInfo>
|
||||||
|
<meta.attribute kind="java" basedOn="org.eclipse.rse.core.subsystems.SubSystemConfiguration:org.eclipse.rse.core.subsystems.ISubSystemConfiguration"/>
|
||||||
|
</appInfo>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="supportsAllSystemTypes" type="boolean" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
A boolean attribute to mark the subsystem configuration compatible with all contributed system types.
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
<attribute name="systemTypeIds" type="string">
|
<attribute name="systemTypeIds" type="string">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<documentation>
|
||||||
A semicolon separated list of system type ids that subsystems from this configuration support. For example, "org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.linux".
|
A semicolon separated list of system type ids that subsystems from this configuration support. For example, "org.eclipse.rse.systemtype.unix;org.eclipse.rse.systemtype.linux". The wildcards '*' and '?' are accepted. The attribute will be not considered if the attribute 'supportsAllSystemTypes' is set to 'true'.
|
||||||
If not specified and the "systemTypes" attribute is not specified, defaults to all system types. The wildcards '*' and '?' are accepted.
|
|
||||||
</documentation>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<attribute name="icon" type="string">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
The icon to dipslay for subsystems of this configuration, when not connected.
|
||||||
|
Specify the path of the .gif file, relative to your plugin directory.
|
||||||
|
</documentation>
|
||||||
|
<appInfo>
|
||||||
|
<meta.attribute kind="resource"/>
|
||||||
|
</appInfo>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="iconlive" type="string">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
The icon to display for subsystems of this configuration, when there is a live connection. This
|
||||||
|
is usually derived from the normal icon, but adorned with a bright green arrow. Specify
|
||||||
|
a path to the icon's .gif file, relative to your plugin directory.
|
||||||
|
</documentation>
|
||||||
|
<appInfo>
|
||||||
|
<meta.attribute kind="resource"/>
|
||||||
|
</appInfo>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
<attribute name="category" type="string">
|
<attribute name="category" type="string">
|
||||||
<annotation>
|
<annotation>
|
||||||
<documentation>
|
<documentation>
|
||||||
|
@ -187,6 +180,7 @@ Note that ServiceSubSystems that share the same service should always use the sa
|
||||||
point="org.eclipse.rse.ui.subsystemConfigurations">
|
point="org.eclipse.rse.ui.subsystemConfigurations">
|
||||||
<configuration
|
<configuration
|
||||||
systemTypes="Unix;Linux;Local"
|
systemTypes="Unix;Linux;Local"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="Databases"
|
name="Databases"
|
||||||
icon="icons/dbsubsys.gif"
|
icon="icons/dbsubsys.gif"
|
||||||
iconlive="icons/dbsubsyslive.gif"
|
iconlive="icons/dbsubsyslive.gif"
|
||||||
|
|
|
@ -51,8 +51,6 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy
|
||||||
private String name;
|
private String name;
|
||||||
// The subsystem configuration description
|
// The subsystem configuration description
|
||||||
private String description;
|
private String description;
|
||||||
// The list of associated system types by name as it appears in the plugin.xml
|
|
||||||
private String systemTypeNames;
|
|
||||||
// The list of associated system types by id as it appears in the plugin.xml
|
// The list of associated system types by id as it appears in the plugin.xml
|
||||||
private String systemTypeIds;
|
private String systemTypeIds;
|
||||||
|
|
||||||
|
@ -95,26 +93,6 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy
|
||||||
}
|
}
|
||||||
|
|
||||||
private final class SystemTypeMatcher implements ISystemTypeMatcher {
|
private final class SystemTypeMatcher implements ISystemTypeMatcher {
|
||||||
private final class SystemTypeNamePattern implements ISystemTypeMatcher {
|
|
||||||
private final Pattern pattern;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
*/
|
|
||||||
public SystemTypeNamePattern(Pattern pattern) {
|
|
||||||
assert pattern != null;
|
|
||||||
this.pattern = pattern;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.rse.core.internal.subsystems.SubSystemConfigurationProxy.ISystemTypePattern#matches(org.eclipse.rse.core.IRSESystemType)
|
|
||||||
*/
|
|
||||||
public boolean matches(IRSESystemType systemType) {
|
|
||||||
assert systemType != null;
|
|
||||||
return pattern.matcher(systemType.getName()).matches();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private final class SystemTypeIdPattern implements ISystemTypeMatcher {
|
private final class SystemTypeIdPattern implements ISystemTypeMatcher {
|
||||||
private final Pattern pattern;
|
private final Pattern pattern;
|
||||||
|
|
||||||
|
@ -141,21 +119,10 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param declaredSystemTypeNames The list of declared system type names. Might be <code>null</code>.
|
|
||||||
* @param declaredSystemTypeIds The list of declared system type ids. Might be <code>null</code>.
|
* @param declaredSystemTypeIds The list of declared system type ids. Might be <code>null</code>.
|
||||||
*/
|
*/
|
||||||
public SystemTypeMatcher(String declaredSystemTypeNames, String declaredSystemTypeIds) {
|
public SystemTypeMatcher(String declaredSystemTypeIds) {
|
||||||
// Compile the list of patterns out of given lists of declared system types
|
// Compile the list of patterns out of given lists of declared system types
|
||||||
if (declaredSystemTypeNames != null) {
|
|
||||||
String[] names = declaredSystemTypeNames.split(";"); //$NON-NLS-1$
|
|
||||||
if (names != null && names.length > 0) {
|
|
||||||
for (int i = 0; i < names.length; i++) {
|
|
||||||
SystemTypeNamePattern pattern = new SystemTypeNamePattern(Pattern.compile(makeRegex(names[i])));
|
|
||||||
patterns.add(pattern);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (declaredSystemTypeIds != null) {
|
if (declaredSystemTypeIds != null) {
|
||||||
String[] ids = declaredSystemTypeIds.split(";"); //$NON-NLS-1$
|
String[] ids = declaredSystemTypeIds.split(";"); //$NON-NLS-1$
|
||||||
if (ids != null && ids.length > 0) {
|
if (ids != null && ids.length > 0) {
|
||||||
|
@ -204,37 +171,31 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy
|
||||||
this.id = element.getAttribute("id"); //$NON-NLS-1$
|
this.id = element.getAttribute("id"); //$NON-NLS-1$
|
||||||
this.name = element.getAttribute("name").trim(); //$NON-NLS-1$
|
this.name = element.getAttribute("name").trim(); //$NON-NLS-1$
|
||||||
this.description = element.getAttribute("description").trim(); //$NON-NLS-1$
|
this.description = element.getAttribute("description").trim(); //$NON-NLS-1$
|
||||||
this.systemTypeNames = element.getAttribute("systemTypes"); //$NON-NLS-1$
|
|
||||||
this.systemTypeIds = element.getAttribute("systemTypeIds"); //$NON-NLS-1$
|
this.systemTypeIds = element.getAttribute("systemTypeIds"); //$NON-NLS-1$
|
||||||
this.vendor = element.getAttribute("vendor"); //$NON-NLS-1$
|
this.vendor = element.getAttribute("vendor"); //$NON-NLS-1$
|
||||||
this.category = element.getAttribute("category"); //$NON-NLS-1$
|
this.category = element.getAttribute("category"); //$NON-NLS-1$
|
||||||
this.priority = Integer.MAX_VALUE;
|
this.priority = Integer.MAX_VALUE;
|
||||||
|
|
||||||
String priorityStr = element.getAttribute("priority"); //$NON-NLS-1$
|
String priorityStr = element.getAttribute("priority"); //$NON-NLS-1$
|
||||||
|
|
||||||
// Normalize the attributes now
|
|
||||||
try {
|
try {
|
||||||
if (priorityStr != null) priority = Integer.parseInt(priorityStr);
|
if (priorityStr != null) priority = Integer.parseInt(priorityStr);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
priority = Integer.MAX_VALUE;
|
|
||||||
SystemBasePlugin.logError("Exception reading priority for subsystem configuration " + name + " defined in plugin " + element.getDeclaringExtension().getNamespaceIdentifier(), e); //$NON-NLS-1$ //$NON-NLS-2$
|
SystemBasePlugin.logError("Exception reading priority for subsystem configuration " + name + " defined in plugin " + element.getDeclaringExtension().getNamespaceIdentifier(), e); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String supportsAllSystemTypes = element.getAttribute("supportsAllSystemTypes"); //$NON-NLS-1$
|
||||||
|
if (supportsAllSystemTypes != null) this.allTypes = Boolean.TRUE.equals(Boolean.valueOf(supportsAllSystemTypes));
|
||||||
|
|
||||||
if (vendor == null) vendor = "Unknown"; //$NON-NLS-1$
|
if (vendor == null) vendor = "Unknown"; //$NON-NLS-1$
|
||||||
if (category == null) category = "Unknown"; //$NON-NLS-1$
|
if (category == null) category = "Unknown"; //$NON-NLS-1$
|
||||||
|
|
||||||
// We default to all system types if neither systemTypeNames nor systemTypeIds are specified.
|
|
||||||
if (systemTypeNames == null && systemTypeIds == null) systemTypeIds = "*"; //$NON-NLS-1$
|
|
||||||
|
|
||||||
this.allTypes = systemTypeIds != null && systemTypeIds.equals("*"); //$NON-NLS-1$
|
|
||||||
|
|
||||||
this.image = getPluginImage(element, element.getAttribute("icon")); //$NON-NLS-1$
|
this.image = getPluginImage(element, element.getAttribute("icon")); //$NON-NLS-1$
|
||||||
if (this.image == null) this.image = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTION_ID);
|
if (this.image == null) this.image = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTION_ID);
|
||||||
|
|
||||||
this.liveImage = getPluginImage(element, element.getAttribute("iconlive")); //$NON-NLS-1$
|
this.liveImage = getPluginImage(element, element.getAttribute("iconlive")); //$NON-NLS-1$
|
||||||
if (this.liveImage == null) this.liveImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTIONLIVE_ID);
|
if (this.liveImage == null) this.liveImage = RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_CONNECTIONLIVE_ID);
|
||||||
|
|
||||||
systemTypeMatcher = new SystemTypeMatcher(getDeclaredSystemTypeNames(), getDeclaredSystemTypeIds());
|
systemTypeMatcher = new SystemTypeMatcher(getDeclaredSystemTypeIds());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -277,14 +238,7 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy
|
||||||
* @see org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy#getDeclaredSystemTypeIds()
|
* @see org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy#getDeclaredSystemTypeIds()
|
||||||
*/
|
*/
|
||||||
public String getDeclaredSystemTypeIds() {
|
public String getDeclaredSystemTypeIds() {
|
||||||
return "*".equals(systemTypeIds) ? null : systemTypeIds; //$NON-NLS-1$
|
return systemTypeIds;
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy#getDeclaredSystemTypeNames()
|
|
||||||
*/
|
|
||||||
public String getDeclaredSystemTypeNames() {
|
|
||||||
return "*".equals(systemTypeNames) ? null : systemTypeNames; //$NON-NLS-1$
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -310,11 +264,13 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy
|
||||||
if (isMatchingDeclaredSystemTypes(systemType)
|
if (isMatchingDeclaredSystemTypes(systemType)
|
||||||
|| (systemType.getSubsystemConfigurationIds() != null
|
|| (systemType.getSubsystemConfigurationIds() != null
|
||||||
&& Arrays.asList(systemType.getSubsystemConfigurationIds()).contains(getId()))) {
|
&& Arrays.asList(systemType.getSubsystemConfigurationIds()).contains(getId()))) {
|
||||||
|
if (!resolvedSystemTypes.contains(systemType.getName())) {
|
||||||
resolvedSystemTypes.add(systemType.getName());
|
resolvedSystemTypes.add(systemType.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (String[])resolvedSystemTypes.toArray(new String[resolvedSystemTypes.size()]);
|
return (String[])resolvedSystemTypes.toArray(new String[resolvedSystemTypes.size()]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
<extension point="org.eclipse.rse.ui.subsystemConfigurations">
|
<extension point="org.eclipse.rse.ui.subsystemConfigurations">
|
||||||
<configuration
|
<configuration
|
||||||
id="org.eclipse.rse.tests.subsystems.TestSubSystem"
|
id="org.eclipse.rse.tests.subsystems.TestSubSystem"
|
||||||
systemTypes="Local;Windows"
|
systemTypeIds="org.eclipse.rse.systemtype.local;org.eclipse.rse.systemtype.windows"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%testSubSystemName"
|
name="%testSubSystemName"
|
||||||
class="org.eclipse.rse.tests.internal.testsubsystem.TestSubSystemConfiguration"
|
class="org.eclipse.rse.tests.internal.testsubsystem.TestSubSystemConfiguration"
|
||||||
category="users"
|
category="users"
|
||||||
|
@ -33,6 +34,7 @@
|
||||||
<configuration
|
<configuration
|
||||||
id="org.eclipse.rse.tests.subsystems.TestSubSystem2"
|
id="org.eclipse.rse.tests.subsystems.TestSubSystem2"
|
||||||
systemTypeIds="org.eclipse.rse.tests.*"
|
systemTypeIds="org.eclipse.rse.tests.*"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%testSubSystem2Name"
|
name="%testSubSystem2Name"
|
||||||
class="org.eclipse.rse.tests.internal.testsubsystem.TestSubSystemConfiguration"
|
class="org.eclipse.rse.tests.internal.testsubsystem.TestSubSystemConfiguration"
|
||||||
category="users"
|
category="users"
|
||||||
|
@ -46,7 +48,8 @@
|
||||||
<!-- Do not replace the use of systemTypes here as long it only deprecated! -->
|
<!-- Do not replace the use of systemTypes here as long it only deprecated! -->
|
||||||
<configuration
|
<configuration
|
||||||
id="org.eclipse.rse.tests.subsystems.TestSubSystem3"
|
id="org.eclipse.rse.tests.subsystems.TestSubSystem3"
|
||||||
systemTypes="*n?x"
|
systemTypeIds="org.eclipse.rse.systemtype.*n?x"
|
||||||
|
supportsAllSystemTypes="false"
|
||||||
name="%testSubSystem3Name"
|
name="%testSubSystem3Name"
|
||||||
class="org.eclipse.rse.tests.internal.testsubsystem.TestSubSystemConfiguration"
|
class="org.eclipse.rse.tests.internal.testsubsystem.TestSubSystemConfiguration"
|
||||||
category="users"
|
category="users"
|
||||||
|
|
|
@ -40,19 +40,13 @@ public class SubSystemConfigurationProxyTestCase extends RSECoreTestCase {
|
||||||
assertFalse("Unexpected return value true for proxy.equals(null)!", proxy.equals(null)); //$NON-NLS-1$
|
assertFalse("Unexpected return value true for proxy.equals(null)!", proxy.equals(null)); //$NON-NLS-1$
|
||||||
assertTrue("Unexpected return value false for proxy.equals(proxy)!", proxy.equals(proxy)); //$NON-NLS-1$
|
assertTrue("Unexpected return value false for proxy.equals(proxy)!", proxy.equals(proxy)); //$NON-NLS-1$
|
||||||
|
|
||||||
if (proxy.getDeclaredSystemTypeNames() == null && proxy.getDeclaredSystemTypeIds() == null) {
|
|
||||||
assertTrue("Proxy is not flagged to support all system types but should!", proxy.supportsAllSystemTypes()); //$NON-NLS-1$
|
|
||||||
} else {
|
|
||||||
assertFalse("Proxy is flagged to support all system types but should not!", proxy.supportsAllSystemTypes()); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
|
|
||||||
// a few specific value we test only for one well known test subsystem
|
// a few specific value we test only for one well known test subsystem
|
||||||
if ("org.eclipse.rse.tests.subsystems.TestSubSystem".equals(proxy.getId())) { //$NON-NLS-1$
|
if ("org.eclipse.rse.tests.subsystems.TestSubSystem".equals(proxy.getId())) { //$NON-NLS-1$
|
||||||
assertEquals("Unexpected return value for proxy.getDescription()!", "Test Subsystem", proxy.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
|
assertEquals("Unexpected return value for proxy.getDescription()!", "Test Subsystem", proxy.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
assertEquals("Unexpected return value for proxy.getVendor()!", "Eclipse.org", proxy.getVendor()); //$NON-NLS-1$ //$NON-NLS-2$
|
assertEquals("Unexpected return value for proxy.getVendor()!", "Eclipse.org", proxy.getVendor()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
assertEquals("Unexpected return value for proxy.getName()!", "Tests", proxy.getName()); //$NON-NLS-1$ //$NON-NLS-2$
|
assertEquals("Unexpected return value for proxy.getName()!", "Tests", proxy.getName()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
assertEquals("Unexpected return value for proxy.getDeclaredSystemTypeNames()!", "Local;Windows", proxy.getDeclaredSystemTypeNames()); //$NON-NLS-1$ //$NON-NLS-2$
|
assertEquals("Unexpected return value for proxy.getDeclaredSystemTypeIds()!", "org.eclipse.rse.systemtype.local;org.eclipse.rse.systemtype.windows", proxy.getDeclaredSystemTypeIds()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
assertNull("Unexpected return value non-null for proxy.getDeclaredSystemTypeIds()!", proxy.getDeclaredSystemTypeIds()); //$NON-NLS-1$
|
assertFalse("Unexpected return value true for proxy.supportsAllSystemTypes()!", proxy.supportsAllSystemTypes()); //$NON-NLS-1$
|
||||||
assertEquals("Unexpected return value for proxy.getPriority()!", 50000, proxy.getPriority()); //$NON-NLS-1$
|
assertEquals("Unexpected return value for proxy.getPriority()!", 50000, proxy.getPriority()); //$NON-NLS-1$
|
||||||
assertEquals("Unexpected return value for proxy.getCategory()!", "users", proxy.getCategory()); //$NON-NLS-1$ //$NON-NLS-2$
|
assertEquals("Unexpected return value for proxy.getCategory()!", "users", proxy.getCategory()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
assertNotNull("Unexpected return value null for proxy.getSubSystemConfiguration()!", proxy.getSubSystemConfiguration()); //$NON-NLS-1$
|
assertNotNull("Unexpected return value null for proxy.getSubSystemConfiguration()!", proxy.getSubSystemConfiguration()); //$NON-NLS-1$
|
||||||
|
@ -76,7 +70,7 @@ public class SubSystemConfigurationProxyTestCase extends RSECoreTestCase {
|
||||||
assertEquals("Unexpected return value for proxy.getVendor()!", "Eclipse.org", proxy.getVendor()); //$NON-NLS-1$ //$NON-NLS-2$
|
assertEquals("Unexpected return value for proxy.getVendor()!", "Eclipse.org", proxy.getVendor()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
assertEquals("Unexpected return value for proxy.getName()!", "Tests2", proxy.getName()); //$NON-NLS-1$ //$NON-NLS-2$
|
assertEquals("Unexpected return value for proxy.getName()!", "Tests2", proxy.getName()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
assertEquals("Unexpected return value for proxy.getDeclaredSystemTypeIds()!", "org.eclipse.rse.tests.*", proxy.getDeclaredSystemTypeIds()); //$NON-NLS-1$ //$NON-NLS-2$
|
assertEquals("Unexpected return value for proxy.getDeclaredSystemTypeIds()!", "org.eclipse.rse.tests.*", proxy.getDeclaredSystemTypeIds()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
assertNull("Unexpected return value non-null for proxy.getDeclaredSystemTypeNames()!", proxy.getDeclaredSystemTypeNames()); //$NON-NLS-1$
|
assertFalse("Unexpected return value true for proxy.supportsAllSystemTypes()!", proxy.supportsAllSystemTypes()); //$NON-NLS-1$
|
||||||
assertEquals("Unexpected return value for proxy.getPriority()!", 100000, proxy.getPriority()); //$NON-NLS-1$
|
assertEquals("Unexpected return value for proxy.getPriority()!", 100000, proxy.getPriority()); //$NON-NLS-1$
|
||||||
assertEquals("Unexpected return value for proxy.getCategory()!", "users", proxy.getCategory()); //$NON-NLS-1$ //$NON-NLS-2$
|
assertEquals("Unexpected return value for proxy.getCategory()!", "users", proxy.getCategory()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
assertNotNull("Unexpected return value null for proxy.getSubSystemConfiguration()!", proxy.getSubSystemConfiguration()); //$NON-NLS-1$
|
assertNotNull("Unexpected return value null for proxy.getSubSystemConfiguration()!", proxy.getSubSystemConfiguration()); //$NON-NLS-1$
|
||||||
|
@ -99,8 +93,8 @@ public class SubSystemConfigurationProxyTestCase extends RSECoreTestCase {
|
||||||
assertEquals("Unexpected return value for proxy.getDescription()!", "Test Subsystem 3", proxy.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
|
assertEquals("Unexpected return value for proxy.getDescription()!", "Test Subsystem 3", proxy.getDescription()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
assertEquals("Unexpected return value for proxy.getVendor()!", "Eclipse.org", proxy.getVendor()); //$NON-NLS-1$ //$NON-NLS-2$
|
assertEquals("Unexpected return value for proxy.getVendor()!", "Eclipse.org", proxy.getVendor()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
assertEquals("Unexpected return value for proxy.getName()!", "Tests3", proxy.getName()); //$NON-NLS-1$ //$NON-NLS-2$
|
assertEquals("Unexpected return value for proxy.getName()!", "Tests3", proxy.getName()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
assertEquals("Unexpected return value for proxy.getDeclaredSystemTypeNames()!", "*n?x", proxy.getDeclaredSystemTypeNames()); //$NON-NLS-1$ //$NON-NLS-2$
|
assertEquals("Unexpected return value for proxy.getDeclaredSystemTypeIds()!", "org.eclipse.rse.systemtype.*n?x", proxy.getDeclaredSystemTypeIds()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
assertNull("Unexpected return value non-null for proxy.getDeclaredSystemTypeIds()!", proxy.getDeclaredSystemTypeIds()); //$NON-NLS-1$
|
assertFalse("Unexpected return value true for proxy.supportsAllSystemTypes()!", proxy.supportsAllSystemTypes()); //$NON-NLS-1$
|
||||||
assertEquals("Unexpected return value for proxy.getPriority()!", 2000, proxy.getPriority()); //$NON-NLS-1$
|
assertEquals("Unexpected return value for proxy.getPriority()!", 2000, proxy.getPriority()); //$NON-NLS-1$
|
||||||
assertEquals("Unexpected return value for proxy.getCategory()!", "users", proxy.getCategory()); //$NON-NLS-1$ //$NON-NLS-2$
|
assertEquals("Unexpected return value for proxy.getCategory()!", "users", proxy.getCategory()); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
assertNotNull("Unexpected return value null for proxy.getSubSystemConfiguration()!", proxy.getSubSystemConfiguration()); //$NON-NLS-1$
|
assertNotNull("Unexpected return value null for proxy.getSubSystemConfiguration()!", proxy.getSubSystemConfiguration()); //$NON-NLS-1$
|
||||||
|
|
Loading…
Add table
Reference in a new issue