Getting the Selection from NEW wizard in Eclipse [message #641140] |
Wed, 24 November 2010 07:03  |
Eclipse User |
|
|
|
Hi Guys,
I have added a new Wizard entry in my plugin.xml which goes like this
<wizard
name="Workflow"
icon="icons/bpd.gif"
category="com.***.bpdesigner"
class="com.***.bpdesigner.BPCreationWizard"
id="com.***.bpdesigner.WorkflowCreationWizard">
<description>
Creates a workflow
</description>
<selection
class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
What I want to do is to somehow check in BPCreationWizard.java (the configured class, which is instantiated by the new wizard) which FILE TYPE was chosen from the new Wizard dialog.
We are using "BPCreationWizard" as the class name for two different file types viz. Microflow and Workflow.
The only way forward as of now is to extend another class from BPCreationWizard which will set a flag saying that it is a workflow and mention this class in Workflow configuration in plugin.xml .. but having a new class which delegates most of the work to the base class does not sound good.
Is there any way by which I can figure out in MY WIzard class as to which OBJECT was selected in the NEW wizard??
When I click next my configured class is instantiated. So in the constructor of "BPCreationWizard" I want to somehow see which item was selected from the NEW wizard.
I am a newbie on plugin development; any help would be appreciated.
Thanks,
Ragz
[Updated on: Wed, 24 November 2010 11:26] by Moderator
|
|
|
|
Re: Getting the Selection from NEW wizard in Eclipse [message #641364 is a reply to message #641140] |
Thu, 25 November 2010 03:17  |
Eclipse User |
|
|
|
On 24/11/10 5:33 PM, Anurag wrote:
> Hi Guys,
>
> I have added a new Wizard entry in my plugin.xml which goes like this
>
> <wizard
> name="Workflow"
> icon="icons/bpd.gif"
> category="com.***.bpdesigner"
> class="com.***.bpdesigner.BPCreationWizard"
> id="com.***.bpdesigner.WorkflowCreationWizard">
> <description>
> Creates a workflow
> </description>
> <selection
> class="org.eclipse.core.resources.IResource">
> </selection>
> </wizard>
>
> What I want to do is to somehow check in BPCreationWizard.java (the
> configured class, which is instantiated by the new wizard) which FILE
> TYPE was chosen from the new Wizard dialog.
>
> We are using "BPCreationWizard" as the class name for two different file
> types viz. Microflow and Workflow.
>
> The only way forward as of now is to extend another class from
> BPCreationWizard which will set a flag saying that it is a workflow and
> mention this class in Workflow configuration in plugin.xml .. but having
> a new class which delegates most of the work to the base class does not
> sound good.
>
> Is there any way by which I can figure out in MY WIzard class as to
> which OBJECT was selected in the NEW wizard??
>
> As I have selected Work Flow in the picture below:
>
>
> When I click next my configured class is instantiated. So in the
> constructor of "BPCreationWizard" I want to somehow see which item was
> selected from the NEW wizard.
>
> I am a newbie on plugin development; any help would be appreciated.
You wizard could implement IExecutableExtension and then pass on the
type from the plugin.xml.
--
- Prakash
Platform UI Team, IBM
www.eclipse-tips.com
|
|
|
Powered by
FUDForum. Page generated in 0.03768 seconds