|
Re: Restrict imports in auto-import prompter [message #181708 is a reply to message #181529] |
Fri, 24 November 2006 16:02 |
Eclipse User |
|
|
|
Originally posted by: wegener.cboenospam.com
Shug wrote:
> Hi everyone,
>
> I've recently started doing some J2ME coding using EclipseME to do all
> the setup, but the auto complete is unfortunately pulling in J2SE
> classes and so forth... I'd really like to impose a restriction to only
> use lang and J2ME classes. (For those who don't know... J2ME is a very
> small subset of the Collections).
>
> I guess this comes from the fact that the J2ME library (defined by the
> project) includes the J2SE jars, as well as my OS extensions. There
> doesn't appear to be any way to remove individual jar files from a
> System Library.
>
You indicate that the project has a J2ME library defined. However, you
also refer to the System Library. Do you have both the J2ME library and
the System library defined on the build path (Properties->Java Build
Path->Libraries). If so, remove the System Library from your build path
and only leave the J2ME library.
If the J2ME library contains the J2SE jars, edit the library and remove
the J2SE jars leaving only the J2ME jar files that you need.
> I have the cldc/midp (i.e. the J2ME collections for most cell phones)
> jar files, so perhaps if there is a way to tell the auto-import tool to
> only search those jars (on a by-project basis)?
>
> Could somebody please help with restricting my auto-importer in this way?
>
> Thanks,
> Shug
>
|
|
|
|
Re: Restrict imports in auto-import prompter [message #181724 is a reply to message #181713] |
Fri, 24 November 2006 21:14 |
Eclipse User |
|
|
|
Originally posted by: eclipse4.rizzoweb.com
Shug wrote:
> David Wegener wrote:
>> If the J2ME library contains the J2SE jars, edit the library and
>> remove the J2SE jars leaving only the J2ME jar files that you need.
>
> I'm afraid that isn't possible... the EclipseME plugin adds the J2SE
> libs automatically as part of the J2ME library and cannot be removed
> without removing all the build libraries.
You can edit the JRE configurations, including add/removing JARs from
them. I recommend, in your project Build Path, remove the "Standard"
J2ME system library and add a new User Library; it will allow you to
create a new User Library whicih you can build up from whatever JARs you
want.
Alternatively, you can edit the J2ME System Library (or copy it) and
remove the unwanted JARs.
Hope this helps,
Eric
|
|
|
|
|
Re: Restrict imports in auto-import prompter [message #181822 is a reply to message #181744] |
Mon, 27 November 2006 18:35 |
Eclipse User |
|
|
|
Originally posted by: eclipse4.rizzoweb.com
Shug wrote:
> Aaargh, this still hasn't fixed the problem, because including
> classes.jar contains all of J2SE
>
> Is there really no way to restrict the valid classes to import?
>
Yes there is, by restricting what is on the build path ;-). If the Java
Runtime libraries you are using include classes, then those classes are
available to be used.
Sounds to me like you've either got the wrong runtime library or the
classes should be usable on your desired J2ME platform. In any case, I
suggest posting on whatever EclipseME formus there are, because JME is a
specialty area that most of us are probably nor familiar with.
Hope this helps,
Eric
|
|
|
|
|
Re: Restrict imports in auto-import prompter [message #182021 is a reply to message #181963] |
Tue, 28 November 2006 18:47 |
Eclipse User |
|
|
|
Originally posted by: eclipse4.rizzoweb.com
Shug wrote:
> Access rules!!! Thanks for that Daniel :-)
>
> Eric: it is not possible to simply remove individual jar files from the
> build path, which is why I posted this question in the first place.
>
I didn't know you could apply access rules at that level - cool.
It is possible to remove individual JARs from a build path, even if they
are part of a Library. You can either edit the Library or create a new
one that does not include the JARs you don't want. I think I explained
how to do that a couple of messages back in the thread.
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.09491 seconds