Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Open a Wizard from the Palette?
Open a Wizard from the Palette? [message #241407] Sun, 10 February 2008 17:08 Go to next message
Fredrik Robertssen is currently offline Fredrik RobertssenFriend
Messages: 22
Registered: July 2009
Junior Member
Hi,

I wonder if it is possible to add an entry to the palette that uses a
wizard to create an element. I currently don't mind where the created
element is positioned, but wonder from which place (and which kind of
entry) i may call a wizard dialog.

Thanks in advance,
Fredrik
Re: Open a Wizard from the Palette? [message #241412 is a reply to message #241407] Mon, 11 February 2008 07:20 Go to previous messageGo to next message
Xiang Qinxian is currently offline Xiang QinxianFriend
Messages: 119
Registered: July 2009
Senior Member
Hi,

Normal there 2 ways handle this:
1, like normal behavior in GEF editor, click in Editor figure, handle a
location and bound, then trigger a wizard,
just in paletteRoot configure class/method create a CreationTool subclass :
CreationToolEx extends CreationTool {
@Override
mouseDoubleClick...
}
@PaletteRoot,
componentsDrawer.add(newTemplateEntry(...));
protected CombinedTemplateCreationEntry newTemplateEntry(... descripitors) {
CombinedTemplateCreationEntry creation = new
CombinedTemplateCreationEntry(...);
creation.setToolClass(CreationToolEx.class);
return creation;
}

2, handle palette EditPart, in this way, need handle
org.eclipse.gef.ui.palette.PaletteViewer
customerize it with an extended PaletteEditPartFactory,
override some intrested cretioneditpart method:
such as createXEditPart(EditPart parentEditPart, Object model) method,
f.e. createEntryEditPart
pass a new PaletteEditPart subclass,
ofcause in customerized PaletteEdtiPart need override some methods like
this:
@Override
public void performRequest(Request req) {
//start a wizard
}

if the 1st way filled requirements, recommemded.

Cheers,
Xiangya



Fredrik 写道:
> Hi,
>
> I wonder if it is possible to add an entry to the palette that uses a
> wizard to create an element. I currently don't mind where the created
> element is positioned, but wonder from which place (and which kind of
> entry) i may call a wizard dialog.
>
> Thanks in advance,
> Fredrik
>
Re: Open a Wizard from the Palette? [message #241506 is a reply to message #241412] Thu, 14 February 2008 14:06 Go to previous messageGo to next message
Fredrik Robertssen is currently offline Fredrik RobertssenFriend
Messages: 22
Registered: July 2009
Junior Member
Hi Xiangya,

Your recommended solution nr. 1 worked nicely.

Thanks for your help!

Fredrik


Qinxian wrote:

> Hi,

> Normal there 2 ways handle this:
> 1, like normal behavior in GEF editor, click in Editor figure, handle a
> location and bound, then trigger a wizard,
> just in paletteRoot configure class/method create a CreationTool subclass :
> CreationToolEx extends CreationTool {
> @Override
> mouseDoubleClick...
> }
> @PaletteRoot,
> componentsDrawer.add(newTemplateEntry(...));
> protected CombinedTemplateCreationEntry newTemplateEntry(... descripitors) {
> CombinedTemplateCreationEntry creation = new
> CombinedTemplateCreationEntry(...);
> creation.setToolClass(CreationToolEx.class);
> return creation;
> }

> 2, handle palette EditPart, in this way, need handle
> org.eclipse.gef.ui.palette.PaletteViewer
> customerize it with an extended PaletteEditPartFactory,
> override some intrested cretioneditpart method:
> such as createXEditPart(EditPart parentEditPart, Object model) method,
> f.e. createEntryEditPart
> pass a new PaletteEditPart subclass,
> ofcause in customerized PaletteEdtiPart need override some methods like
> this:
> @Override
> public void performRequest(Request req) {
> //start a wizard
> }

> if the 1st way filled requirements, recommemded.

> Cheers,
> Xiangya



> Fredrik 写道:
>> Hi,
>>
>> I wonder if it is possible to add an entry to the palette that uses a
>> wizard to create an element. I currently don't mind where the created
>> element is positioned, but wonder from which place (and which kind of
>> entry) i may call a wizard dialog.
>>
>> Thanks in advance,
>> Fredrik
>>
Re: Open a Wizard from the Palette? [message #630865 is a reply to message #241506] Tue, 05 October 2010 11:51 Go to previous message
Anil Soni is currently offline Anil SoniFriend
Messages: 3
Registered: October 2010
Junior Member

Hi Xiangya,

I'm new to Eclipse plug-in development. I am developing a Eclipse plug-in where I am populating contents of an XML file in a Wizard in Tree View, now from that wizard I want to select some XML elements and on click of Finish button of the Wizard, I want all the selected XML elements of wizard should be available in the Palette (a view panel like Outline or Task list).

In general I want to generate a Palette on click of Finish Button of a Wizard. Anyone can please help me on this.


--
Anil Soni
Previous Topic:GEF EditPartViewer selection
Next Topic:UI tool image convertion
Goto Forum:
  


Current Time: Fri Apr 19 19:37:42 GMT 2024

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

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

Back to the top