|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.model.ContentLevelFilter
public abstract class ContentLevelFilter
This class is responsible for filtering the breadth-first traversal
implemented by the ContentLevel
class to provide a virtual
representation of each level that differs from its physical
representation. A ContentLevelFilter may:
Element
s to be displayed
ContentLevel.addContentLevelFilter(oracle.ide.model.ContentLevelFilter)
. The filters are called
during a ContentLevel
traversal when the ContentLevel is used
in a Context
where ContentLevelFilter behavior is enabled.
For example, the IDE's System Navigator disables the filtering, but
the Application Navigator enables the filtering.
Constructor Summary | |
---|---|
protected |
ContentLevelFilter(java.lang.String[] contentSetKeys)
Creates a ContentLevelFilter that works on the content sets with the specified keys. |
Method Summary | |
---|---|
abstract void |
updateDir(URLPath srcRoots,
java.lang.String dirRelPath,
java.util.List elementList,
java.util.List subdirList,
Context context)
This method is called whenever a level is expanded during the breadth-first traversal of the project content. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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
ContentSetProvider.getKey()
method.
java.lang.IllegalArgumentException
- if contentSetKeys
is null or empty or if any item in the contentSetKeys array is
null.Method Detail |
---|
public abstract void updateDir(URLPath srcRoots, java.lang.String dirRelPath, java.util.List elementList, java.util.List subdirList, Context context)
Element
s 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
Element
s to/from the given elementList
.
Filering subdirectories involves first removing the Element
representing the subdirectory from the given subdirList
.
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
to subdirList
.
srcRoots
- The list of source root directories that underly
the current content level being expanded.dirRelPath
- The relative path within the srcRoots
where the content level expansion is occurring. When expanding the
very first level, dirRelPath
is "" (i.e. the
empty string).elementList
- This is a List of Element
s that initially
contains Node
instances for all files in the
dirRelPath
. If an item is removed from
elementList
, it will not be displayed. If an
Element
is added to the elementList
, it will be
displayed. An attempt to add a non-Element type to the
elementList
will cause a runtime exception to be thrown.
When multiple filters modify the elementList
for the same
dirRelPath
, later filters will see the effect of earlier
filters.subdirList
- This is a List of RelativeDirectoryContextFolder
instances 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 subdirList
:
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 subdirList
will be processed
as follows:
dirRelPath
is ""
context
- The context in which the level expansion is occurring.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |