public abstract class ContentLevelFilter extends java.lang.Object
ContentLevelclass to provide a virtual representation of each level that differs from its physical representation. A ContentLevelFilter may:
Elements to be displayed
ContentLevel.addContentLevelFilter(oracle.ide.model.ContentLevelFilter). The filters are called during a
ContentLeveltraversal when the ContentLevel is used in a
Contextwhere ContentLevelFilter behavior is enabled. For example, the IDE's System Navigator disables the filtering, but the Application Navigator enables the filtering.
|Modifier||Constructor and Description|
Creates a ContentLevelFilter that works on the content sets with the specified keys.
|Modifier and Type||Method and Description|
This method is called whenever a level is expanded during the breadth-first traversal of the project content.
protected ContentLevelFilter(java.lang.String contentSetKeys)
contentSetKeys- A non-null, non-empty array of content set keys for which this ContentLevelFilter will apply. All of the keys must be a value returned by some
contentSetKeysis null or empty or if any item in the contentSetKeys array is null.
public abstract void updateDir(URLPath srcRoots, java.lang.String dirRelPath, java.util.List elementList, java.util.List subdirList, Context context)
Elements and subdirectories for each level before they are displayed. Whenever there are multiple ContentLevelFilter applying changes to the same level, later filters will see the effect of earlier filters and could possibly perform further filtering on them.
Filtering at the file level is done by adding/removing
Elements to/from the given
Filering subdirectories involves first removing the
representing the subdirectory from the given
If no further action is taken, the subdirectory will not be displayed.
However if the removed subdirectory is then added to the
elementList, the subdirectory will be displayed, even
if it's empty (unless a later ContentLevelFilter removes it).
Nothing can be added to the
subdirList; a runtime
exception will be thrown on any attempt to add or modify an item
srcRoots- The list of source root directories that underly the current content level being expanded.
dirRelPath- The relative path within the
srcRootswhere the content level expansion is occurring. When expanding the very first level,
dirRelPathis "" (i.e. the empty string).
elementList- This is a List of
Elements that initially contains
Nodeinstances for all files in the
dirRelPath. If an item is removed from
elementList, it will not be displayed. If an
Elementis added to the
elementList, it will be displayed. An attempt to add a non-Element type to the
elementListwill cause a runtime exception to be thrown. When multiple filters modify the
elementListfor the same
dirRelPath, later filters will see the effect of earlier filters.
subdirList- This is a List of
RelativeDirectoryContextFolderinstances that initially contains all the subdirectories under the
dirRelPath, accounting for the flat level currently being used by the
ContentLevel. (This means that when expanding the root-level "" dirRelPath, the subdirList will contain all subdirectories up to the flat level. So if the flat level is 3, the subdirList at dirRelPath "" will contain the first 3 levels of subdirectories.) The filter implementation may take one of three actions for each item in
elementList. This forces the corresponding folder to be displayed, even if it is empty.
subdirList. This means that the decision to show or hide the folder is left to later filters and/or the IDE. After all filters have been called, any remaining items in the
subdirListwill be processed as follows:
context- The context in which the level expansion is occurring.