* @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
* @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()) {