folder not showing up in package explorer view [message #252358] |
Mon, 14 June 2004 11:41  |
Eclipse User |
|
|
|
Windows 2000, Eclipse RC2
Hello, I am using the following code to create an IFolder. I DO NOT get
an error and I DO see the folder created when I use the Navigator view in
the Resource perspective. The problem is that I DO NOT see the folder
with the package explorer view in the Java perspective.
The code I am using is below:
IFolder folder = javaProject.getProject().getFolder("WEB-INF");
if (!folder.exists()) {
folder.create(false, true, monitor);
}
folder = javaProject.getProject().getFolder("WEB-INF/classes");
if (!folder.exists()) {
folder.create(false, true, monitor);
}
I get an error when trying to reference the folder I created with this
call:
// previously added WEB-INF/classes to entries
javaProject.setRawClasspath(entries, outputPath.makeAbsolute(), monitor)
Can anybody please help me? Thank you very much.
Joe
|
|
|
Re: folder not showing up in package explorer view [message #252617 is a reply to message #252358] |
Tue, 15 June 2004 04:29   |
Eclipse User |
|
|
|
Originally posted by: thomas_maeder.ch.ibm.com
What's the error (stack trace, etc.)?
Joe Hudson wrote:
> Windows 2000, Eclipse RC2
>
> Hello, I am using the following code to create an IFolder. I DO NOT get
> an error and I DO see the folder created when I use the Navigator view in
> the Resource perspective. The problem is that I DO NOT see the folder
> with the package explorer view in the Java perspective.
>
> The code I am using is below:
> IFolder folder = javaProject.getProject().getFolder("WEB-INF");
> if (!folder.exists()) {
> folder.create(false, true, monitor);
> }
> folder = javaProject.getProject().getFolder("WEB-INF/classes");
> if (!folder.exists()) {
> folder.create(false, true, monitor);
> }
>
> I get an error when trying to reference the folder I created with this
> call:
> // previously added WEB-INF/classes to entries
> javaProject.setRawClasspath(entries, outputPath.makeAbsolute(), monitor)
>
> Can anybody please help me? Thank you very much.
>
> Joe
>
|
|
|
Re: folder not showing up in package explorer view [message #252697 is a reply to message #252617] |
Tue, 15 June 2004 08:34   |
Eclipse User |
|
|
|
Thank you very much for the reply, Thomas.
No exception is thrown but, after the method is called, I only see the
newly created folder in the Resources perspective and not the Java
perspective. It seems like the folder creation didn't synchronize
correctly with the JDT but I don't understand why. Do you have any ideas?
Joe
Thomas Mäder wrote:
> What's the error (stack trace, etc.)?
> Joe Hudson wrote:
> > Windows 2000, Eclipse RC2
> >
> > Hello, I am using the following code to create an IFolder. I DO NOT get
> > an error and I DO see the folder created when I use the Navigator view in
> > the Resource perspective. The problem is that I DO NOT see the folder
> > with the package explorer view in the Java perspective.
> >
> > The code I am using is below:
> > IFolder folder = javaProject.getProject().getFolder("WEB-INF");
> > if (!folder.exists()) {
> > folder.create(false, true, monitor);
> > }
> > folder = javaProject.getProject().getFolder("WEB-INF/classes");
> > if (!folder.exists()) {
> > folder.create(false, true, monitor);
> > }
> >
> > I get an error when trying to reference the folder I created with this
> > call:
> > // previously added WEB-INF/classes to entries
> > javaProject.setRawClasspath(entries, outputPath.makeAbsolute(), monitor)
> >
> > Can anybody please help me? Thank you very much.
> >
> > Joe
> >
|
|
|
|
Powered by
FUDForum. Page generated in 0.03781 seconds