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

Bug 162098 - removing systemClass attribute from subsystemConfiguration along with its attendant documentation and API.

This commit is contained in:
David Dykstal 2006-10-27 02:52:34 +00:00
parent 4675c6c8e3
commit f16851571d
7 changed files with 88 additions and 97 deletions

View file

@ -384,32 +384,32 @@ public class DStoreConnectorService extends AbstractConnectorService implements
return dstorePath.getAbsolutePath(); return dstorePath.getAbsolutePath();
} }
/** // /**
* Specify if you support connecting to a running daemon // * Specify if you support connecting to a running daemon
* @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)} // * @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
* or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)} // * or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
*/ // */
public void setDaemonLaunchEnabled(SubSystem subsystemImpl, boolean enable) { // public void setDaemonLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
enableServerLaunchType(subsystemImpl, ServerLaunchType.DAEMON_LITERAL, enable); // enableServerLaunchType(subsystemImpl, ServerLaunchType.DAEMON_LITERAL, enable);
} // }
/** // /**
* Return if you support connecting to a running daemon // * Return if you support connecting to a running daemon
* @deprecated Use instead {@link #isEnabledServerLaunchType(ISubSystem, ServerLaunchType)} // * @deprecated Use instead {@link #isEnabledServerLaunchType(ISubSystem, ServerLaunchType)}
* or {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)} // * or {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
*/ // */
public boolean getDaemonLaunchEnabled(SubSystem subsystemImpl) { // public boolean getDaemonLaunchEnabled(SubSystem subsystemImpl) {
return isEnabledServerLaunchType(subsystemImpl, ServerLaunchType.DAEMON_LITERAL); // return isEnabledServerLaunchType(subsystemImpl, ServerLaunchType.DAEMON_LITERAL);
} // }
/** // /**
* Specify if you support remotely launching a server script // * Specify if you support remotely launching a server script
* @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)} // * @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
* or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)} // * or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
*/ // */
public void setRexecLaunchEnabled(SubSystem subsystemImpl, boolean enable) { // public void setRexecLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
enableServerLaunchType(subsystemImpl, ServerLaunchType.REXEC_LITERAL, enable); // enableServerLaunchType(subsystemImpl, ServerLaunchType.REXEC_LITERAL, enable);
} // }
/** /**
* Return if you support remotely launching a server script * Return if you support remotely launching a server script
@ -420,14 +420,14 @@ public class DStoreConnectorService extends AbstractConnectorService implements
return isEnabledServerLaunchType(subsystemImpl, ServerLaunchType.REXEC_LITERAL); return isEnabledServerLaunchType(subsystemImpl, ServerLaunchType.REXEC_LITERAL);
} }
/** // /**
* Specify if you support connecting to a server already running // * Specify if you support connecting to a server already running
* @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)} // * @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
* or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)} // * or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
*/ // */
public void setNoLaunchEnabled(SubSystem subsystemImpl, boolean enable) { // public void setNoLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
enableServerLaunchType(subsystemImpl, ServerLaunchType.RUNNING_LITERAL, enable); // enableServerLaunchType(subsystemImpl, ServerLaunchType.RUNNING_LITERAL, enable);
} // }
/** /**
* Return if you support connecting to a server already running * Return if you support connecting to a server already running

View file

@ -181,7 +181,7 @@ public interface IRemoteServerLauncher extends IServerLauncherProperties{
* *
* @see org.eclipse.rse.core.subsystems.ServerLaunchType * @see org.eclipse.rse.core.subsystems.ServerLaunchType
*/ */
public void enableServerLaunchType(ServerLaunchType serverLaunchType, boolean enable); // public void enableServerLaunchType(ServerLaunchType serverLaunchType, boolean enable);
/** /**
* This methods returns the enablement state per server launch type. * This methods returns the enablement state per server launch type.

View file

@ -74,12 +74,12 @@ public interface ISubSystemConfigurationProxy
* Return the subsystem factory singleton instance. Will instantiate if not already. * Return the subsystem factory singleton instance. Will instantiate if not already.
*/ */
public ISubSystemConfiguration getSubSystemConfiguration(); public ISubSystemConfiguration getSubSystemConfiguration();
/** // /**
* Return an instance of the ISystem class identified by the "systemClass" attribute // * Return an instance of the ISystem class identified by the "systemClass" attribute
* of this subsystemFactory extension point. Note each call to this method returns a // * of this subsystemFactory extension point. Note each call to this method returns a
* new instance of the class, or null if no "systemClass" attribute was specified. // * new instance of the class, or null if no "systemClass" attribute was specified.
*/ // */
public IConnectorService getSystemObject(); // public IConnectorService getSystemObject();
/** /**
* Test if the given system type matches one or more of the type names declared in the * Test if the given system type matches one or more of the type names declared in the

View file

@ -60,7 +60,7 @@ Contributors:
<!-- system. Name a class that implements --> <!-- system. Name a class that implements -->
<!-- org.eclipse.rse.subsystems.ISystem or extends the appropriate --> <!-- org.eclipse.rse.subsystems.ISystem or extends the appropriate -->
<!-- predefined class such as org.eclipse.rse.universal.UniversalSystem --> <!-- predefined class such as org.eclipse.rse.universal.UniversalSystem -->
<!-- for unix, windows and system types. --> <!-- for unix, windows and system types. (systemClass removed in OpenRSE) -->
<!-- ================================================================================== --> <!-- ================================================================================== -->
<!-- --> <!-- -->
<!-- For systemTypes, if you specify * for all, you still have a chance at runtime to --> <!-- For systemTypes, if you specify * for all, you still have a chance at runtime to -->

View file

@ -180,16 +180,6 @@ category of &quot;database&quot;.
</documentation> </documentation>
</annotation> </annotation>
</attribute> </attribute>
<attribute name="systemClass" type="string">
<annotation>
<documentation>
Optional.
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn="org.eclipse.rse.core.subsystems.IConnectorService"/>
</appInfo>
</annotation>
</attribute>
<attribute name="priority" type="string"> <attribute name="priority" type="string">
<annotation> <annotation>
<documentation> <documentation>

View file

@ -27,7 +27,7 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.rse.core.RSECorePlugin; import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.SystemBasePlugin; import org.eclipse.rse.core.SystemBasePlugin;
import org.eclipse.rse.core.subsystems.IConnectorService; //import org.eclipse.rse.core.subsystems.IConnectorService;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy; import org.eclipse.rse.core.subsystems.ISubSystemConfigurationProxy;
import org.eclipse.rse.core.subsystems.SubSystemConfiguration; import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
@ -41,7 +41,8 @@ import org.osgi.framework.Bundle;
*/ */
public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy
{ {
private String name,description,id,types,vendor, category, systemClassName; // private String name,description,id,types,vendor, category, systemClassName;
private String name,description,id,types,vendor, category;
private int priority; private int priority;
private String[] systemTypes; private String[] systemTypes;
private List typesArray; private List typesArray;
@ -65,7 +66,7 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy
this.types = element.getAttribute("systemTypes"); this.types = element.getAttribute("systemTypes");
this.vendor = element.getAttribute("vendor"); this.vendor = element.getAttribute("vendor");
this.category = element.getAttribute("category"); this.category = element.getAttribute("category");
this.systemClassName = element.getAttribute("systemClass"); // this.systemClassName = element.getAttribute("systemClass");
this.priority = Integer.MAX_VALUE; this.priority = Integer.MAX_VALUE;
String priorityStr = element.getAttribute("priority"); String priorityStr = element.getAttribute("priority");
@ -292,30 +293,30 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy
} }
return object; return object;
} }
/** // /**
* Return an instance of the ISystem class identified by the "systemClass" attribute // * Return an instance of the ISystem class identified by the "systemClass" attribute
* of this subsystemFactory extension point. Note each call to this method returns a // * of this subsystemFactory extension point. Note each call to this method returns a
* new instance of the class, or null if no "systemClass" attribute was specified. // * new instance of the class, or null if no "systemClass" attribute was specified.
*/ // */
public IConnectorService getSystemObject() // public IConnectorService getSystemObject()
{ // {
if (systemClassName == null) // if (systemClassName == null)
return null; // return null;
Object object = null; // Object object = null;
try // try
{ // {
object = (IConnectorService)element.createExecutableExtension("systemClass"); // object = (IConnectorService)element.createExecutableExtension("systemClass");
} catch (Exception exc) // } catch (Exception exc)
{ // {
SystemBasePlugin.logError("Unable to instantiate ISystem class "+ systemClassName + " for extension point " + id,exc); // SystemBasePlugin.logError("Unable to instantiate ISystem class "+ systemClassName + " for extension point " + id,exc);
org.eclipse.swt.widgets.MessageBox mb = new org.eclipse.swt.widgets.MessageBox(SystemBasePlugin.getActiveWorkbenchShell()); // org.eclipse.swt.widgets.MessageBox mb = new org.eclipse.swt.widgets.MessageBox(SystemBasePlugin.getActiveWorkbenchShell());
mb.setText("Unexpected Error"); // mb.setText("Unexpected Error");
String errmsg = "Unable to instantiate ISystem class " + systemClassName + " for extension point " + id +": " + exc.getClass().getName()+" - " + exc.getMessage(); // String errmsg = "Unable to instantiate ISystem class " + systemClassName + " for extension point " + id +": " + exc.getClass().getName()+" - " + exc.getMessage();
mb.setMessage(errmsg); // mb.setMessage(errmsg);
mb.open(); // mb.open();
} // }
return (IConnectorService)object; // return (IConnectorService)object;
} // }
/** /**
* Reset for a full refresh from disk, such as after a team synch. * Reset for a full refresh from disk, such as after a team synch.

View file

@ -1022,26 +1022,26 @@ public abstract class AbstractConnectorService extends RSEModelObject implements
// ------------------------- // -------------------------
// PRIVATE HELPER METHODS... // PRIVATE HELPER METHODS...
// ------------------------- // -------------------------
/** // /**
* Call this method to identify specific server launch types that are not to be permitted. // * Call this method to identify specific server launch types that are not to be permitted.
* <p> // * <p>
* You normally do not call this! Rather, your subsystem factory class will override // * You normally do not call this! Rather, your subsystem factory class will override
* {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}. // * {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}.
* However, this method is needed by ISVs that re-use predefined subsystem factories, // * However, this method is needed by ISVs that re-use predefined subsystem factories,
* and merely supply their own ISystem object via the "systemClass" attribute of the // * and merely supply their own ISystem object via the "systemClass" attribute of the
* subsystemConfigurations extension point. // * subsystemConfigurations extension point.
* // *
* @see org.eclipse.rse.core.subsystems.ServerLaunchType // * @see org.eclipse.rse.core.subsystems.ServerLaunchType
*/ // */
protected void enableServerLaunchType(ISubSystem subsystem, ServerLaunchType serverLaunchType, boolean enable) // protected void enableServerLaunchType(ISubSystem subsystem, ServerLaunchType serverLaunchType, boolean enable)
{ // {
IServerLauncherProperties sl =getRemoteServerLauncherProperties(); // IServerLauncherProperties sl =getRemoteServerLauncherProperties();
if (sl instanceof RemoteServerLauncher) // if (sl instanceof RemoteServerLauncher)
{ // {
RemoteServerLauncher isl = (RemoteServerLauncher)sl; // RemoteServerLauncher isl = (RemoteServerLauncher)sl;
isl.enableServerLaunchType(serverLaunchType, enable); // isl.enableServerLaunchType(serverLaunchType, enable);
} // }
} // }
/** /**
* This methods returns the enablement state per server launch type. * This methods returns the enablement state per server launch type.
* If {@link #enableServerLaunchType(ServerLaunchType,boolean)} has not been * If {@link #enableServerLaunchType(ServerLaunchType,boolean)} has not been