Skip to main content


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 14:14 Go to next message
Nicolas Bros is currently offline Nicolas BrosFriend
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 14:37 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
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: Fri Mar 29 12:28:39 GMT 2024

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

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

Back to the top