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:
parent
89923f9852
commit
54b801b1c9
4 changed files with 183 additions and 352 deletions
|
@ -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
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -12,7 +12,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* David Dykstal (IBM) - cleanup format and javadoc
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.core.filters;
|
||||
|
@ -24,40 +24,15 @@ import org.eclipse.rse.core.model.IRSEModelObject;
|
|||
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.
|
||||
* Filter pools will be referenced by subsystems.
|
||||
* Filter pools are referenced by subsystems.
|
||||
* Subsystems are responsible for interpreting the filters. Filters, in and
|
||||
* of themselves, provide no interpretation of themselves when applied
|
||||
* 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 {
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- 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.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Relative Order</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* 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.
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @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.
|
||||
* <!-- 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 -->
|
||||
* @param value the new value of the '<em>Relative Order</em>' attribute.
|
||||
* @see #getRelativeOrder()
|
||||
|
@ -160,8 +143,11 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
|
|||
* Returns the value of the '<em><b>Default</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Default</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* 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.
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @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.
|
||||
* <!-- 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 -->
|
||||
* @param value the new value of the '<em>Default</em>' attribute.
|
||||
* @see #isDefault()
|
||||
|
@ -187,6 +178,10 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
|
|||
* case sensitive.
|
||||
* This attribute is optional and may be known (set) or unknown (unset).
|
||||
* </p>
|
||||
* <p>
|
||||
* If unset the value
|
||||
* returned is from the parent filter pool.
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Strings Case Sensitive</em>' attribute.
|
||||
* @see #isSetStringsCaseSensitive()
|
||||
|
@ -204,6 +199,9 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
|
|||
* case sensitive.
|
||||
* This attribute is optional and may be known (set) or unknown (unset).
|
||||
* </p>
|
||||
* <p>
|
||||
* This will cause this attribute to be set in this filter.
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Strings Case Sensitive</em>' attribute.
|
||||
* @see #isSetStringsCaseSensitive()
|
||||
|
@ -220,6 +218,8 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
|
|||
* to indicate whether or not comparisons involving the filter should be considered
|
||||
* case sensitive.
|
||||
* 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>
|
||||
* <!-- end-user-doc -->
|
||||
* @see #isSetStringsCaseSensitive()
|
||||
|
@ -236,6 +236,9 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
|
|||
* to indicate whether or not comparisons involving the filter should be considered
|
||||
* case sensitive.
|
||||
* 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>
|
||||
* <!-- end-user-doc -->
|
||||
* @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
|
||||
* by the filter implementation.
|
||||
* </p><p>
|
||||
* This attribute may be set or unset. If unset then this value must not be
|
||||
* relied upon.
|
||||
* This attribute may be set or unset. If unset this value will be inherited
|
||||
* from the parent filter pool.
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @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
|
||||
* by the filter implementation.
|
||||
* </p><p>
|
||||
* This attribute may be set or unset. If unset then this value must not be
|
||||
* relied upon.
|
||||
* This causes the attribute to be set for this filter, ignoring the value
|
||||
* specified for the parent filter pool.
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @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.
|
||||
* <!-- begin-user-doc -->
|
||||
* This causes the value of this attribute to be inherited from the parent filter pool.
|
||||
* <!-- end-user-doc -->
|
||||
* @see #isSetSingleFilterStringOnly()
|
||||
* @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.
|
||||
* <!-- 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 -->
|
||||
* @return whether the value of the '<em>Single Filter String Only</em>' attribute is set.
|
||||
* @see #unsetSingleFilterStringOnly()
|
||||
|
@ -550,7 +555,7 @@ public interface ISystemFilter extends IRSEReferencedObject, ISystemFilterContai
|
|||
* <!-- end-user-doc -->
|
||||
* @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
|
||||
|
|
|
@ -194,19 +194,20 @@ public interface ISystemFilterPool extends IRSEPersistableReferencedObject, ISys
|
|||
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
|
||||
*/
|
||||
void setStringsCaseSensitive(boolean value);
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
* Unsets the StringsCaseSensitive attribute
|
||||
* Unsets the StringsCaseSensitive attribute. Causes the case sensitivity of the
|
||||
* filter pool to be determined by its filter pool manager.
|
||||
*/
|
||||
void unsetStringsCaseSensitive();
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
* @return <b>true</b> if the StringsCaseSensitive attribute has been set
|
||||
*/
|
||||
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.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Single Filter String Only</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* If true then filters in this filter pool can have only a single filter string unless the
|
||||
* filter has overriden this attribute.
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @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.
|
||||
* <!-- 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 -->
|
||||
* @param value the new value of the '<em>Single Filter String Only</em>' attribute.
|
||||
* @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.
|
||||
* <!-- begin-user-doc -->
|
||||
* Causes the value of the single filter string attribute to be inherited from the containing filter pool manager.
|
||||
* <!-- end-user-doc -->
|
||||
* @see #isSetSingleFilterStringOnly()
|
||||
* @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.
|
||||
* <!-- 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 -->
|
||||
* @return whether the value of the '<em>Single Filter String Only</em>' attribute is set.
|
||||
* @see #unsetSingleFilterStringOnly()
|
||||
|
|
|
@ -31,13 +31,11 @@ import org.eclipse.rse.core.model.ISystemContentsType;
|
|||
import org.eclipse.rse.internal.core.filters.SystemFilter;
|
||||
|
||||
/**
|
||||
* A lightweight override of the full-fledged persistable implementation of SystemFilter.
|
||||
* This class replaces the heavy-weight MOF implementations with simple non-MOF
|
||||
* implementations.
|
||||
* A lightweight implementation of ISystemFilter.
|
||||
* <p>
|
||||
* This flavour of SystemFilter implementation is for those cases where a simple in-memory
|
||||
* SystemFilter 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
|
||||
* This flavor is for those cases where a simple in-memory
|
||||
* 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 need for a
|
||||
* parent SystemFilterPool or SystemFilterPoolManager. The class is small, simple and
|
||||
* directly instantiable.
|
||||
* <p>
|
||||
|
@ -56,43 +54,27 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
|
|||
private String type = null;
|
||||
private boolean caseSensitive = false;
|
||||
private boolean promptable = false;
|
||||
private Object parent;
|
||||
private boolean isStale;
|
||||
private boolean isStale = true;
|
||||
private Object parent = null;
|
||||
private List filterStrings = new ArrayList(3);
|
||||
private HashMap cachedContents;
|
||||
private HashMap cachedContents = new HashMap();
|
||||
|
||||
/**
|
||||
* Constructor for SystemFilterSimpleImpl
|
||||
* Constructor for SystemFilterSimple
|
||||
*/
|
||||
public SystemFilterSimple(String name) {
|
||||
//super();
|
||||
this.name = name;
|
||||
// filterStringVector = new Vector();
|
||||
isStale = true;
|
||||
cachedContents = new HashMap();
|
||||
}
|
||||
|
||||
// protected void invalidateCache()
|
||||
// {
|
||||
// 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
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.internal.core.filters.SystemFilter#isTransient()
|
||||
*/
|
||||
public boolean isTransient() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clones a given filter to the given target filter.
|
||||
* All filter strings, and all nested filters, are copied.
|
||||
* @param targetFilter new filter into which we copy all our data
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.internal.core.filters.SystemFilter#clone(org.eclipse.rse.core.filters.ISystemFilter)
|
||||
*/
|
||||
public void clone(ISystemFilter targetFilter) {
|
||||
super.clone(targetFilter);
|
||||
|
@ -104,15 +86,13 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
|
|||
// contains a single filter string so these methods
|
||||
// make it easier to set/get that filter string
|
||||
// -------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Set the single filter string
|
||||
*/
|
||||
public void setFilterString(String filterString) {
|
||||
filterStrings.clear();
|
||||
filterStrings.add(filterString);
|
||||
// filterStringVector.clear();
|
||||
// filterStringVector.addElement(filterString);
|
||||
// invalidateCache();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -122,10 +102,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
|
|||
public String getFilterString() {
|
||||
String result = filterStrings.isEmpty() ? null : (String) filterStrings.get(0);
|
||||
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()];
|
||||
filterStrings.toArray(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());
|
||||
result.addAll(filterStrings);
|
||||
return result;
|
||||
// return filterStringVector;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -243,7 +211,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
|
|||
*/
|
||||
public int getFilterStringCount() {
|
||||
return filterStrings.size();
|
||||
// return filterStringVector.size();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -253,12 +220,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
|
|||
public void setFilterStrings(Vector newStrings) {
|
||||
filterStrings.clear();
|
||||
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[]) {
|
||||
filterStrings.clear();
|
||||
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) {
|
||||
filterStrings.add(newString);
|
||||
// filterStringVector.addElement(newString);
|
||||
// invalidateCache();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -293,8 +246,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
|
|||
*/
|
||||
public ISystemFilterString addFilterString(String newString, int position) {
|
||||
filterStrings.add(position, newString);
|
||||
// filterStringVector.insertElementAt(newString,position);
|
||||
// invalidateCache();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -304,8 +255,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
|
|||
*/
|
||||
public ISystemFilterString removeFilterString(String oldString) {
|
||||
filterStrings.remove(oldString);
|
||||
// filterStringVector.removeElement(oldString);
|
||||
// invalidateCache();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -315,8 +264,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
|
|||
*/
|
||||
public ISystemFilterString removeFilterString(int position) {
|
||||
filterStrings.remove(position);
|
||||
// filterStringVector.removeElementAt(position);
|
||||
// invalidateCache();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -333,7 +280,6 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
|
|||
*/
|
||||
public boolean hasChildren() {
|
||||
return filterStrings.size() > 0;
|
||||
// return (filterStringVector.size() > 0);
|
||||
}
|
||||
|
||||
// ---------------------
|
||||
|
@ -528,14 +474,14 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
|
|||
isStale = false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @see org.eclipse.rse.core.model.ISystemContainer#getContents(org.eclipse.rse.core.model.ISystemContentsType)
|
||||
*/
|
||||
public Object[] getContents(ISystemContentsType contentsType) {
|
||||
return (Object[]) cachedContents.get(contentsType);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @see org.eclipse.rse.core.model.ISystemContainer#hasContents(org.eclipse.rse.core.model.ISystemContentsType)
|
||||
*/
|
||||
public boolean hasContents(ISystemContentsType contentsType) {
|
||||
|
@ -545,21 +491,21 @@ public class SystemFilterSimple extends SystemFilter implements ISystemContainer
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @see org.eclipse.rse.core.model.ISystemContainer#isStale()
|
||||
*/
|
||||
public boolean isStale() {
|
||||
return isStale;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @see org.eclipse.rse.core.model.ISystemContainer#markStale(boolean)
|
||||
*/
|
||||
public void markStale(boolean isStale) {
|
||||
markStale(isStale, true);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @see org.eclipse.rse.core.model.ISystemContainer#markStale(boolean)
|
||||
*/
|
||||
public void markStale(boolean isStale, boolean clearCache) {
|
||||
|
|
|
@ -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.
|
||||
* Filters can be referenced.
|
||||
*/
|
||||
/**
|
||||
* @lastgen class SystemFilterImpl extends SystemReferencedObjectImpl implements SystemFilter, SystemReferencedObject, SystemFilterContainer, IAdaptable {}
|
||||
*/
|
||||
public class SystemFilter extends SystemReferencedObject implements ISystemFilter, IAdaptable {
|
||||
|
||||
private SystemFilterContainerCommonMethods helpers = null;
|
||||
|
@ -70,7 +67,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
private int release = 0;
|
||||
private boolean singleFilterStringOnly = false;
|
||||
private List nestedFilters = new ArrayList(3);
|
||||
// private List strings = null;
|
||||
private ISystemFilter _parentFilter;
|
||||
|
||||
/**
|
||||
|
@ -106,20 +102,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
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.
|
||||
* 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) {
|
||||
// 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.setType(getType());
|
||||
targetFilter.setPromptable(isPromptable());
|
||||
|
@ -373,9 +355,11 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
public void setParentFilterPool(ISystemFilterPool parentPool) {
|
||||
this.parentPool = parentPool;
|
||||
ISystemFilter[] filters = getSystemFilters();
|
||||
if (filters != null) for (int idx = 0; idx < filters.length; idx++)
|
||||
filters[idx].setParentFilterPool(parentPool);
|
||||
// todo: decide if SystemFilterString objects need it too
|
||||
if (filters != null) {
|
||||
for (int idx = 0; idx < filters.length; idx++) {
|
||||
filters[idx].setParentFilterPool(parentPool);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -387,24 +371,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
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.
|
||||
* The array may be empty but will not be null.
|
||||
|
@ -419,20 +385,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
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.
|
||||
* This vector may be empty but will never be null.
|
||||
|
@ -444,19 +396,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
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
|
||||
*/
|
||||
|
@ -464,13 +403,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
Vector result = new Vector(filterStrings.size());
|
||||
result.addAll(filterStrings);
|
||||
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() {
|
||||
return filterStrings.size();
|
||||
// return internalGetFilterStrings().size();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -514,38 +445,15 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
filterStrings.add(filterString);
|
||||
}
|
||||
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
|
||||
*/
|
||||
public ISystemFilterString[] getSystemFilterStrings() {
|
||||
// List strings = internalGetFilterStrings();
|
||||
ISystemFilterString[] result = new ISystemFilterString[filterStrings.size()];
|
||||
filterStrings.toArray(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
|
||||
*/
|
||||
public void setFilterStrings(String newStrings[]) {
|
||||
// List strings = internalGetFilterStrings();
|
||||
filterStrings.clear();
|
||||
for (int idx = 0; idx < newStrings.length; idx++) {
|
||||
ISystemFilterString filterString = createFilterString(newStrings[idx]);
|
||||
filterStrings.add(filterString);
|
||||
// addFilterString(newStrings[idx]);
|
||||
}
|
||||
setDirty(true);
|
||||
//invalidateCache(); already done
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a system filter string created from a string.
|
||||
* @param string
|
||||
* @return
|
||||
*/
|
||||
private ISystemFilterString createFilterString(String string) {
|
||||
ISystemFilterString filterstring = new SystemFilterString();
|
||||
|
||||
// FIXME initMOF().createSystemFilterString();
|
||||
filterstring.setString(string);
|
||||
filterstring.setParentSystemFilter(this);
|
||||
return filterstring;
|
||||
|
@ -578,10 +486,8 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
*/
|
||||
public ISystemFilterString addFilterString(String newString) {
|
||||
ISystemFilterString newFilterString = createFilterString(newString);
|
||||
// List strings = internalGetFilterStrings();
|
||||
filterStrings.add(newFilterString);
|
||||
setDirty(true);
|
||||
// invalidateCache();
|
||||
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
|
||||
*/
|
||||
public ISystemFilterString addFilterString(String newString, int position) {
|
||||
// List strings = internalGetFilterStrings();
|
||||
ISystemFilterString newFilterString = createFilterString(newString);
|
||||
filterStrings.add(position, newFilterString);
|
||||
setDirty(true);
|
||||
// invalidateCache();
|
||||
return newFilterString;
|
||||
}
|
||||
|
||||
|
@ -609,7 +513,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
* @return the SystemFilterString object deleted, or null if not found
|
||||
*/
|
||||
public ISystemFilterString removeFilterString(String oldString) {
|
||||
// List strings = internalGetFilterStrings();
|
||||
ISystemFilterString match = null;
|
||||
Iterator i = filterStrings.iterator();
|
||||
while ((match == null) && (i.hasNext())) {
|
||||
|
@ -618,7 +521,6 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
}
|
||||
if (match != null) {
|
||||
filterStrings.remove(match);
|
||||
// invalidateCache();
|
||||
setDirty(true);
|
||||
}
|
||||
return match;
|
||||
|
@ -629,13 +531,11 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
* @return the SystemFilterString object deleted, or null if not found
|
||||
*/
|
||||
public ISystemFilterString removeFilterString(int position) {
|
||||
// List strings = internalGetFilterStrings();
|
||||
ISystemFilterString filterString = null;
|
||||
if (position < filterStrings.size()) {
|
||||
filterString = (ISystemFilterString) filterStrings.remove(position);
|
||||
setDirty(true);
|
||||
}
|
||||
// invalidateCache();
|
||||
return filterString;
|
||||
}
|
||||
|
||||
|
@ -644,34 +544,22 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
* @return true if the given string existed and hence was deleted.
|
||||
*/
|
||||
public boolean removeFilterString(ISystemFilterString filterString) {
|
||||
// List strings = internalGetFilterStrings();
|
||||
boolean removed = filterStrings.remove(filterString);
|
||||
if (removed) {
|
||||
setDirty(true);
|
||||
}
|
||||
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
|
||||
*/
|
||||
public void moveSystemFilterString(int pos, ISystemFilterString filterString) {
|
||||
// List strings = internalGetFilterStrings();
|
||||
boolean removed = filterStrings.remove(filterString);
|
||||
if (removed) {
|
||||
filterStrings.add(pos, filterString);
|
||||
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 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().
|
||||
* @deprecated no longer used
|
||||
*/
|
||||
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);
|
||||
|
||||
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
|
||||
* @deprecated no longer used
|
||||
*/
|
||||
protected static String getRootSaveFileName(ISystemFilter filter) {
|
||||
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
|
||||
* @deprecated no longer used
|
||||
*/
|
||||
protected static String getRootSaveFileName(IRSEFilterNamingPolicy namingPolicy, String name) {
|
||||
return namingPolicy.getFilterSaveFileName(name);
|
||||
|
@ -787,6 +678,7 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
|
||||
/**
|
||||
* Return naming policy
|
||||
* @deprecated no longer used
|
||||
*/
|
||||
protected static IRSEFilterNamingPolicy getNamingPolicy(ISystemFilter filter) {
|
||||
return filter.getParentFilterPool().getNamingPolicy();
|
||||
|
@ -794,6 +686,7 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
|
||||
/**
|
||||
* Ensure given path ends with path separator.
|
||||
* @deprecated no longer used
|
||||
*/
|
||||
public static String addPathTerminator(String path) {
|
||||
if (!path.endsWith(File.separator)) path = path + File.separatorChar;
|
||||
|
@ -802,48 +695,55 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
return path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return string identifying this filter
|
||||
/*-------------------
|
||||
* Attribute getters and setters
|
||||
*-------------------*/
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
public String toString() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.model.IRSEModelObject#getName()
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.model.RSEModelObject#getDescription()
|
||||
*/
|
||||
public String getDescription() {
|
||||
return RSECoreMessages.RESID_MODELOBJECTS_FILTER_DESCRIPTION;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setName(java.lang.String)
|
||||
*/
|
||||
public void setName(String newName) {
|
||||
name = newName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setType(java.lang.String)
|
||||
*/
|
||||
public void setType(String newType) {
|
||||
type = newType;
|
||||
setDirty(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#isSupportsNestedFilters()
|
||||
*/
|
||||
public boolean isSupportsNestedFilters() {
|
||||
return supportsNestedFilters;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setSupportsNestedFilters(boolean)
|
||||
*/
|
||||
public void setSupportsNestedFilters(boolean newSupportsNestedFilters) {
|
||||
boolean oldSupportsNestedFilters = supportsNestedFilters;
|
||||
|
@ -853,39 +753,36 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
* When saving one filter per file, this captures this filter's relative order
|
||||
* within the pool, as the file system cannot capture this.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#getRelativeOrder()
|
||||
*/
|
||||
public int getRelativeOrder() {
|
||||
return relativeOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setRelativeOrder(int)
|
||||
*/
|
||||
public void setRelativeOrder(int newRelativeOrder) {
|
||||
relativeOrder = newRelativeOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
* Is this a vendor-supplied filter versus a user-defined filter
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#isDefault()
|
||||
*/
|
||||
public boolean isDefault() {
|
||||
return default_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setDefault(boolean)
|
||||
*/
|
||||
public void setDefault(boolean newDefault) {
|
||||
default_ = newDefault;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setStringsCaseSensitive(boolean)
|
||||
*/
|
||||
public void setStringsCaseSensitive(boolean newStringsCaseSensitive) {
|
||||
boolean oldStringsCaseSensitive = stringsCaseSensitive;
|
||||
|
@ -896,109 +793,77 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#unsetStringsCaseSensitive()
|
||||
*/
|
||||
public void unsetStringsCaseSensitive() {
|
||||
if (stringsCaseSensitive) {
|
||||
stringsCaseSensitive = false;
|
||||
setDirty(true);
|
||||
}
|
||||
// boolean oldStringsCaseSensitive = stringsCaseSensitive;
|
||||
// if (oldStringsCaseSensitive != STRINGS_CASE_SENSITIVE_EDEFAULT)
|
||||
// {
|
||||
// stringsCaseSensitive = STRINGS_CASE_SENSITIVE_EDEFAULT;
|
||||
// setDirty(true);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#isSetStringsCaseSensitive()
|
||||
*/
|
||||
public boolean isSetStringsCaseSensitive() {
|
||||
return stringsCaseSensitive;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
* If true, the user is prompted when this filter is expanded
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#isPromptable()
|
||||
*/
|
||||
public boolean isPromptable() {
|
||||
return promptable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setPromptable(boolean)
|
||||
*/
|
||||
public void setPromptable(boolean newPromptable) {
|
||||
promptable = newPromptable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#getParentFilter()
|
||||
*/
|
||||
public ISystemFilter getParentFilter() {
|
||||
//FIXME
|
||||
return _parentFilter;
|
||||
//if (eContainerFeatureID != FiltersPackage.SYSTEM_FILTER__PARENT_FILTER) return null;
|
||||
//return (SystemFilter)eContainer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setParentFilter(org.eclipse.rse.core.filters.ISystemFilter)
|
||||
*/
|
||||
public void setParentFilter(ISystemFilter 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));
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#getNestedFilters()
|
||||
*/
|
||||
public List getNestedFilters() {
|
||||
if (nestedFilters == null) {
|
||||
nestedFilters = new ArrayList();
|
||||
//FIXME new EObjectContainmentWithInversejava.util.List(SystemFilter.class, this, FiltersPackage.SYSTEM_FILTER__NESTED_FILTERS, FiltersPackage.SYSTEM_FILTER__PARENT_FILTER);
|
||||
}
|
||||
return nestedFilters;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#getStrings()
|
||||
*/
|
||||
public List getStrings() {
|
||||
// if (filterStrings == null)
|
||||
// {
|
||||
// filterStrings = new ArrayList();
|
||||
// //FIXME new EObjectContainmenteList(SystemFilterString.class, this, FiltersPackage.SYSTEM_FILTER__STRINGS);
|
||||
// }
|
||||
return filterStrings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#isSupportsDuplicateFilterStrings()
|
||||
*/
|
||||
public boolean isSupportsDuplicateFilterStrings() {
|
||||
return supportsDuplicateFilterStrings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setSupportsDuplicateFilterStrings(boolean)
|
||||
*/
|
||||
public void setSupportsDuplicateFilterStrings(boolean newSupportsDuplicateFilterStrings) {
|
||||
boolean oldSupportsDuplicateFilterStrings = supportsDuplicateFilterStrings;
|
||||
|
@ -1008,59 +873,57 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#isNonDeletable()
|
||||
*/
|
||||
public boolean isNonDeletable() {
|
||||
return nonDeletable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setNonDeletable(boolean)
|
||||
*/
|
||||
public void setNonDeletable(boolean newNonDeletable) {
|
||||
nonDeletable = newNonDeletable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#isNonRenamable()
|
||||
*/
|
||||
public boolean isNonRenamable() {
|
||||
return nonRenamable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setNonRenamable(boolean)
|
||||
*/
|
||||
public void setNonRenamable(boolean newNonRenamable) {
|
||||
nonRenamable = newNonRenamable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#isNonChangable()
|
||||
*/
|
||||
public boolean isNonChangable() {
|
||||
return nonChangable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setNonChangable(boolean)
|
||||
*/
|
||||
public void setNonChangable(boolean newNonChangable) {
|
||||
nonChangable = newNonChangable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
* Are the filter strings within this filter non-changable by the user. If true,
|
||||
* strings can be deleted, added, edited or reordered.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#isStringsNonChangable()
|
||||
*/
|
||||
public boolean isStringsNonChangable() {
|
||||
return stringsNonChangable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setStringsNonChangable(boolean)
|
||||
*/
|
||||
public void setStringsNonChangable(boolean newStringsNonChangable) {
|
||||
boolean oldStringsNonChangable = stringsNonChangable;
|
||||
|
@ -1070,25 +933,22 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation
|
||||
* In what release was this created? Typically, will be the version and release
|
||||
* times 10, as in 40 or 51.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#getRelease()
|
||||
*/
|
||||
public int getRelease() {
|
||||
return release;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated This field/method will be replaced during code generation.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setRelease(int)
|
||||
*/
|
||||
public void setRelease(int newRelease) {
|
||||
release = newRelease;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this filter is limited to a single filter string. If not set here,
|
||||
* it is queried from the parent pool.
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#isSingleFilterStringOnly()
|
||||
*/
|
||||
public boolean isSingleFilterStringOnly() {
|
||||
if (isSetSingleFilterStringOnly())
|
||||
|
@ -1097,10 +957,16 @@ public class SystemFilter extends SystemReferencedObject implements ISystemFilte
|
|||
return getSystemFilterPool().isSingleFilterStringOnly();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - no longer used
|
||||
*/
|
||||
public boolean isSingleFilterStringOnlyGen() {
|
||||
return singleFilterStringOnly;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.filters.ISystemFilter#setSingleFilterStringOnly(boolean)
|
||||
*/
|
||||
public void setSingleFilterStringOnly(boolean newSingleFilterStringOnly) {
|
||||
boolean oldSingleFilterStringOnly = singleFilterStringOnly;
|
||||
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() {
|
||||
if (singleFilterStringOnly) {
|
||||
singleFilterStringOnly = false;
|
||||
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() {
|
||||
return singleFilterStringOnly;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.model.IRSEPersistableContainer#commit()
|
||||
*/
|
||||
public boolean commit() {
|
||||
ISystemProfile profile = getSystemFilterPoolManager().getSystemProfile();
|
||||
boolean result = profile.commit();
|
||||
return result;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableParent()
|
||||
*/
|
||||
public IRSEPersistableContainer getPersistableParent() {
|
||||
IRSEPersistableContainer result = getParentFilterContainer();
|
||||
return result;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.rse.core.model.IRSEPersistableContainer#getPersistableChildren()
|
||||
*/
|
||||
public IRSEPersistableContainer[] getPersistableChildren() {
|
||||
List children = new ArrayList(20);
|
||||
List nf = getNestedFilters(); // guaranteed to not be null, none of these should be simple filters
|
||||
|
|
Loading…
Add table
Reference in a new issue