1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-12 10:45:37 +02:00

[cleanup] javadoc and code style, remove dead code, mark methods deprecated

This commit is contained in:
David Dykstal 2007-12-19 19:56:44 +00:00
parent 89923f9852
commit 54b801b1c9
4 changed files with 183 additions and 352 deletions

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2003, 2007 IBM Corporation and others. * Copyright (c) 2003, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -12,7 +12,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
* *
* Contributors: * Contributors:
* {Name} (company) - description of contribution. * David Dykstal (IBM) - cleanup format and javadoc
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.core.filters; package org.eclipse.rse.core.filters;
@ -24,40 +24,15 @@ import org.eclipse.rse.core.model.IRSEModelObject;
import org.eclipse.rse.core.references.IRSEReferencedObject; import org.eclipse.rse.core.references.IRSEReferencedObject;
/** /**
* A representation of the model object '<em><b>System Filter</b></em>'.
* A filter consists of filter strings and may be contained in a filter pool. * A filter consists of filter strings and may be contained in a filter pool.
* Filter pools will be referenced by subsystems. * Filter pools are referenced by subsystems.
* Subsystems are responsible for interpreting the filters. Filters, in and * Subsystems are responsible for interpreting the filters. Filters, in and
* of themselves, provide no interpretation of themselves when applied * of themselves, provide no interpretation of themselves when applied
* to the resources managed by a subsystem. * to the resources managed by a subsystem.
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#getName <em>Name</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#getType <em>Type</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#isSupportsNestedFilters <em>Supports Nested Filters</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#getRelativeOrder <em>Relative Order</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#isDefault <em>Default</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#isStringsCaseSensitive <em>Strings Case Sensitive</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#isPromptable <em>Promptable</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#isSupportsDuplicateFilterStrings <em>Supports Duplicate Filter Strings</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#isNonDeletable <em>Non Deletable</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#isNonRenamable <em>Non Renamable</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#isNonChangable <em>Non Changable</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#isStringsNonChangable <em>Strings Non Changable</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#getRelease <em>Release</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#isSingleFilterStringOnly <em>Single Filter String Only</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#getNestedFilters <em>Nested Filters</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#getParentFilter <em>Parent Filter</em>}</li>
* <li>{@link org.eclipse.rse.filters.ISystemFilter#getStrings <em>Strings</em>}</li>
* </ul>
* </p>
*
*/
/**
* @lastgen interface SystemFilterPool extends SystemReferencedObject, SystemFilterContainer {}
*/ */
public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContainer, IRSEModelObject { public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContainer, IRSEModelObject {
/** /**
* Returns the value of the '<em><b>Name</b></em>' attribute. * Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
@ -138,8 +113,11 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
* Returns the value of the '<em><b>Relative Order</b></em>' attribute. * Returns the value of the '<em><b>Relative Order</b></em>' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <p> * <p>
* If the meaning of the '<em>Relative Order</em>' attribute isn't clear, * The relative order of a filter is intended to be used
* there really should be more of a description here... * by a persistence mechanism to keep the filters in a particular order
* when restoring them into a filter pool. Filters with higher numbers should
* occur later in the pool. It may be employed in the absence of another
* mechanism for maintaining order.
* </p> * </p>
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return the value of the '<em>Relative Order</em>' attribute. * @return the value of the '<em>Relative Order</em>' attribute.
@ -150,6 +128,11 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
/** /**
* Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#getRelativeOrder <em>Relative Order</em>}' attribute. * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#getRelativeOrder <em>Relative Order</em>}' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* The relative order of a filter is intended to be used
* by a persistence mechanism to keep the filters in a particular order
* when restoring them into a filter pool. Filters with higher numbers should
* occur later in the pool. It may be employed in the absence of another
* mechanism for maintaining order.
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @param value the new value of the '<em>Relative Order</em>' attribute. * @param value the new value of the '<em>Relative Order</em>' attribute.
* @see #getRelativeOrder() * @see #getRelativeOrder()
@ -160,8 +143,11 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
* Returns the value of the '<em><b>Default</b></em>' attribute. * Returns the value of the '<em><b>Default</b></em>' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <p> * <p>
* If the meaning of the '<em>Default</em>' attribute isn't clear, * This filter is a "default" filter in this filter pool.
* there really should be more of a description here... * The meaning of "default" is determined by the subsystem in which it is deployed.
* It typically means that the filter is supplied by the subsystem at the time the subsystem is created.
* That is, the filter is "vendor supplied".
* There is no restriction on the number of default filters in a pool.
* </p> * </p>
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return the value of the '<em>Default</em>' attribute. * @return the value of the '<em>Default</em>' attribute.
@ -172,6 +158,11 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
/** /**
* Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isDefault <em>Default</em>}' attribute. * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isDefault <em>Default</em>}' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* Make this filter is a "default" filter in this filter pool.
* The meaning of "default" is determined by the subsystem in which it is deployed.
* It typically means that the filter is supplied by the subsystem at the time the subsystem is created.
* That is, the filter is "vendor supplied".
* There is no restriction on the number of default filters in a pool.
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @param value the new value of the '<em>Default</em>' attribute. * @param value the new value of the '<em>Default</em>' attribute.
* @see #isDefault() * @see #isDefault()
@ -187,6 +178,10 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
* case sensitive. * case sensitive.
* This attribute is optional and may be known (set) or unknown (unset). * This attribute is optional and may be known (set) or unknown (unset).
* </p> * </p>
* <p>
* If unset the value
* returned is from the parent filter pool.
* </p>
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return the value of the '<em>Strings Case Sensitive</em>' attribute. * @return the value of the '<em>Strings Case Sensitive</em>' attribute.
* @see #isSetStringsCaseSensitive() * @see #isSetStringsCaseSensitive()
@ -204,6 +199,9 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
* case sensitive. * case sensitive.
* This attribute is optional and may be known (set) or unknown (unset). * This attribute is optional and may be known (set) or unknown (unset).
* </p> * </p>
* <p>
* This will cause this attribute to be set in this filter.
* </p>
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @param value the new value of the '<em>Strings Case Sensitive</em>' attribute. * @param value the new value of the '<em>Strings Case Sensitive</em>' attribute.
* @see #isSetStringsCaseSensitive() * @see #isSetStringsCaseSensitive()
@ -220,6 +218,8 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
* to indicate whether or not comparisons involving the filter should be considered * to indicate whether or not comparisons involving the filter should be considered
* case sensitive. * case sensitive.
* This attribute is optional and may be known (set) or unknown (unset). * This attribute is optional and may be known (set) or unknown (unset).
* </p><p>
* Causes this filter to use the value specified by the parent filter pool.
* </p> * </p>
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @see #isSetStringsCaseSensitive() * @see #isSetStringsCaseSensitive()
@ -236,6 +236,9 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
* to indicate whether or not comparisons involving the filter should be considered * to indicate whether or not comparisons involving the filter should be considered
* case sensitive. * case sensitive.
* This attribute is optional and may be known (set) or unknown (unset). * This attribute is optional and may be known (set) or unknown (unset).
* </p><p>
* This will be true if this attribute is explicitly specified for this filter. It will be false if this
* is being inherited from the parent filter pool.
* </p> * </p>
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return whether the value of the '<em>Strings Case Sensitive</em>' attribute is set. * @return whether the value of the '<em>Strings Case Sensitive</em>' attribute is set.
@ -452,8 +455,8 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
* filter contains only one string. May, alternatively, be enforced * filter contains only one string. May, alternatively, be enforced
* by the filter implementation. * by the filter implementation.
* </p><p> * </p><p>
* This attribute may be set or unset. If unset then this value must not be * This attribute may be set or unset. If unset this value will be inherited
* relied upon. * from the parent filter pool.
* </p> * </p>
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return the value of the '<em>Single Filter String Only</em>' attribute. * @return the value of the '<em>Single Filter String Only</em>' attribute.
@ -472,8 +475,8 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
* filter contains only one string. May, alternatively, be enforced * filter contains only one string. May, alternatively, be enforced
* by the filter implementation. * by the filter implementation.
* </p><p> * </p><p>
* This attribute may be set or unset. If unset then this value must not be * This causes the attribute to be set for this filter, ignoring the value
* relied upon. * specified for the parent filter pool.
* </p> * </p>
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @param value the new value of the '<em>Single Filter String Only</em>' attribute. * @param value the new value of the '<em>Single Filter String Only</em>' attribute.
@ -486,6 +489,7 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
/** /**
* Unsets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute. * Unsets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* This causes the value of this attribute to be inherited from the parent filter pool.
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @see #isSetSingleFilterStringOnly() * @see #isSetSingleFilterStringOnly()
* @see #isSingleFilterStringOnly() * @see #isSingleFilterStringOnly()
@ -496,6 +500,7 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
/** /**
* Returns whether the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute is set. * Returns whether the value of the '{@link org.eclipse.rse.core.filters.ISystemFilter#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute is set.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* If true then the value of this attribute is set in this filter. If false it is inherited from the parent filter pool.
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return whether the value of the '<em>Single Filter String Only</em>' attribute is set. * @return whether the value of the '<em>Single Filter String Only</em>' attribute is set.
* @see #unsetSingleFilterStringOnly() * @see #unsetSingleFilterStringOnly()
@ -550,7 +555,7 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return the value of the '<em>Strings</em>' containment reference list. * @return the value of the '<em>Strings</em>' containment reference list.
*/ */
java.util.List getStrings(); List getStrings();
/** /**
* @return the parent pool of this filter. For nested filters, this will walk up the parent chain * @return the parent pool of this filter. For nested filters, this will walk up the parent chain

View file

@ -194,19 +194,20 @@ public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISys
void setDefault(boolean value); void setDefault(boolean value);
/** /**
* @generated This field/method will be replaced during code generation * Sets the attribute for this filter pool that determines whether strings of
* filters contained in this pool are case sensitive or not. If not set
* this attribute is inherited from the containing filter pool manager.
* @param value The new value of the StringsCaseSensitive attribute * @param value The new value of the StringsCaseSensitive attribute
*/ */
void setStringsCaseSensitive(boolean value); void setStringsCaseSensitive(boolean value);
/** /**
* @generated This field/method will be replaced during code generation * Unsets the StringsCaseSensitive attribute. Causes the case sensitivity of the
* Unsets the StringsCaseSensitive attribute * filter pool to be determined by its filter pool manager.
*/ */
void unsetStringsCaseSensitive(); void unsetStringsCaseSensitive();
/** /**
* @generated This field/method will be replaced during code generation
* @return <b>true</b> if the StringsCaseSensitive attribute has been set * @return <b>true</b> if the StringsCaseSensitive attribute has been set
*/ */
boolean isSetStringsCaseSensitive(); boolean isSetStringsCaseSensitive();
@ -247,8 +248,8 @@ public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISys
* Returns the value of the '<em><b>Single Filter String Only</b></em>' attribute. * Returns the value of the '<em><b>Single Filter String Only</b></em>' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* <p> * <p>
* If the meaning of the '<em>Single Filter String Only</em>' attribute isn't clear, * If true then filters in this filter pool can have only a single filter string unless the
* there really should be more of a description here... * filter has overriden this attribute.
* </p> * </p>
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return the value of the '<em>Single Filter String Only</em>' attribute. * @return the value of the '<em>Single Filter String Only</em>' attribute.
@ -261,6 +262,8 @@ public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISys
/** /**
* Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute. * Sets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* If set to true filters in this filter pool can hold only a single filter string unless overridden by the filter itself.
* If false then the filter may hold more than one filter string.
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @param value the new value of the '<em>Single Filter String Only</em>' attribute. * @param value the new value of the '<em>Single Filter String Only</em>' attribute.
* @see #isSetSingleFilterStringOnly() * @see #isSetSingleFilterStringOnly()
@ -273,6 +276,7 @@ public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISys
/** /**
* Unsets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute. * Unsets the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* Causes the value of the single filter string attribute to be inherited from the containing filter pool manager.
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @see #isSetSingleFilterStringOnly() * @see #isSetSingleFilterStringOnly()
* @see #isSingleFilterStringOnly() * @see #isSingleFilterStringOnly()
@ -284,6 +288,8 @@ public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISys
/** /**
* Returns whether the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute is set. * Returns whether the value of the '{@link org.eclipse.rse.core.filters.ISystemFilterPool#isSingleFilterStringOnly <em>Single Filter String Only</em>}' attribute is set.
* <!-- begin-user-doc --> * <!-- begin-user-doc -->
* This will be true if this attribute has been set for this filter pool. It will be false if this
* attribute is inherited from the filter pool manager.
* <!-- end-user-doc --> * <!-- end-user-doc -->
* @return whether the value of the '<em>Single Filter String Only</em>' attribute is set. * @return whether the value of the '<em>Single Filter String Only</em>' attribute is set.
* @see #unsetSingleFilterStringOnly() * @see #unsetSingleFilterStringOnly()

View file

@ -31,13 +31,11 @@ import org.eclipse.rse.core.model.ISystemContentsType;
import org.eclipse.rse.internal.core.filters.SystemFilter; import org.eclipse.rse.internal.core.filters.SystemFilter;
/** /**
* A lightweight override of the full-fledged persistable implementation of SystemFilter. * A lightweight implementation of ISystemFilter.
* This class replaces the heavy-weight MOF implementations with simple non-MOF
* implementations.
* <p> * <p>
* This flavour of SystemFilter implementation is for those cases where a simple in-memory * This flavor is for those cases where a simple in-memory
* SystemFilter is needed temporarily, perhaps to populate a GUI widget say, and the filter * ISystemFilter is needed temporarily, perhaps to populate a GUI widget say, and the filter
* does not need to be savable/restorable. As a result there is no mof, and no need for a * does not need to be savable/restorable. As a result there is no need for a
* parent SystemFilterPool or SystemFilterPoolManager. The class is small, simple and * parent SystemFilterPool or SystemFilterPoolManager. The class is small, simple and
* directly instantiable. * directly instantiable.
* <p> * <p>
@ -56,43 +54,27 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
private String type = null; private String type = null;
private boolean caseSensitive = false; private boolean caseSensitive = false;
private boolean promptable = false; private boolean promptable = false;
private Object parent; private boolean isStale = true;
private boolean isStale; private Object parent = null;
private List filterStrings = new ArrayList(3); private List filterStrings = new ArrayList(3);
private HashMap cachedContents; private HashMap cachedContents = new HashMap();
/** /**
* Constructor for SystemFilterSimpleImpl * Constructor for SystemFilterSimple
*/ */
public SystemFilterSimple(String name) { public SystemFilterSimple(String name) {
//super();
this.name = name; this.name = name;
// filterStringVector = new Vector();
isStale = true;
cachedContents = new HashMap();
} }
// protected void invalidateCache() /* (non-Javadoc)
// { * @see org.eclipse.rse.internal.core.filters.SystemFilter#isTransient()
// filterStringArray = null;
// filterStringObjectArray = null;
// //filterStringVector = null;
// }
/**
* Return true if this a transient or simple filter that is only created temporary "on the fly"
* and not intended to be saved or part of the filter framework. Eg it has no manager or provider.
* <p>
* We always return true
*/ */
public boolean isTransient() { public boolean isTransient() {
return true; return true;
} }
/** /* (non-Javadoc)
* Clones a given filter to the given target filter. * @see org.eclipse.rse.internal.core.filters.SystemFilter#clone(org.eclipse.rse.core.filters.ISystemFilter)
* All filter strings, and all nested filters, are copied.
* @param targetFilter new filter into which we copy all our data
*/ */
public void clone(ISystemFilter targetFilter) { public void clone(ISystemFilter targetFilter) {
super.clone(targetFilter); super.clone(targetFilter);
@ -104,15 +86,13 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
// contains a single filter string so these methods // contains a single filter string so these methods
// make it easier to set/get that filter string // make it easier to set/get that filter string
// ------------------------------------------------------- // -------------------------------------------------------
/** /**
* Set the single filter string * Set the single filter string
*/ */
public void setFilterString(String filterString) { public void setFilterString(String filterString) {
filterStrings.clear(); filterStrings.clear();
filterStrings.add(filterString); filterStrings.add(filterString);
// filterStringVector.clear();
// filterStringVector.addElement(filterString);
// invalidateCache();
} }
/** /**
@ -122,10 +102,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
public String getFilterString() { public String getFilterString() {
String result = filterStrings.isEmpty() ? null : (String) filterStrings.get(0); String result = filterStrings.isEmpty() ? null : (String) filterStrings.get(0);
return result; return result;
// if (filterStringVector.size() == 0)
// return null;
// else
// return (String)filterStringVector.elementAt(0);
} }
/** /**
@ -219,13 +195,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
String[] result = new String[filterStrings.size()]; String[] result = new String[filterStrings.size()];
filterStrings.toArray(result); filterStrings.toArray(result);
return result; return result;
// if (filterStringArray == null)
// {
// filterStringArray = new String[filterStringVector.size()];
// for (int idx=0; idx<filterStringArray.length; idx++)
// filterStringArray[idx] = (String)filterStringVector.elementAt(idx);
// }
// return filterStringArray;
} }
/** /**
@ -235,7 +204,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
Vector result = new Vector(filterStrings.size()); Vector result = new Vector(filterStrings.size());
result.addAll(filterStrings); result.addAll(filterStrings);
return result; return result;
// return filterStringVector;
} }
/** /**
@ -243,7 +211,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
*/ */
public int getFilterStringCount() { public int getFilterStringCount() {
return filterStrings.size(); return filterStrings.size();
// return filterStringVector.size();
} }
/** /**
@ -253,12 +220,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
public void setFilterStrings(Vector newStrings) { public void setFilterStrings(Vector newStrings) {
filterStrings.clear(); filterStrings.clear();
filterStrings.addAll(newStrings); filterStrings.addAll(newStrings);
// filterStringVector.clear();
// for (int idx=0; idx<newStrings.size(); idx++)
// {
// filterStringVector.addElement(newStrings.elementAt(idx));
// }
// invalidateCache();
} }
/** /**
@ -268,12 +229,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
public void setFilterStrings(String newStrings[]) { public void setFilterStrings(String newStrings[]) {
filterStrings.clear(); filterStrings.clear();
filterStrings.addAll(Arrays.asList(newStrings)); // cannot just set since asList returns a fixed-size array filterStrings.addAll(Arrays.asList(newStrings)); // cannot just set since asList returns a fixed-size array
// filterStringVector.clear();
// for (int idx=0; idx<newStrings.length; idx++)
// {
// filterStringVector.addElement(newStrings[idx]);
// }
// invalidateCache();
} }
/** /**
@ -282,8 +237,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
*/ */
public ISystemFilterString addFilterString(String newString) { public ISystemFilterString addFilterString(String newString) {
filterStrings.add(newString); filterStrings.add(newString);
// filterStringVector.addElement(newString);
// invalidateCache();
return null; return null;
} }
@ -293,8 +246,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
*/ */
public ISystemFilterString addFilterString(String newString, int position) { public ISystemFilterString addFilterString(String newString, int position) {
filterStrings.add(position, newString); filterStrings.add(position, newString);
// filterStringVector.insertElementAt(newString,position);
// invalidateCache();
return null; return null;
} }
@ -304,8 +255,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
*/ */
public ISystemFilterString removeFilterString(String oldString) { public ISystemFilterString removeFilterString(String oldString) {
filterStrings.remove(oldString); filterStrings.remove(oldString);
// filterStringVector.removeElement(oldString);
// invalidateCache();
return null; return null;
} }
@ -315,8 +264,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
*/ */
public ISystemFilterString removeFilterString(int position) { public ISystemFilterString removeFilterString(int position) {
filterStrings.remove(position); filterStrings.remove(position);
// filterStringVector.removeElementAt(position);
// invalidateCache();
return null; return null;
} }
@ -333,7 +280,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
*/ */
public boolean hasChildren() { public boolean hasChildren() {
return filterStrings.size() > 0; return filterStrings.size() > 0;
// return (filterStringVector.size() > 0);
} }
// --------------------- // ---------------------
@ -528,14 +474,14 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
isStale = false; isStale = false;
} }
/** /*
* @see org.eclipse.rse.core.model.ISystemContainer#getContents(org.eclipse.rse.core.model.ISystemContentsType) * @see org.eclipse.rse.core.model.ISystemContainer#getContents(org.eclipse.rse.core.model.ISystemContentsType)
*/ */
public Object[] getContents(ISystemContentsType contentsType) { public Object[] getContents(ISystemContentsType contentsType) {
return (Object[]) cachedContents.get(contentsType); return (Object[]) cachedContents.get(contentsType);
} }
/** /*
* @see org.eclipse.rse.core.model.ISystemContainer#hasContents(org.eclipse.rse.core.model.ISystemContentsType) * @see org.eclipse.rse.core.model.ISystemContainer#hasContents(org.eclipse.rse.core.model.ISystemContentsType)
*/ */
public boolean hasContents(ISystemContentsType contentsType) { public boolean hasContents(ISystemContentsType contentsType) {
@ -545,21 +491,21 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
return false; return false;
} }
/** /*
* @see org.eclipse.rse.core.model.ISystemContainer#isStale() * @see org.eclipse.rse.core.model.ISystemContainer#isStale()
*/ */
public boolean isStale() { public boolean isStale() {
return isStale; return isStale;
} }
/** /*
* @see org.eclipse.rse.core.model.ISystemContainer#markStale(boolean) * @see org.eclipse.rse.core.model.ISystemContainer#markStale(boolean)
*/ */
public void markStale(boolean isStale) { public void markStale(boolean isStale) {
markStale(isStale, true); markStale(isStale, true);
} }
/** /*
* @see org.eclipse.rse.core.model.ISystemContainer#markStale(boolean) * @see org.eclipse.rse.core.model.ISystemContainer#markStale(boolean)
*/ */
public void markStale(boolean isStale, boolean clearCache) { public void markStale(boolean isStale, boolean clearCache) {

View file

@ -47,9 +47,6 @@ import org.eclipse.rse.internal.references.SystemReferencedObject;
* A filter is an encapsulation of a unique name, and a list of filter strings. * A filter is an encapsulation of a unique name, and a list of filter strings.
* Filters can be referenced. * Filters can be referenced.
*/ */
/**
* @lastgen class SystemFilterImpl extends SystemReferencedObjectImpl implements SystemFilter, SystemReferencedObject, SystemFilterContainer, IAdaptable {}
*/
public class SystemFilter extends SystemReferencedObject implements ISystemFilter, IAdaptable { public class SystemFilter extends SystemReferencedObject implements ISystemFilter, IAdaptable {
private SystemFilterContainerCommonMethods helpers = null; private SystemFilterContainerCommonMethods helpers = null;
@ -70,7 +67,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
private int release = 0; private int release = 0;
private boolean singleFilterStringOnly = false; private boolean singleFilterStringOnly = false;
private List nestedFilters = new ArrayList(3); private List nestedFilters = new ArrayList(3);
// private List strings = null;
private ISystemFilter _parentFilter; private ISystemFilter _parentFilter;
/** /**
@ -106,20 +102,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
return type; return type;
} }
/*
* Creates a new nested system filter within this filter
* @param parentPool the SystemFilterPool that owns the root filter.
* @param data Optional transient data to be stored in the new filter. Can be null.
* @param aliasName The name to give the new filter. Must be unique for this pool.
* @param filterStrings The list of String objects that represent the filter strings.
*
public SystemFilter createSystemFilter(SystemFilterPool parentPool, Object data, String aliasName, Vector filterStrings)
{
SystemFilter newFilter = helpers.createSystemFilter(internalGetFilters(), parentPool, data, aliasName, filterStrings);
newFilter.setSupportsNestedFilters(true); // presumably it does since it is nested itself.
return newFilter;
}*/
/** /**
* Creates a new nested system filter within this filter. * Creates a new nested system filter within this filter.
* This filter will inherit/store the following attributes from this filter: * This filter will inherit/store the following attributes from this filter:
@ -157,7 +139,7 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
*/ */
public void clone(ISystemFilter targetFilter) { public void clone(ISystemFilter targetFilter) {
// clone attributes // clone attributes
//targetFilter.setName(getName()); // targetFilter.setName(getName()); name is not cloned, we assume the target filter already has a name
targetFilter.setDefault(isDefault()); targetFilter.setDefault(isDefault());
targetFilter.setType(getType()); targetFilter.setType(getType());
targetFilter.setPromptable(isPromptable()); targetFilter.setPromptable(isPromptable());
@ -373,9 +355,11 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
public void setParentFilterPool(ISystemFilterPool parentPool) { public void setParentFilterPool(ISystemFilterPool parentPool) {
this.parentPool = parentPool; this.parentPool = parentPool;
ISystemFilter[] filters = getSystemFilters(); ISystemFilter[] filters = getSystemFilters();
if (filters != null) for (int idx = 0; idx < filters.length; idx++) if (filters != null) {
filters[idx].setParentFilterPool(parentPool); for (int idx = 0; idx < filters.length; idx++) {
// todo: decide if SystemFilterString objects need it too filters[idx].setParentFilterPool(parentPool);
}
}
} }
/** /**
@ -387,24 +371,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
return (parentFilter != null) ? (ISystemFilterContainer) parentFilter : (ISystemFilterContainer) getParentFilterPool(); return (parentFilter != null) ? (ISystemFilterContainer) parentFilter : (ISystemFilterContainer) getParentFilterPool();
} }
/**
* Internal way to return emf-modelled list of filter strings.
* We use this so we can easily change to non-mof if we decide to.
*/
// private List internalGetFilterStrings()
// {
// return getStrings();
// }
/**
* Clear internal cache so it will be rebuilt on next request.
*/
// protected void invalidateCache()
// {
// filterStringArray = null;
// filterStringObjectArray = null;
// filterStringVector = null;
// setDirty(true);
// }
/** /**
* Returns the filter strings of this filter as an array of String objects. * Returns the filter strings of this filter as an array of String objects.
* The array may be empty but will not be null. * The array may be empty but will not be null.
@ -419,20 +385,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
return result; return result;
} }
// public String[] getFilterStrings()
// {
// if (filterStringArray == null)
// {
// List el = internalGetFilterStrings();
// filterStringArray = new String[el.size()];
// Iterator i = el.iterator();
// int idx = 0;
// while (i.hasNext())
// filterStringArray[idx++] = ((ISystemFilterString)(i.next())).getString();
// }
// return filterStringArray;
// }
/** /**
* Return filter strings as a Vector of String objects. * Return filter strings as a Vector of String objects.
* This vector may be empty but will never be null. * This vector may be empty but will never be null.
@ -444,19 +396,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
return result; return result;
} }
// public Vector getFilterStringsVector()
// {
// if (filterStringVector == null)
// {
// List el = internalGetFilterStrings();
// Iterator i = el.iterator();
// filterStringVector = new Vector();
// while (i.hasNext())
// filterStringVector.addElement(((ISystemFilterString)(i.next())).getString());
// }
// return filterStringVector;
// }
/** /**
* Get this filter's filter strings as a Vector of FilterString objects * Get this filter's filter strings as a Vector of FilterString objects
*/ */
@ -464,13 +403,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
Vector result = new Vector(filterStrings.size()); Vector result = new Vector(filterStrings.size());
result.addAll(filterStrings); result.addAll(filterStrings);
return result; return result;
//
// List el = internalGetFilterStrings();
// Iterator i = el.iterator();
// Vector filterStringVector = new Vector();
// while (i.hasNext())
// filterStringVector.addElement(i.next());
// return filterStringVector;
} }
/** /**
@ -478,7 +410,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
*/ */
public int getFilterStringCount() { public int getFilterStringCount() {
return filterStrings.size(); return filterStrings.size();
// return internalGetFilterStrings().size();
} }
/** /**
@ -514,38 +445,15 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
filterStrings.add(filterString); filterStrings.add(filterString);
} }
setDirty(true); setDirty(true);
// List strings = internalGetFilterStrings();
// strings.clear();
// for (int idx=0; idx<newStrings.size(); idx++)
// {
// String currString = (String)newStrings.elementAt(idx);
// ISystemFilterString string = new SystemFilterString();
// // FIXME initMOF().createSystemFilterString();
// string.setString(currString);
// string.setParentSystemFilter(this);
// strings.add(string);
// }
// invalidateCache();
} }
/** /**
* Get this filter's filter string objects as an array * Get this filter's filter string objects as an array
*/ */
public ISystemFilterString[] getSystemFilterStrings() { public ISystemFilterString[] getSystemFilterStrings() {
// List strings = internalGetFilterStrings();
ISystemFilterString[] result = new ISystemFilterString[filterStrings.size()]; ISystemFilterString[] result = new ISystemFilterString[filterStrings.size()];
filterStrings.toArray(result); filterStrings.toArray(result);
return result; return result;
// if (filterStrings == null)
// {
// List el = internalGetFilterStrings();
// filterStrings = new ISystemFilterString[el.size()];
// Iterator i = el.iterator();
// int idx = 0;
// while (i.hasNext())
// filterStrings[idx++] = (ISystemFilterString)(i.next());
// }
// return filterStrings;
} }
/** /**
@ -553,21 +461,21 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
* @param newStrings array of String objects * @param newStrings array of String objects
*/ */
public void setFilterStrings(String newStrings[]) { public void setFilterStrings(String newStrings[]) {
// List strings = internalGetFilterStrings();
filterStrings.clear(); filterStrings.clear();
for (int idx = 0; idx < newStrings.length; idx++) { for (int idx = 0; idx < newStrings.length; idx++) {
ISystemFilterString filterString = createFilterString(newStrings[idx]); ISystemFilterString filterString = createFilterString(newStrings[idx]);
filterStrings.add(filterString); filterStrings.add(filterString);
// addFilterString(newStrings[idx]);
} }
setDirty(true); setDirty(true);
//invalidateCache(); already done
} }
/**
* Returns a system filter string created from a string.
* @param string
* @return
*/
private ISystemFilterString createFilterString(String string) { private ISystemFilterString createFilterString(String string) {
ISystemFilterString filterstring = new SystemFilterString(); ISystemFilterString filterstring = new SystemFilterString();
// FIXME initMOF().createSystemFilterString();
filterstring.setString(string); filterstring.setString(string);
filterstring.setParentSystemFilter(this); filterstring.setParentSystemFilter(this);
return filterstring; return filterstring;
@ -578,10 +486,8 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
*/ */
public ISystemFilterString addFilterString(String newString) { public ISystemFilterString addFilterString(String newString) {
ISystemFilterString newFilterString = createFilterString(newString); ISystemFilterString newFilterString = createFilterString(newString);
// List strings = internalGetFilterStrings();
filterStrings.add(newFilterString); filterStrings.add(newFilterString);
setDirty(true); setDirty(true);
// invalidateCache();
return newFilterString; return newFilterString;
} }
@ -589,11 +495,9 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
* Insert a new filter string to this filter's list, at the given zero-based position * Insert a new filter string to this filter's list, at the given zero-based position
*/ */
public ISystemFilterString addFilterString(String newString, int position) { public ISystemFilterString addFilterString(String newString, int position) {
// List strings = internalGetFilterStrings();
ISystemFilterString newFilterString = createFilterString(newString); ISystemFilterString newFilterString = createFilterString(newString);
filterStrings.add(position, newFilterString); filterStrings.add(position, newFilterString);
setDirty(true); setDirty(true);
// invalidateCache();
return newFilterString; return newFilterString;
} }
@ -609,7 +513,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
* @return the SystemFilterString object deleted, or null if not found * @return the SystemFilterString object deleted, or null if not found
*/ */
public ISystemFilterString removeFilterString(String oldString) { public ISystemFilterString removeFilterString(String oldString) {
// List strings = internalGetFilterStrings();
ISystemFilterString match = null; ISystemFilterString match = null;
Iterator i = filterStrings.iterator(); Iterator i = filterStrings.iterator();
while ((match == null) && (i.hasNext())) { while ((match == null) && (i.hasNext())) {
@ -618,7 +521,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
} }
if (match != null) { if (match != null) {
filterStrings.remove(match); filterStrings.remove(match);
// invalidateCache();
setDirty(true); setDirty(true);
} }
return match; return match;
@ -629,13 +531,11 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
* @return the SystemFilterString object deleted, or null if not found * @return the SystemFilterString object deleted, or null if not found
*/ */
public ISystemFilterString removeFilterString(int position) { public ISystemFilterString removeFilterString(int position) {
// List strings = internalGetFilterStrings();
ISystemFilterString filterString = null; ISystemFilterString filterString = null;
if (position < filterStrings.size()) { if (position < filterStrings.size()) {
filterString = (ISystemFilterString) filterStrings.remove(position); filterString = (ISystemFilterString) filterStrings.remove(position);
setDirty(true); setDirty(true);
} }
// invalidateCache();
return filterString; return filterString;
} }
@ -644,34 +544,22 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
* @return true if the given string existed and hence was deleted. * @return true if the given string existed and hence was deleted.
*/ */
public boolean removeFilterString(ISystemFilterString filterString) { public boolean removeFilterString(ISystemFilterString filterString) {
// List strings = internalGetFilterStrings();
boolean removed = filterStrings.remove(filterString); boolean removed = filterStrings.remove(filterString);
if (removed) { if (removed) {
setDirty(true); setDirty(true);
} }
return removed; return removed;
// if (strings.contains(filterString))
// {
// strings.remove(filterString);
//// invalidateCache();
// return true;
// }
// else
// return false;
} }
/** /**
* Move a given filter string to a given zero-based location * Move a given filter string to a given zero-based location
*/ */
public void moveSystemFilterString(int pos, ISystemFilterString filterString) { public void moveSystemFilterString(int pos, ISystemFilterString filterString) {
// List strings = internalGetFilterStrings();
boolean removed = filterStrings.remove(filterString); boolean removed = filterStrings.remove(filterString);
if (removed) { if (removed) {
filterStrings.add(pos, filterString); filterStrings.add(pos, filterString);
setDirty(true); setDirty(true);
} }
//FIXME internalGetFilterStrings().move(pos,filterString);
// invalidateCache();
} }
/** /**
@ -753,9 +641,10 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
* @param parentPool the SystemFilterPool that is the parent of this filter. Will be perpetuated to nested filters. * @param parentPool the SystemFilterPool that is the parent of this filter. Will be perpetuated to nested filters.
* @param namingPolicy Tells us how to derive file name from filter name. Can be null for default prefix name. * @param namingPolicy Tells us how to derive file name from filter name. Can be null for default prefix name.
* @return SystemFilter object if restored ok, null if error encountered. If null, call getLastException(). * @return SystemFilter object if restored ok, null if error encountered. If null, call getLastException().
* @deprecated no longer used
*/ */
public static ISystemFilter restore(IFolder folder, String name, ISystemFilterPool parentPool, IRSEFilterNamingPolicy namingPolicy) throws Exception { public static ISystemFilter restore(IFolder folder, String name, ISystemFilterPool parentPool, IRSEFilterNamingPolicy namingPolicy) throws Exception {
/* FIXME /* code no longer needed since restore is done by importers, not by MOF/EMF
String fileName = getRootSaveFileName(namingPolicy, name); String fileName = getRootSaveFileName(namingPolicy, name);
List ext = mofHelpers.restore(folder,fileName); List ext = mofHelpers.restore(folder,fileName);
@ -773,6 +662,7 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
/** /**
* Return the root save file name without the extension .xmi * Return the root save file name without the extension .xmi
* @deprecated no longer used
*/ */
protected static String getRootSaveFileName(ISystemFilter filter) { protected static String getRootSaveFileName(ISystemFilter filter) {
return getRootSaveFileName(getNamingPolicy(filter), filter.getName()); return getRootSaveFileName(getNamingPolicy(filter), filter.getName());
@ -780,6 +670,7 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
/** /**
* Return the root save file name without the extension .xmi * Return the root save file name without the extension .xmi
* @deprecated no longer used
*/ */
protected static String getRootSaveFileName(IRSEFilterNamingPolicy namingPolicy, String name) { protected static String getRootSaveFileName(IRSEFilterNamingPolicy namingPolicy, String name) {
return namingPolicy.getFilterSaveFileName(name); return namingPolicy.getFilterSaveFileName(name);
@ -787,6 +678,7 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
/** /**
* Return naming policy * Return naming policy
* @deprecated no longer used
*/ */
protected static IRSEFilterNamingPolicy getNamingPolicy(ISystemFilter filter) { protected static IRSEFilterNamingPolicy getNamingPolicy(ISystemFilter filter) {
return filter.getParentFilterPool().getNamingPolicy(); return filter.getParentFilterPool().getNamingPolicy();
@ -794,6 +686,7 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
/** /**
* Ensure given path ends with path separator. * Ensure given path ends with path separator.
* @deprecated no longer used
*/ */
public static String addPathTerminator(String path) { public static String addPathTerminator(String path) {
if (!path.endsWith(File.separator)) path = path + File.separatorChar; if (!path.endsWith(File.separator)) path = path + File.separatorChar;
@ -802,48 +695,55 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
return path; return path;
} }
/** /*-------------------
* Return string identifying this filter * Attribute getters and setters
*-------------------*/
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/ */
public String toString() { public String toString() {
return getName(); return getName();
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation * @see org.eclipse.rse.core.model.IRSEModelObject#getName()
*/ */
public String getName() { public String getName() {
return name; return name;
} }
/* (non-Javadoc)
* @see org.eclipse.rse.core.model.RSEModelObject#getDescription()
*/
public String getDescription() { public String getDescription() {
return RSECoreMessages.RESID_MODELOBJECTS_FILTER_DESCRIPTION; return RSECoreMessages.RESID_MODELOBJECTS_FILTER_DESCRIPTION;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#setName(java.lang.String)
*/ */
public void setName(String newName) { public void setName(String newName) {
name = newName; name = newName;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#setType(java.lang.String)
*/ */
public void setType(String newType) { public void setType(String newType) {
type = newType; type = newType;
setDirty(true); setDirty(true);
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation * @see org.eclipse.rse.core.filters.ISystemFilter#isSupportsNestedFilters()
*/ */
public boolean isSupportsNestedFilters() { public boolean isSupportsNestedFilters() {
return supportsNestedFilters; return supportsNestedFilters;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#setSupportsNestedFilters(boolean)
*/ */
public void setSupportsNestedFilters(boolean newSupportsNestedFilters) { public void setSupportsNestedFilters(boolean newSupportsNestedFilters) {
boolean oldSupportsNestedFilters = supportsNestedFilters; boolean oldSupportsNestedFilters = supportsNestedFilters;
@ -853,39 +753,36 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
} }
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation * @see org.eclipse.rse.core.filters.ISystemFilter#getRelativeOrder()
* When saving one filter per file, this captures this filter's relative order
* within the pool, as the file system cannot capture this.
*/ */
public int getRelativeOrder() { public int getRelativeOrder() {
return relativeOrder; return relativeOrder;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#setRelativeOrder(int)
*/ */
public void setRelativeOrder(int newRelativeOrder) { public void setRelativeOrder(int newRelativeOrder) {
relativeOrder = newRelativeOrder; relativeOrder = newRelativeOrder;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation * @see org.eclipse.rse.core.filters.ISystemFilter#isDefault()
* Is this a vendor-supplied filter versus a user-defined filter
*/ */
public boolean isDefault() { public boolean isDefault() {
return default_; return default_;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#setDefault(boolean)
*/ */
public void setDefault(boolean newDefault) { public void setDefault(boolean newDefault) {
default_ = newDefault; default_ = newDefault;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#setStringsCaseSensitive(boolean)
*/ */
public void setStringsCaseSensitive(boolean newStringsCaseSensitive) { public void setStringsCaseSensitive(boolean newStringsCaseSensitive) {
boolean oldStringsCaseSensitive = stringsCaseSensitive; boolean oldStringsCaseSensitive = stringsCaseSensitive;
@ -896,109 +793,77 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#unsetStringsCaseSensitive()
*/ */
public void unsetStringsCaseSensitive() { public void unsetStringsCaseSensitive() {
if (stringsCaseSensitive) { if (stringsCaseSensitive) {
stringsCaseSensitive = false; stringsCaseSensitive = false;
setDirty(true); setDirty(true);
} }
// boolean oldStringsCaseSensitive = stringsCaseSensitive;
// if (oldStringsCaseSensitive != STRINGS_CASE_SENSITIVE_EDEFAULT)
// {
// stringsCaseSensitive = STRINGS_CASE_SENSITIVE_EDEFAULT;
// setDirty(true);
// }
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#isSetStringsCaseSensitive()
*/ */
public boolean isSetStringsCaseSensitive() { public boolean isSetStringsCaseSensitive() {
return stringsCaseSensitive; return stringsCaseSensitive;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation * @see org.eclipse.rse.core.filters.ISystemFilter#isPromptable()
* If true, the user is prompted when this filter is expanded
*/ */
public boolean isPromptable() { public boolean isPromptable() {
return promptable; return promptable;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#setPromptable(boolean)
*/ */
public void setPromptable(boolean newPromptable) { public void setPromptable(boolean newPromptable) {
promptable = newPromptable; promptable = newPromptable;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation * @see org.eclipse.rse.core.filters.ISystemFilter#getParentFilter()
*/ */
public ISystemFilter getParentFilter() { public ISystemFilter getParentFilter() {
//FIXME
return _parentFilter; return _parentFilter;
//if (eContainerFeatureID != FiltersPackage.SYSTEM_FILTER__PARENT_FILTER) return null;
//return (SystemFilter)eContainer;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#setParentFilter(org.eclipse.rse.core.filters.ISystemFilter)
*/ */
public void setParentFilter(ISystemFilter newParentFilter) { public void setParentFilter(ISystemFilter newParentFilter) {
_parentFilter = newParentFilter; _parentFilter = newParentFilter;
/* FIXME
if (newParentFilter != eContainer || (eContainerFeatureID != FiltersPackage.SYSTEM_FILTER__PARENT_FILTER && newParentFilter != null))
{
if (EcoreUtil.isAncestor(this, newParentFilter))
throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
NotificationChain msgs = null;
if (eContainer != null)
msgs = eBasicRemoveFromContainer(msgs);
if (newParentFilter != null)
msgs = ((InternalEObject)newParentFilter).eInverseAdd(this, FiltersPackage.SYSTEM_FILTER__NESTED_FILTERS, SystemFilter.class, msgs);
msgs = eBasicSetContainer((InternalEObject)newParentFilter, FiltersPackage.SYSTEM_FILTER__PARENT_FILTER, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FiltersPackage.SYSTEM_FILTER__PARENT_FILTER, newParentFilter, newParentFilter));
*/
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation * @see org.eclipse.rse.core.filters.ISystemFilter#getNestedFilters()
*/ */
public List getNestedFilters() { public List getNestedFilters() {
if (nestedFilters == null) { if (nestedFilters == null) {
nestedFilters = new ArrayList(); nestedFilters = new ArrayList();
//FIXME new EObjectContainmentWithInversejava.util.List(SystemFilter.class, this, FiltersPackage.SYSTEM_FILTER__NESTED_FILTERS, FiltersPackage.SYSTEM_FILTER__PARENT_FILTER);
} }
return nestedFilters; return nestedFilters;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation * @see org.eclipse.rse.core.filters.ISystemFilter#getStrings()
*/ */
public List getStrings() { public List getStrings() {
// if (filterStrings == null)
// {
// filterStrings = new ArrayList();
// //FIXME new EObjectContainmenteList(SystemFilterString.class, this, FiltersPackage.SYSTEM_FILTER__STRINGS);
// }
return filterStrings; return filterStrings;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation * @see org.eclipse.rse.core.filters.ISystemFilter#isSupportsDuplicateFilterStrings()
*/ */
public boolean isSupportsDuplicateFilterStrings() { public boolean isSupportsDuplicateFilterStrings() {
return supportsDuplicateFilterStrings; return supportsDuplicateFilterStrings;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#setSupportsDuplicateFilterStrings(boolean)
*/ */
public void setSupportsDuplicateFilterStrings(boolean newSupportsDuplicateFilterStrings) { public void setSupportsDuplicateFilterStrings(boolean newSupportsDuplicateFilterStrings) {
boolean oldSupportsDuplicateFilterStrings = supportsDuplicateFilterStrings; boolean oldSupportsDuplicateFilterStrings = supportsDuplicateFilterStrings;
@ -1008,59 +873,57 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
} }
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation * @see org.eclipse.rse.core.filters.ISystemFilter#isNonDeletable()
*/ */
public boolean isNonDeletable() { public boolean isNonDeletable() {
return nonDeletable; return nonDeletable;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#setNonDeletable(boolean)
*/ */
public void setNonDeletable(boolean newNonDeletable) { public void setNonDeletable(boolean newNonDeletable) {
nonDeletable = newNonDeletable; nonDeletable = newNonDeletable;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation * @see org.eclipse.rse.core.filters.ISystemFilter#isNonRenamable()
*/ */
public boolean isNonRenamable() { public boolean isNonRenamable() {
return nonRenamable; return nonRenamable;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#setNonRenamable(boolean)
*/ */
public void setNonRenamable(boolean newNonRenamable) { public void setNonRenamable(boolean newNonRenamable) {
nonRenamable = newNonRenamable; nonRenamable = newNonRenamable;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation * @see org.eclipse.rse.core.filters.ISystemFilter#isNonChangable()
*/ */
public boolean isNonChangable() { public boolean isNonChangable() {
return nonChangable; return nonChangable;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#setNonChangable(boolean)
*/ */
public void setNonChangable(boolean newNonChangable) { public void setNonChangable(boolean newNonChangable) {
nonChangable = newNonChangable; nonChangable = newNonChangable;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation * @see org.eclipse.rse.core.filters.ISystemFilter#isStringsNonChangable()
* Are the filter strings within this filter non-changable by the user. If true,
* strings can be deleted, added, edited or reordered.
*/ */
public boolean isStringsNonChangable() { public boolean isStringsNonChangable() {
return stringsNonChangable; return stringsNonChangable;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#setStringsNonChangable(boolean)
*/ */
public void setStringsNonChangable(boolean newStringsNonChangable) { public void setStringsNonChangable(boolean newStringsNonChangable) {
boolean oldStringsNonChangable = stringsNonChangable; boolean oldStringsNonChangable = stringsNonChangable;
@ -1070,25 +933,22 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
} }
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation * @see org.eclipse.rse.core.filters.ISystemFilter#getRelease()
* In what release was this created? Typically, will be the version and release
* times 10, as in 40 or 51.
*/ */
public int getRelease() { public int getRelease() {
return release; return release;
} }
/** /* (non-Javadoc)
* @generated This field/method will be replaced during code generation. * @see org.eclipse.rse.core.filters.ISystemFilter#setRelease(int)
*/ */
public void setRelease(int newRelease) { public void setRelease(int newRelease) {
release = newRelease; release = newRelease;
} }
/** /* (non-Javadoc)
* Returns true if this filter is limited to a single filter string. If not set here, * @see org.eclipse.rse.core.filters.ISystemFilter#isSingleFilterStringOnly()
* it is queried from the parent pool.
*/ */
public boolean isSingleFilterStringOnly() { public boolean isSingleFilterStringOnly() {
if (isSetSingleFilterStringOnly()) if (isSetSingleFilterStringOnly())
@ -1097,10 +957,16 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
return getSystemFilterPool().isSingleFilterStringOnly(); return getSystemFilterPool().isSingleFilterStringOnly();
} }
/**
* @deprecated - no longer used
*/
public boolean isSingleFilterStringOnlyGen() { public boolean isSingleFilterStringOnlyGen() {
return singleFilterStringOnly; return singleFilterStringOnly;
} }
/* (non-Javadoc)
* @see org.eclipse.rse.core.filters.ISystemFilter#setSingleFilterStringOnly(boolean)
*/
public void setSingleFilterStringOnly(boolean newSingleFilterStringOnly) { public void setSingleFilterStringOnly(boolean newSingleFilterStringOnly) {
boolean oldSingleFilterStringOnly = singleFilterStringOnly; boolean oldSingleFilterStringOnly = singleFilterStringOnly;
if (oldSingleFilterStringOnly != newSingleFilterStringOnly) { if (oldSingleFilterStringOnly != newSingleFilterStringOnly) {
@ -1109,35 +975,43 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
} }
} }
/* (non-Javadoc)
* @see org.eclipse.rse.core.filters.ISystemFilter#unsetSingleFilterStringOnly()
*/
public void unsetSingleFilterStringOnly() { public void unsetSingleFilterStringOnly() {
if (singleFilterStringOnly) { if (singleFilterStringOnly) {
singleFilterStringOnly = false; singleFilterStringOnly = false;
setDirty(true); setDirty(true);
} }
// boolean oldSingleFilterStringOnly = singleFilterStringOnly;
// if (oldSingleFilterStringOnly != SINGLE_FILTER_STRING_ONLY_EDEFAULT)
// {
// singleFilterStringOnly = SINGLE_FILTER_STRING_ONLY_EDEFAULT;
// setDirty(true);
// }
//
} }
/* (non-Javadoc)
* @see org.eclipse.rse.core.filters.ISystemFilter#isSetSingleFilterStringOnly()
*/
public boolean isSetSingleFilterStringOnly() { public boolean isSetSingleFilterStringOnly() {
return singleFilterStringOnly; return singleFilterStringOnly;
} }
/* (non-Javadoc)
* @see org.eclipse.rse.core.model.IRSEPersistableContainer#commit()
*/
public boolean commit() { public boolean commit() {
ISystemProfile profile = getSystemFilterPoolManager().getSystemProfile(); ISystemProfile profile = getSystemFilterPoolManager().getSystemProfile();
boolean result = profile.commit(); boolean result = profile.commit();
return result; return result;
} }
/* (non-Javadoc)
* @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableParent()
*/
public IRSEPersistableContainer getPersistableParent() { public IRSEPersistableContainer getPersistableParent() {
IRSEPersistableContainer result = getParentFilterContainer(); IRSEPersistableContainer result = getParentFilterContainer();
return result; return result;
} }
/* (non-Javadoc)
* @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableChildren()
*/
public IRSEPersistableContainer[] getPersistableChildren() { public IRSEPersistableContainer[] getPersistableChildren() {
List children = new ArrayList(20); List children = new ArrayList(20);
List nf = getNestedFilters(); // guaranteed to not be null, none of these should be simple filters List nf = getNestedFilters(); // guaranteed to not be null, none of these should be simple filters