Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to create a window similar to "Generate Getters and Setters"
How to create a window similar to "Generate Getters and Setters" [message #777021] Mon, 09 January 2012 17:01 Go to next message
Lucy Sakhnenko is currently offline Lucy SakhnenkoFriend
Messages: 41
Registered: March 2011
Member
Hi,

My plugin has an action for which I would like to open a window similar to the ones when we click "Generate Getters and Setters" or "Override/Implement Methods".

I would like to have the same "Select All" and "Deselect All" buttons to select actions to be performed.

I'm struggling to find out how to start or where to look in order to build this window.

I would appreciate any advice and guidance you guys can give me.

Thanks!
Re: How to create a window similar to "Generate Getters and Setters" [message #777574 is a reply to message #777021] Tue, 10 January 2012 18:20 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
The best way to learn might be to look at the source code of this dialog:
http://www.java2s.com/Open-Source/Java-Document/IDE-Eclipse/jdt/org/eclipse/jdt/internal/ui/dialogs/SourceActionDialog.java.htm
Re: How to create a window similar to "Generate Getters and Setters" [message #777582 is a reply to message #777574] Tue, 10 January 2012 18:57 Go to previous messageGo to next message
Lucy Sakhnenko is currently offline Lucy SakhnenkoFriend
Messages: 41
Registered: March 2011
Member
Thanks, it actually looks very good and helpful.

I saw that SourceActionDialog is extended by several classes, for example, OverrideMethodDialog. Please let me clarify how to use it.

Should If just create an instance of a Dialog in one of my actions? If so, how can I use constructors like
public OverrideMethodDialog(Shell shell,
CompilationUnitEditor editor, IType type, boolean isSubType)

?

Thanks!
Re: How to create a window similar to "Generate Getters and Setters" [message #778417 is a reply to message #777582] Wed, 11 January 2012 18:07 Go to previous message
Eclipse UserFriend
Hi,

One possibility is to use the CheckedTreeSelection dialog out of the box.

Below is a snippet from the UI Guidelines
(http://wiki.eclipse.org/User_Interface_Guidelines).

CheckedTreeSelectionDialog dialog = new
CheckedTreeSelectionDialog(window.getShell(), getLabelProvider(),
getContentProvider());
dialog.setTitle("Tree Selection");
dialog.setMessage("Select the elements from the tree:");
dialog.setInput(getInput());
dialog.open();

That being said, I am not clear on what your problem is. Maybe a general
tutorial is what you need.
If so, work through this one from Mr. Vogel:
http://www.vogella.de/articles/EclipseCommands/article.html

Regards,
-W
Previous Topic:how to write Custom Builder
Next Topic:Custom Navigator: Error Message (Required filter missing)
Goto Forum:
  


Current Time: Tue Sep 29 00:28:35 GMT 2020

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

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

Back to the top