Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » WIKI Article - Extending Sapphire Wizards(Extending Sapphire Wizards)
WIKI Article - Extending Sapphire Wizards [message #721918] Sat, 03 September 2011 15:36 Go to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
I have posted an WIKI article on to extend Sapphire Wizard and register them using plugin.xml @ http://wiki.eclipse.org/Extending_Sapphire_Wizard

Hope it helps someone and also allows the community to add any additional information/knowledge that I might have missed.

~Kamesh

[Updated on: Sat, 03 September 2011 15:38]

Report message to a moderator

Re: WIKI Article - Extending Sapphire Wizards [message #721980 is a reply to message #721918] Sat, 03 September 2011 21:52 Go to previous messageGo to next message
Nepomuk Seiler is currently offline Nepomuk SeilerFriend
Messages: 88
Registered: December 2010
Member
Hi Kamesh,

Thats a really good start. I've tried the same and came up with a bit another approach, due to the fact that IModelElement cannot be hook up to a Resource after its creation (see: http://www.eclipse.org/forums/index.php/t/237700/)

I really like the support here, so if there's any interest in my code, you can use it:

https://github.com/knowing/Knowing/blob/sapphire-model/de.lmu.ifi.dbs.knowing.ui/src/de/lmu/ifi/dbs/knowing/ui/wizard/SapphireCreateWizard.java

and a reference implementation

https://github.com/knowing/Knowing/blob/sapphire-model/de.lmu.ifi.dbs.knowing.ui/src/de/lmu/ifi/dbs/knowing/ui/wizard/NewDPUWizard.java

cheers,
Muki
Re: WIKI Article - Extending Sapphire Wizards [message #722057 is a reply to message #721980] Sun, 04 September 2011 06:48 Go to previous messageGo to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
thanks for the references Muki, please feel free to update the WIKI page with your updates.

[Updated on: Sun, 04 September 2011 06:49]

Report message to a moderator

Re: WIKI Article - Extending Sapphire Wizards [message #722073 is a reply to message #722057] Sun, 04 September 2011 09:23 Go to previous messageGo to next message
Nepomuk Seiler is currently offline Nepomuk SeilerFriend
Messages: 88
Registered: December 2010
Member
Hi,

I mentioned it in my class and on the Wiki Page, that SapphireWizard<M> declares addPages and performFinish as final, which keeps me of extending this class.

Is it possible to change these declarations in the next release? I'll open a enhancement ticket for this.

[Update]
I choose to comment on this report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=353252

cheers,
Muki

[Updated on: Sun, 04 September 2011 09:29]

Report message to a moderator

Re: WIKI Article - Extending Sapphire Wizards [message #722085 is a reply to message #722073] Sun, 04 September 2011 11:22 Go to previous messageGo to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
Hi Muki,

Before we go ahead and open the ticket did you try using the postPerformFinish() and just use the super.addPage(page) method to add any additional pages that might be required.

Let us know if that solves the problem.

I personally believe that we can remove the modifiers and the subclasses can overide these methods and add their pages either to the front of sdef defined pages or to the back of sdef defined pages, right now if we add our page using super.addPage it will be added only after the sdef wizard pages.

I leave this topic for further brainstrom, and we can decide based on Konstantin's reply as to why they were made final ?

~Kamesh
Re: WIKI Article - Extending Sapphire Wizards [message #722086 is a reply to message #722085] Sun, 04 September 2011 11:25 Go to previous messageGo to next message
Nepomuk Seiler is currently offline Nepomuk SeilerFriend
Messages: 88
Registered: December 2010
Member
Hi Kamesh,

super.addPages(..) won't really fix it, because in my option you first choose your resource and
than configure it. So as you mentioned

Quote:
..,right now if we add our page using super.addPage it will be added only after the sdef wizard pages.


IMHO the final declaration isn't really needed here.

cheers,
Muki
Re: WIKI Article - Extending Sapphire Wizards [message #722088 is a reply to message #722086] Sun, 04 September 2011 11:33 Go to previous messageGo to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
yeah i too feel the same, if we can remove the final modifer on the addPages of the SapphireWizard it can help us to place the pages either before Sapphire Wizard or after the Sapphire Wizard pages. It will give us the deal of extensibility.

I feel good if you can open the ticket for this where we need to remove the final modifiers on "peformFinish" and "addPages" and lets track it to closure. this will also allow Konstantin's view on the same.

An one more correction or suggestion from your Wizard class, if you are using a Model class for Wizard then then model class should be IExcutableModelElement and not just IModel element, please refer to the EZbug sample.

[Updated on: Sun, 04 September 2011 11:35]

Report message to a moderator

Re: WIKI Article - Extending Sapphire Wizards [message #722097 is a reply to message #722088] Sun, 04 September 2011 12:23 Go to previous messageGo to next message
Nepomuk Seiler is currently offline Nepomuk SeilerFriend
Messages: 88
Registered: December 2010
Member
I opend a ticket: https://bugs.eclipse.org/bugs/show_bug.cgi?id=356674

Quote:
An one more correction or suggestion from your Wizard class, if you are using a Model class for Wizard then then model class should be IExcutableModelElement and not just IModel element, please refer to the EZbug sample.


I thought about that. IMHO there's nothing to execute, when you create a file.
However I will change it in my class, because I'm not that deep into sapphire.
Re: WIKI Article - Extending Sapphire Wizards [message #722130 is a reply to message #722097] Sun, 04 September 2011 15:28 Go to previous message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
> I thought about that. IMHO there's nothing to execute, when you create a file.

A wizard represents an operation rather than a file. You might be gathering data to create a file, but you are still gathering that data into the state of an operation that will create a file when user clicks on Finish button... which will execute the operation.

Hope that is more clear. If you take a look at the EzBug sample, IBugReport is the model element that's re-used for file editor, wizard, etc., for the wizard IFileBugReportOp represents an operation that holds an IBugReport.

- Konstantin
Previous Topic:Extending Sapphire Wizards
Next Topic:Dynamic combobox content generated out of the model
Goto Forum:
  


Current Time: Fri Mar 29 11:58:20 GMT 2024

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

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

Back to the top