repository access
Peter Wisnovsky <[email protected]> Fri, 1 Aug 2003 11:26:43 -0700
| Newsgroups | gmane.comp.java.netbeans.modules.projects.devel |
|---|---|
| Message-ID | <[email protected]> |
Has something changed in the repository API? I used to be able to do:
Repository repository = Repository.getDefault();
String fileName = classElement.getName().getFullName().replace('.', '/') + ".java";
FileObject fileObject = repository.findResource(fileName);
if (fileObject == null)
{
throw new FileStateInvalidException(fileName);
}
to get the file for a Java object using the name, for example
[-]-, java.lang.String fileName [id: 5272]
`--- ws/WS.java
but now I get null back, even though there is a package in my project
called "ws" and a file in that package called "WS.java". Is there
another way to search for such a file now? I trying to find the
Project the SourceElement is in, which I evidently can't do without
the file (now thanks to Svata and Tomas at least I know what to do
when I find the file) but I can't find the file in the first place any
more.
Thanks,
Peter