Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Creating a Java search scope without creating a project?
Creating a Java search scope without creating a project? [message #648154] Tue, 11 January 2011 09:14 Go to next message
Nicolas Bros is currently offline Nicolas Bros
Messages: 49
Registered: July 2009
Member
Hi,

I'm creating a wizard in which I want to let the user select a type from a list of bundles (or jars).

For this, I'm using JavaUI#createTypeDialog, giving it a IJavaSearchScope.

But I couldn't find how to create a IJavaSearchScope that will look inside jars that are not referenced by projects in the workspace.
I could make it work by creating a project and deleting it afterwards [1], but this is not an elegant solution.

How could I create a IJavaSearchScope without having to create any project?

[1] http://dev.eclipse.org/svnroot/modeling/org.eclipse.mdt.modi sco/plugins/trunk/org.eclipse.gmt.modisco.infra.common.ui/sr c/org/eclipse/gmt/modisco/infra/common/ui/internal/util/Java Utils.java
Re: Creating a Java search scope without creating a project? [message #648164 is a reply to message #648154] Tue, 11 January 2011 09:37 Go to previous message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
On 11.01.2011 15:14, Nicolas Bros wrote:
> Hi,
>
> I'm creating a wizard in which I want to let the user select a type
> from a list of bundles (or jars).
>
> For this, I'm using JavaUI#createTypeDialog, giving it a
> IJavaSearchScope.
>
> But I couldn't find how to create a IJavaSearchScope that will look
> inside jars that are not referenced by projects in the workspace. I
> could make it work by creating a project and deleting it afterwards
> [1], but this is not an elegant solution.
>
> How could I create a IJavaSearchScope without having to create any
> project?
You need a Java project.

Dani
>
> [1]
> http://dev.eclipse.org/svnroot/modeling/org.eclipse.mdt.modi sco/plugins/trunk/org.eclipse.gmt.modisco.infra.common.ui/sr c/org/eclipse/gmt/modisco/infra/common/ui/internal/util/Java Utils.java
>
Previous Topic:Source code path repeatedly lost in debugger
Next Topic:Why doesn't a local variable's IBinding have a declaring class, when in a class initializer?
Goto Forum:
  


Current Time: Sat Aug 23 13:35:55 EDT 2014

Powered by FUDForum. Page generated in 0.04821 seconds