Subfolders do not appear in the project explorer after creation [message #66435] |
Tue, 24 June 2003 16:39  |
Eclipse User |
|
|
|
Originally posted by: lebowitz.finaltouch.com
I've written some code to create some file subdirectories. The object is to
create the following:
|_ <project>|
|__WEB-INF|
|__src
|__classes
|__lib
The following snippet is what I'm using...
try {
webFolder = project.getFolder("WEB-INF");
webFolder.create(false, true, null);
if (webFolder.exists()) {
source = webFolder.getFolder("src");
source.create(false, true, null);
source.getParent().refreshLocal(IResource.DEPTH_INFINITE, null);
classes = webFolder.getFolder("classes");
classes.create(false, true, null);
classes.getParent().refreshLocal(
IResource.DEPTH_INFINITE,
null);
library = webFolder.getFolder("lib");
library.create(false, true, null);
library.getParent().refreshLocal(
IResource.DEPTH_INFINITE,
null);
}
}
The src, classes and lib folders appear correctly on the local file system,
but they never appear in the Java Perspective after they're created. Can
someone indicate why this happens and what I should do to correct the
problem?
Rob
|
|
|
|
|
|
Re: Subfolders do not appear in the project explorer after creation [message #68194 is a reply to message #67858] |
Thu, 26 June 2003 12:06   |
Eclipse User |
|
|
|
Originally posted by: lebowitz.finaltouch.com
> So, you say that you misspelled "WEB-INF" and it is actually
> "web<something>inf"?
>
No... sorry... I didn't think about the WEB-INF folder since it appears in
the navigator everytime, I was concerned about the subfolders src, classes
and lib that weren't appearing.
> What build version are you using?
>
2.1
Last night I made some additions to my code, and lo and behold, the three
missing folders suddenly appeared. Previously the folders were empty, and
simply "folders", but now I set the classes folder as the output location of
the project, and add src as a ClasspathEntry for the project, and the
folders all appeared in the Java navigator.
I still think there is some kind of bug here; the folders should appear in
the navigator without having to specify their other roles, no?
Rob
|
|
|
Re: Subfolders do not appear in the project explorer after creation [message #68555 is a reply to message #68194] |
Fri, 27 June 2003 03:58  |
Eclipse User |
|
|
|
Originally posted by: daniel.megert.gmx.net
Robert J. Lebowitz wrote:
>>So, you say that you misspelled "WEB-INF" and it is actually
>>"web<something>inf"?
>>
>>
>>
>No... sorry... I didn't think about the WEB-INF folder since it appears in
>the navigator everytime, I was concerned about the subfolders src, classes
>and lib that weren't appearing.
>
>
>
>
>>What build version are you using?
>>
>>
>>
>2.1
>
The problem with big letters and dashes in the name has been fixed in 2.1.
>
>Last night I made some additions to my code, and lo and behold, the three
>missing folders suddenly appeared. Previously the folders were empty, and
>simply "folders", but now I set the classes folder as the output location of
>the project, and add src as a ClasspathEntry for the project, and the
>folders all appeared in the Java navigator.
>
>I still think there is some kind of bug here; the folders should appear in
>the navigator without having to specify their other roles, no?
>
It depends. I assume that in your Package Explorer (there is no Java
navigator - at least no in the standard Eclipse SDK) you have a filter
active which filters empty packages ;-)
Dani
|
|
|
Powered by
FUDForum. Page generated in 0.02650 seconds