From 312bc4815dbd270e64b8edc44aeb74acc37f25fe Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 6 Apr 2009 15:34:48 +0000 Subject: [PATCH] pullup --- asm/src/org/aspectj/asm/IHierarchy.java | 9 +++++++++ .../aspectj/asm/internal/AspectJElementHierarchy.java | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) 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 a sourcefile node? // 2. should isSourceFile() return true for a FILE that is a .class file...? if ((node.getKind().isSourceFile() && !node.getName().equals("")) || node.getKind().isFile()) { -- 2.39.5