Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Selecting Working Sets for "Open Type Dialog" Programmatically
icon5.gif  Selecting Working Sets for "Open Type Dialog" Programmatically [message #765918] Wed, 14 December 2011 22:22 Go to next message
Kivanc Muslu is currently offline Kivanc MusluFriend
Messages: 153
Registered: November 2010
Senior Member
Hi all,

In Eclipse (as a user), I can select some working sets for "Open Type Dialog" to filter the search results as follows:
- Open "Open Type Dialog"
- Down arrow => Select Working Set...
- Choose all working sets you want and apply them.

My question: can this be done programmatically in a plug-in?
I want:
1- to get the working sets possible for the filter (I guess I can you IWorkingSetManager for this)
2- to programmatically set this filter (i.e., only select some of them for "Open Type Dialog")

Thanks in advance, best regards,

[Updated on: Wed, 14 December 2011 22:22]

Report message to a moderator

Re: Selecting Working Sets for "Open Type Dialog" Programmatically [message #766128 is a reply to message #765918] Thu, 15 December 2011 09:03 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 14.12.2011 23:22, Kivanc Muslu wrote:
> Hi all,
> In Eclipse (as a user), I can select some working sets for "Open Type
> Dialog" to filter the search results as follows:
> - Open "Open Type Dialog"
> - Down arrow => Select Working Set...
> - Choose all working sets you want and apply them.
>
> My question: can this be done programmatically in a plug-in?
> I want:
> 1- to get the working sets possible for the filter (I guess I can you
> IWorkingSetManager for this)
> 2- to programmatically set this filter (i.e., only select some of them
> for "Open Type Dialog")
>
> Thanks in advance, best regards,

Do you really want to "hack" the existing 'Open Type' dialog or rather
open such a dialog from your code? If the latter, use
one of the org.eclipse.jdt.ui.JavaUI.createTypeDialog(...) methods.

Dani
Re: Selecting Working Sets for "Open Type Dialog" Programmatically [message #766134 is a reply to message #766128] Thu, 15 December 2011 09:07 Go to previous messageGo to next message
Kivanc Muslu is currently offline Kivanc MusluFriend
Messages: 153
Registered: November 2010
Senior Member
Dani,

Thanks for the reply. I don't want to open the dialog (I knew how to do that). I just want to change its filter properties programmatically (I guess that was your way of saying hack Smile)

Is it possible (with a clear API)?

Thanks,
Re: Selecting Working Sets for "Open Type Dialog" Programmatically [message #776156 is a reply to message #766134] Sat, 07 January 2012 17:06 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
Kivanc Muslu wrote on Thu, 15 December 2011 01:07
I just want to change its filter properties programmatically (I guess that was your way of saying hack Smile)

Is it possible (with a clear API)?


Yes, specify a TypeSelectionExtension implementation when you create the dialog and implement the getFilterExtension() method to provide your filter.


Re: Selecting Working Sets for "Open Type Dialog" Programmatically [message #776367 is a reply to message #776156] Sun, 08 January 2012 07:14 Go to previous messageGo to next message
Kivanc Muslu is currently offline Kivanc MusluFriend
Messages: 153
Registered: November 2010
Senior Member
Hi Francis Upton,

I am not sure if I understood your solution correctly. I want to change the default behavior of Open Type Dialog that is invoked by shortcut ctrl+shift+T (or through the menu). I am not creating any dialogs myself. Is that still possible?

If so, could you provide some more details?

Thank you,
Re: Selecting Working Sets for "Open Type Dialog" Programmatically [message #776485 is a reply to message #776367] Sun, 08 January 2012 14:51 Go to previous message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
I don't think that's possible. But I'm not the authority on this. I recommend you post a new question with the title "Adding a filter to an Open Type dialog that is invoked by everyone" and explain your question there. Then Dani should see that and can give you a definitive answer.

Previous Topic:Java Build Path - Libraries search
Next Topic:Editors not reflecting Appearance changes in RCP application
Goto Forum:
  


Current Time: Fri Apr 26 01:03:37 GMT 2024

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

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

Back to the top