Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to update an workspace using IjavaProject.setRawClasspath?
How to update an workspace using IjavaProject.setRawClasspath? [message #152015] Thu, 01 April 2004 12:43 Go to next message
Eclipse UserFriend
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 #152087 is a reply to message #152015] Fri, 02 April 2004 03:54 Go to previous messageGo to next message
Eclipse UserFriend
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.
> ===========
>
>
>
Re: How to update an workspace using IjavaProject.setRawClasspath? [message #152112 is a reply to message #152087] Fri, 02 April 2004 07:16 Go to previous message
Eclipse UserFriend
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.
> > ===========
> >
> >
> >
Previous Topic:Re: weird behavior of java editor
Next Topic:Debug in M8
Goto Forum:
  


Current Time: Wed Sep 17 12:28:41 EDT 2025

Powered by FUDForum. Page generated in 0.02430 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top