added getDocApplication() that tries to find a DocApplication object among the parents of the element
This commit is contained in:
parent
52405fe405
commit
744b24e34c
1 changed files with 15 additions and 0 deletions
|
@ -250,6 +250,21 @@ public abstract class DocElement implements IPathElement {
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* walks up the tree and tries to find a DocApplication object
|
||||||
|
*/
|
||||||
|
public DocApplication getDocApplication () {
|
||||||
|
DocElement el = this;
|
||||||
|
while (el != null) {
|
||||||
|
if (el instanceof DocApplication) {
|
||||||
|
return (DocApplication) el;
|
||||||
|
}
|
||||||
|
el = (DocElement) el.getParentElement ();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* from helma.framework.IPathElement. Elements are named
|
* from helma.framework.IPathElement. Elements are named
|
||||||
* like this: typename_name
|
* like this: typename_name
|
||||||
|
|
Loading…
Add table
Reference in a new issue