How to update an workspace using IjavaProject.setRawClasspath? [message #152015] |
Thu, 01 April 2004 12:43  |
Eclipse User |
|
|
|
Originally posted by: pimenta.inatel.br
Hi.
My plugin will allow people to create new J2ME projects in Eclipse.
Then, to each new project, my plugin are putting the midpapi.zip to the
build path. Such a thing can be noted by means of the project's properties
window for each new J2ME project.
However, when I deal with the package explorer on eclipse, to see entries
on a new J2ME project, I can't see the midpapi there! What must I do to
see new entries to the project in package explorer?
My code is:
IJavaProject javaProject = (IJavaProject) JavaCore.create(project);
IClasspathEntry varEntry = null;
varEntry = JavaCore.newVariableEntry(
new Path("WTKHOME/midpapi.zip"), // library location
null, //source archive location
null //source archive root path
); //not exported
IClasspathEntry[] newClasspath = new IClasspathEntry[1];
newClasspath[0]= varEntry;
javaProject.setRawClasspath(newClasspath, monitor);
Is there something wrong?
Any hint will be very helpfull.
Thanks.
Rodrigo.
===========
|
|
|
|
Re: How to update an workspace using IjavaProject.setRawClasspath? [message #152112 is a reply to message #152087] |
Fri, 02 April 2004 07:16  |
Eclipse User |
|
|
|
Originally posted by: pimenta.inatel.br
Not yet.
I wil try.
Thanks.
Rodrigo.
Jerome Lanneluc wrote:
> Is your variable WTKHOME initialized (using
> JavaCore.setClasspathVariable(...) ?
> Jerome
> "Rodrigo Pimenta" <pimenta@inatel.br> wrote in message
> news:c4hkbp$imk$1@eclipse.org...
> > Hi.
> >
> > My plugin will allow people to create new J2ME projects in Eclipse.
> > Then, to each new project, my plugin are putting the midpapi.zip to the
> > build path. Such a thing can be noted by means of the project's properties
> > window for each new J2ME project.
> >
> > However, when I deal with the package explorer on eclipse, to see entries
> > on a new J2ME project, I can't see the midpapi there! What must I do to
> > see new entries to the project in package explorer?
> >
> > My code is:
> >
> > IJavaProject javaProject = (IJavaProject) JavaCore.create(project);
> > IClasspathEntry varEntry = null;
> > varEntry = JavaCore.newVariableEntry(
> > new Path("WTKHOME/midpapi.zip"), // library location
> > null, //source archive location
> > null //source archive root path
> > ); //not exported
> >
> >
> > IClasspathEntry[] newClasspath = new IClasspathEntry[1];
> > newClasspath[0]= varEntry;
> > javaProject.setRawClasspath(newClasspath, monitor);
> >
> > Is there something wrong?
> >
> > Any hint will be very helpfull.
> >
> > Thanks.
> >
> > Rodrigo.
> > ===========
> >
> >
> >
|
|
|
Powered by
FUDForum. Page generated in 0.02491 seconds