1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 23:55:26 +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();
}
/**
* Specify if you support connecting to a running daemon
* @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
* or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
*/
public void setDaemonLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
enableServerLaunchType(subsystemImpl, ServerLaunchType.DAEMON_LITERAL, enable);
}
// /**
// * Specify if you support connecting to a running daemon
// * @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
// * or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
// */
// public void setDaemonLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
// enableServerLaunchType(subsystemImpl, ServerLaunchType.DAEMON_LITERAL, enable);
// }
/**
* Return if you support connecting to a running daemon
* @deprecated Use instead {@link #isEnabledServerLaunchType(ISubSystem, ServerLaunchType)}
* or {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
*/
public boolean getDaemonLaunchEnabled(SubSystem subsystemImpl) {
return isEnabledServerLaunchType(subsystemImpl, ServerLaunchType.DAEMON_LITERAL);
}
// /**
// * Return if you support connecting to a running daemon
// * @deprecated Use instead {@link #isEnabledServerLaunchType(ISubSystem, ServerLaunchType)}
// * or {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
// */
// public boolean getDaemonLaunchEnabled(SubSystem subsystemImpl) {
// return isEnabledServerLaunchType(subsystemImpl, ServerLaunchType.DAEMON_LITERAL);
// }
/**
* Specify if you support remotely launching a server script
* @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
* or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
*/
public void setRexecLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
enableServerLaunchType(subsystemImpl, ServerLaunchType.REXEC_LITERAL, enable);
}
// /**
// * Specify if you support remotely launching a server script
// * @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
// * or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
// */
// public void setRexecLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
// enableServerLaunchType(subsystemImpl, ServerLaunchType.REXEC_LITERAL, enable);
// }
/**
* 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);
}
/**
* Specify if you support connecting to a server already running
* @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
* or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
*/
public void setNoLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
enableServerLaunchType(subsystemImpl, ServerLaunchType.RUNNING_LITERAL, enable);
}
// /**
// * Specify if you support connecting to a server already running
// * @deprecated use {@link #enableServerLaunchType(ISubSystem, ServerLaunchType, boolean)}
// * or your subsystem factory should override {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}
// */
// public void setNoLaunchEnabled(SubSystem subsystemImpl, boolean enable) {
// enableServerLaunchType(subsystemImpl, ServerLaunchType.RUNNING_LITERAL, enable);
// }
/**
* 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
*/
public void enableServerLaunchType(ServerLaunchType serverLaunchType, boolean enable);
// public void enableServerLaunchType(ServerLaunchType serverLaunchType, boolean enable);
/**
* 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.
*/
public ISubSystemConfiguration getSubSystemConfiguration();
/**
* 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
* new instance of the class, or null if no "systemClass" attribute was specified.
*/
public IConnectorService getSystemObject();
// /**
// * 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
// * new instance of the class, or null if no "systemClass" attribute was specified.
// */
// public IConnectorService getSystemObject();
/**
* 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 -->
<!-- org.eclipse.rse.subsystems.ISystem or extends the appropriate -->
<!-- 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 -->

View file

@ -180,16 +180,6 @@ category of &quot;database&quot;.
</documentation>
</annotation>
</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">
<annotation>
<documentation>

View file

@ -27,7 +27,7 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.rse.core.RSECorePlugin;
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.ISubSystemConfigurationProxy;
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
@ -41,7 +41,8 @@ import org.osgi.framework.Bundle;
*/
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 String[] systemTypes;
private List typesArray;
@ -65,7 +66,7 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy
this.types = element.getAttribute("systemTypes");
this.vendor = element.getAttribute("vendor");
this.category = element.getAttribute("category");
this.systemClassName = element.getAttribute("systemClass");
// this.systemClassName = element.getAttribute("systemClass");
this.priority = Integer.MAX_VALUE;
String priorityStr = element.getAttribute("priority");
@ -292,30 +293,30 @@ public class SubSystemConfigurationProxy implements ISubSystemConfigurationProxy
}
return object;
}
/**
* 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
* new instance of the class, or null if no "systemClass" attribute was specified.
*/
public IConnectorService getSystemObject()
{
if (systemClassName == null)
return null;
Object object = null;
try
{
object = (IConnectorService)element.createExecutableExtension("systemClass");
} catch (Exception 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());
mb.setText("Unexpected Error");
String errmsg = "Unable to instantiate ISystem class " + systemClassName + " for extension point " + id +": " + exc.getClass().getName()+" - " + exc.getMessage();
mb.setMessage(errmsg);
mb.open();
}
return (IConnectorService)object;
}
// /**
// * 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
// * new instance of the class, or null if no "systemClass" attribute was specified.
// */
// public IConnectorService getSystemObject()
// {
// if (systemClassName == null)
// return null;
// Object object = null;
// try
// {
// object = (IConnectorService)element.createExecutableExtension("systemClass");
// } catch (Exception 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());
// mb.setText("Unexpected Error");
// String errmsg = "Unable to instantiate ISystem class " + systemClassName + " for extension point " + id +": " + exc.getClass().getName()+" - " + exc.getMessage();
// mb.setMessage(errmsg);
// mb.open();
// }
// return (IConnectorService)object;
// }
/**
* 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...
// -------------------------
/**
* Call this method to identify specific server launch types that are not to be permitted.
* <p>
* You normally do not call this! Rather, your subsystem factory class will override
* {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}.
* 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
* subsystemConfigurations extension point.
*
* @see org.eclipse.rse.core.subsystems.ServerLaunchType
*/
protected void enableServerLaunchType(ISubSystem subsystem, ServerLaunchType serverLaunchType, boolean enable)
{
IServerLauncherProperties sl =getRemoteServerLauncherProperties();
if (sl instanceof RemoteServerLauncher)
{
RemoteServerLauncher isl = (RemoteServerLauncher)sl;
isl.enableServerLaunchType(serverLaunchType, enable);
}
}
// /**
// * Call this method to identify specific server launch types that are not to be permitted.
// * <p>
// * You normally do not call this! Rather, your subsystem factory class will override
// * {@link org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchType(ServerLaunchType)}.
// * 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
// * subsystemConfigurations extension point.
// *
// * @see org.eclipse.rse.core.subsystems.ServerLaunchType
// */
// protected void enableServerLaunchType(ISubSystem subsystem, ServerLaunchType serverLaunchType, boolean enable)
// {
// IServerLauncherProperties sl =getRemoteServerLauncherProperties();
// if (sl instanceof RemoteServerLauncher)
// {
// RemoteServerLauncher isl = (RemoteServerLauncher)sl;
// isl.enableServerLaunchType(serverLaunchType, enable);
// }
// }
/**
* This methods returns the enablement state per server launch type.
* If {@link #enableServerLaunchType(ServerLaunchType,boolean)} has not been