diff options
author | aclement <aclement> | 2009-04-06 15:34:48 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-04-06 15:34:48 +0000 |
commit | 312bc4815dbd270e64b8edc44aeb74acc37f25fe (patch) | |
tree | c3e4813d517cef31cb09af9d2f488bea04357e3d /asm | |
parent | d7766b83c0893dec422d99d58af23fb4a72a3a5b (diff) | |
download | aspectj-312bc4815dbd270e64b8edc44aeb74acc37f25fe.tar.gz aspectj-312bc4815dbd270e64b8edc44aeb74acc37f25fe.zip |
pullup
Diffstat (limited to 'asm')
-rw-r--r-- | asm/src/org/aspectj/asm/IHierarchy.java | 9 | ||||
-rw-r--r-- | asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/asm/src/org/aspectj/asm/IHierarchy.java b/asm/src/org/aspectj/asm/IHierarchy.java index d4351d17b..50d4a5fc1 100644 --- a/asm/src/org/aspectj/asm/IHierarchy.java +++ b/asm/src/org/aspectj/asm/IHierarchy.java @@ -112,4 +112,13 @@ public interface IHierarchy extends Serializable { * @return any closer match below 'node' or null if nothing is a more accurate match */ public IProgramElement findCloserMatchForLineNumber(IProgramElement node, int lineno); + + /** + * Discover the node representing a particular source file. + * + * @param node where in the model to start looking (usually the root on the initial call) + * @param sourcefilePath the source file being searched for + * @return the node representing that source file or null if it cannot be found + */ + public IProgramElement findNodeForSourceFile(IProgramElement node, String sourcefilePath); }
\ No newline at end of file diff --git a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java index d7892b56d..cd07bb5d7 100644 --- a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java +++ b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java @@ -363,7 +363,7 @@ public class AspectJElementHierarchy implements IHierarchy { * @param sourcefilePath the source file being searched for * @return the node representing that source file or null if it cannot be found */ - private IProgramElement findNodeForSourceFile(IProgramElement node, String sourcefilePath) { + public IProgramElement findNodeForSourceFile(IProgramElement node, String sourcefilePath) { // 1. why is <root> a sourcefile node? // 2. should isSourceFile() return true for a FILE that is a .class file...? if ((node.getKind().isSourceFile() && !node.getName().equals("<root>")) || node.getKind().isFile()) { |