Open a Wizard from the Palette? [message #241407] |
Sun, 10 February 2008 12:08  |
Eclipse User |
|
|
|
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 02:20   |
Eclipse User |
|
|
|
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 09:06   |
Eclipse User |
|
|
|
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 07:51  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.10232 seconds