mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-06 15:55:47 +02:00
Removing dead code.
This commit is contained in:
parent
d7cfe36b48
commit
ad98ea3625
8 changed files with 81 additions and 85 deletions
|
@ -381,10 +381,13 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
targetFilter.setStringsCaseSensitive(isStringsCaseSensitive());
|
||||
// clone filter strings
|
||||
ISystemFilterString[] strings = getSystemFilterStrings();
|
||||
ISystemFilterString newString = null;
|
||||
if (strings != null)
|
||||
for (int idx=0; idx<strings.length; idx++)
|
||||
newString = copySystemFilterString(targetFilter, strings[idx]);
|
||||
// ISystemFilterString newString = null; DWD - useless code, remove this after testing.
|
||||
if (strings != null) {
|
||||
for (int idx=0; idx<strings.length; idx++) {
|
||||
// newString = copySystemFilterString(targetFilter, strings[idx]); DWD useless code, remove after testing
|
||||
copySystemFilterString(targetFilter, strings[idx]);
|
||||
}
|
||||
}
|
||||
// clone nested filters...
|
||||
ISystemFilter[] filters = getSystemFilters();
|
||||
if (filters != null)
|
||||
|
@ -649,7 +652,7 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
if (filterStringVector == null)
|
||||
{
|
||||
java.util.List el = internalGetFilterStrings();
|
||||
ISystemFilterString[] strings = new ISystemFilterString[el.size()];
|
||||
// ISystemFilterString[] strings = new ISystemFilterString[el.size()]; DWD - useless code.
|
||||
Iterator i = el.iterator();
|
||||
filterStringVector = new Vector();
|
||||
while (i.hasNext())
|
||||
|
|
|
@ -19,7 +19,6 @@ import java.util.ArrayList;
|
|||
import java.util.Iterator;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.core.runtime.IAdaptable;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
|
@ -88,8 +87,8 @@ public class SystemFilterPool extends SystemPersistableReferencedObject
|
|||
protected static final String DELIMITER = SystemFilterPoolReference.DELIMITER;
|
||||
|
||||
// persistence
|
||||
protected boolean _isDirty = true;
|
||||
protected boolean _wasRestored = false;
|
||||
// protected boolean _isDirty = true; FIXME
|
||||
// protected boolean _wasRestored = false; FIXME
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
|
@ -715,7 +714,8 @@ public class SystemFilterPool extends SystemPersistableReferencedObject
|
|||
{
|
||||
for (int idx=0; idx<filters.length; idx++)
|
||||
{
|
||||
ISystemFilter newFilter = copySystemFilter(targetPool, filters[idx], filters[idx].getName());
|
||||
// ISystemFilter newFilter = copySystemFilter(targetPool, filters[idx], filters[idx].getName()); DWD - useless assignment.
|
||||
copySystemFilter(targetPool, filters[idx], filters[idx].getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -927,11 +927,11 @@ public class SystemFilterPool extends SystemPersistableReferencedObject
|
|||
* Return the save file that will be written for the given filter pool.
|
||||
* Will depend on this manager's save policy.
|
||||
*/
|
||||
public IFile getSaveFile()
|
||||
{
|
||||
String fileName = getRootSaveFileName(this);
|
||||
return null;//FIXME SystemMOFHelpers.getSaveFile(getFolder(),fileName);
|
||||
}
|
||||
// public IFile getSaveFile() DWD - useless, not called since persistence model has changed.
|
||||
// {
|
||||
// String fileName = getRootSaveFileName(this);
|
||||
// return null;//FIXME SystemMOFHelpers.getSaveFile(getFolder(),fileName);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
@ -1020,14 +1020,14 @@ public class SystemFilterPool extends SystemPersistableReferencedObject
|
|||
/**
|
||||
* Do restore when all filters in this pool are stored in a single file.
|
||||
*/
|
||||
protected static ISystemFilterPool restoreFromOneFile(IFolder folder, String name,
|
||||
ISystemFilterNamingPolicy namingPolicy,
|
||||
boolean restoreFilters)
|
||||
throws Exception
|
||||
{
|
||||
|
||||
String fileName = getRootSaveFileName(namingPolicy, name);
|
||||
ISystemFilterPool pool = null;
|
||||
// protected static ISystemFilterPool restoreFromOneFile(IFolder folder, String name,
|
||||
// ISystemFilterNamingPolicy namingPolicy,
|
||||
// boolean restoreFilters) DWD - useless, not called since persistence model has changed
|
||||
// throws Exception
|
||||
// {
|
||||
//
|
||||
// String fileName = getRootSaveFileName(namingPolicy, name);
|
||||
// ISystemFilterPool pool = null;
|
||||
/*FIXME
|
||||
if (!restoreFilters && !SystemResourceHelpers.getResourceHelpers().getFile(folder, fileName+".xmi").exists())
|
||||
{
|
||||
|
@ -1055,8 +1055,8 @@ public class SystemFilterPool extends SystemPersistableReferencedObject
|
|||
else
|
||||
RSEUIPlugin.logInfo("Hmmm, pool is still null after restore: " + fileName+".xmi");
|
||||
*/
|
||||
return pool;
|
||||
}
|
||||
// return pool;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Internal use method
|
||||
|
@ -1367,31 +1367,31 @@ public class SystemFilterPool extends SystemPersistableReferencedObject
|
|||
}
|
||||
}
|
||||
|
||||
public boolean isDirty()
|
||||
{
|
||||
return _isDirty;
|
||||
}
|
||||
// public boolean isDirty() DWD - useless and dangerous code, overrides default with same
|
||||
// {
|
||||
// return _isDirty;
|
||||
// }
|
||||
|
||||
public void setDirty(boolean flag)
|
||||
{
|
||||
if (_isDirty != flag)
|
||||
{
|
||||
_isDirty= flag;
|
||||
}
|
||||
}
|
||||
// public void setDirty(boolean flag) DWD - useless and dangerous code, overrides default with same
|
||||
// {
|
||||
// if (_isDirty != flag)
|
||||
// {
|
||||
// _isDirty= flag;
|
||||
// }
|
||||
// }
|
||||
|
||||
public boolean commit()
|
||||
{
|
||||
return RSEUIPlugin.getThePersistenceManager().commit(this);
|
||||
}
|
||||
|
||||
public boolean wasRestored()
|
||||
{
|
||||
return _wasRestored;
|
||||
}
|
||||
// public boolean wasRestored() DWD - useless and dangerous code, overrides default with same
|
||||
// {
|
||||
// return _wasRestored;
|
||||
// }
|
||||
|
||||
public void setWasRestored(boolean flag)
|
||||
{
|
||||
_wasRestored = flag;
|
||||
}
|
||||
// public void setWasRestored(boolean flag) DWD - useless and dangerous code, overrides default with same
|
||||
// {
|
||||
// _wasRestored = flag;
|
||||
// }
|
||||
}
|
|
@ -663,7 +663,8 @@ public class SystemFilterPoolManager implements ISystemFilterPoolManager
|
|||
}
|
||||
}
|
||||
}
|
||||
String poolName = pool.getName();
|
||||
// String poolName = pool.getName(); DWD - useless code
|
||||
// DWD removing a pool should mark its parent profile as dirty and cause a save to be "scheduled"
|
||||
|
||||
// remove from model
|
||||
java.util.List pools = getPools();
|
||||
|
@ -734,7 +735,13 @@ public class SystemFilterPoolManager implements ISystemFilterPoolManager
|
|||
public boolean preTestRenameFilterPool(ISystemFilterPool pool) throws Exception
|
||||
{
|
||||
boolean ok = true;
|
||||
String oldName = pool.getName();
|
||||
// String oldName = pool.getName(); DWD temporarily removed.
|
||||
/*
|
||||
* DWD this looks like it needs to be modified so that it queries the persistence
|
||||
* manager to see if the pool can be renamed. The provider is in charge of determining
|
||||
* pool names in the persistent form. The Manager will have to construct a DOM
|
||||
* object for this pool and query the appropriate provider.
|
||||
*/
|
||||
/* FIXME
|
||||
if ( (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL) ||
|
||||
(savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILE_PER_FILTER) )
|
||||
|
@ -803,9 +810,14 @@ public class SystemFilterPoolManager implements ISystemFilterPoolManager
|
|||
public void renameSystemFilterPool(ISystemFilterPool pool, String newName)
|
||||
throws Exception
|
||||
{
|
||||
/*
|
||||
* DWD Renaming a filter pool should mark its parent profile as dirty and
|
||||
* the pool itself as dirty. A rewrite of the profile should be scheduled.
|
||||
*/
|
||||
|
||||
String oldName = pool.getName();
|
||||
int oldLen = oldName.length();
|
||||
int newLen = newName.length();
|
||||
// int oldLen = oldName.length(); DWD temporarily(?) removed
|
||||
// int newLen = newName.length(); DWD temporarily(?) removed
|
||||
// rename on disk
|
||||
/* FIXME
|
||||
if ( (savePolicy == SystemFilterConstants.SAVE_POLICY_ONE_FILEANDFOLDER_PER_POOL) ||
|
||||
|
@ -1353,7 +1365,10 @@ public class SystemFilterPoolManager implements ISystemFilterPoolManager
|
|||
public void moveSystemFilters(ISystemFilter filters[], int delta)
|
||||
throws Exception
|
||||
{
|
||||
ISystemFilterContainer container = filters[0].getParentFilterContainer();
|
||||
/*
|
||||
* DWD revisit this. Make sure that the pool is scheduled to be saved.
|
||||
*/
|
||||
// ISystemFilterContainer container = filters[0].getParentFilterContainer(); DWD temporarily(?) removed.
|
||||
int[] oldPositions = new int[filters.length];
|
||||
for (int idx=0; idx<filters.length; idx++)
|
||||
oldPositions[idx] = getSystemFilterPosition(filters[idx]);
|
||||
|
@ -1550,10 +1565,13 @@ public class SystemFilterPoolManager implements ISystemFilterPoolManager
|
|||
public ISystemFilterString copySystemFilterString(ISystemFilter targetFilter, ISystemFilterString oldFilterString)
|
||||
throws Exception
|
||||
{
|
||||
/*
|
||||
* DWD revisit this. make sure that pool is persisted.
|
||||
*/
|
||||
ISystemFilterPool targetPool = targetFilter.getParentFilterPool();
|
||||
ISystemFilterPoolManager targetMgr = targetPool.getSystemFilterPoolManager();
|
||||
ISystemFilter oldFilter = oldFilterString.getParentSystemFilter();
|
||||
ISystemFilterPool oldPool = oldFilter.getParentFilterPool();
|
||||
// ISystemFilterPool oldPool = oldFilter.getParentFilterPool(); DWD temporarily(?) removed.
|
||||
|
||||
targetMgr.suspendCallbacks(true);
|
||||
|
||||
|
|
|
@ -31,6 +31,10 @@ import org.eclipse.rse.references.ISystemBaseReferencedObject;
|
|||
/**
|
||||
* A reference to a system filter string.
|
||||
*/
|
||||
/*
|
||||
* DWD What is a filter string REFERENCE? Where would this be used?
|
||||
*/
|
||||
|
||||
public class SystemFilterStringReference
|
||||
implements ISystemFilterStringReference, IAdaptable
|
||||
{
|
||||
|
@ -73,7 +77,6 @@ public class SystemFilterStringReference
|
|||
*/
|
||||
public ISystemFilterPoolReferenceManager getFilterPoolReferenceManager()
|
||||
{
|
||||
ISystemFilterReference filter = getParent();
|
||||
if (parent != null)
|
||||
return parent.getFilterPoolReferenceManager();
|
||||
return null;
|
||||
|
|
|
@ -267,7 +267,7 @@ public class Host extends RSEModelObject implements IHost, IAdaptable
|
|||
*/
|
||||
public void setAliasName(String newName)
|
||||
{
|
||||
String oldName = getAliasName(); // what it used to be.
|
||||
// String oldName = getAliasName(); DWD temporarily(?) removed
|
||||
String userIdValue = null;
|
||||
if (previousUserIdKey != null)
|
||||
userIdValue = getLocalDefaultUserId(previousUserIdKey);
|
||||
|
|
|
@ -41,7 +41,7 @@ public abstract class SystemPersistableReferencingObject extends SystemReferenci
|
|||
*/
|
||||
protected static final String REFERENCED_OBJECT_NAME_EDEFAULT = null;
|
||||
|
||||
private SystemReferencingObjectHelper helper = null;
|
||||
// private SystemReferencingObjectHelper helper = null; DWD dangerous, overriding and covering superclass
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
|
|
|
@ -142,9 +142,6 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
protected boolean _connectionError = false;
|
||||
protected boolean _disconnecting = false;
|
||||
|
||||
protected boolean _isDirty = true;
|
||||
protected boolean _wasRestored = false;
|
||||
|
||||
protected IHost _host;
|
||||
|
||||
|
||||
|
@ -685,6 +682,7 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
* since it names a team sharable resource. Not qualified by the profile
|
||||
* name since that is implicit by being in a profile.
|
||||
*/
|
||||
// DWD - does not appear to be used.
|
||||
String name = "CN-" + connectionName;
|
||||
return name;
|
||||
}
|
||||
|
@ -3312,35 +3310,9 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
else return false;
|
||||
}
|
||||
|
||||
public boolean isDirty()
|
||||
{
|
||||
return _isDirty;
|
||||
}
|
||||
|
||||
public void setDirty(boolean flag)
|
||||
{
|
||||
if (_isDirty != flag)
|
||||
{
|
||||
_isDirty = flag;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean commit()
|
||||
{
|
||||
return RSEUIPlugin.getThePersistenceManager().commit(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean wasRestored()
|
||||
{
|
||||
return _wasRestored;
|
||||
}
|
||||
|
||||
public void setWasRestored(boolean flag)
|
||||
{
|
||||
_wasRestored = flag;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -852,7 +852,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration
|
|||
*/
|
||||
public ISystemValidator getUserIdValidator()
|
||||
{
|
||||
RSEUIPlugin sp = RSEUIPlugin.getDefault();
|
||||
// RSEUIPlugin sp = RSEUIPlugin.getDefault(); DWD - to be removed. Appears to be useless.
|
||||
ISystemValidator userIdValidator =
|
||||
new ValidatorSpecialChar(
|
||||
"=;",
|
||||
|
@ -1106,8 +1106,8 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration
|
|||
java.util.List mofList = getSubSystemList();
|
||||
Iterator i = mofList.iterator();
|
||||
Vector v = new Vector();
|
||||
String connProfileName = conn.getSystemProfile().getName();
|
||||
String connAliasName = conn.getAliasName();
|
||||
// String connProfileName = conn.getSystemProfile().getName(); DWD - to be removed, appears to be useless.
|
||||
// String connAliasName = conn.getAliasName(); DWD - to be removed.
|
||||
while (i.hasNext())
|
||||
{
|
||||
ISubSystem subsys = (ISubSystem) i.next();
|
||||
|
@ -1125,7 +1125,7 @@ public abstract class SubSystemConfiguration implements ISubSystemConfiguration
|
|||
*/
|
||||
public ISubSystem[] getSubSystems(ISystemProfile profile)
|
||||
{
|
||||
String profileName = profile.getName();
|
||||
// String profileName = profile.getName(); DWD - to be removed.
|
||||
ISubSystem[] allSubSystems = getSubSystems(true);
|
||||
Vector v = new Vector();
|
||||
for (int idx = 0; idx < allSubSystems.length; idx++)
|
||||
|
|
Loading…
Add table
Reference in a new issue