Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » Generating Code(Using Sapphire SDK)
Generating Code [message #728684] Fri, 23 September 2011 16:30 Go to next message
Kamesh Sampath is currently offline Kamesh Sampath
Messages: 213
Registered: July 2009
Senior Member
I need to generate few files from my model action, which Sapphire plugin project i need to refer ? I remember Sapphire SDK has code generation facilities.

~Kamesh
Re: Generating Code [message #728692 is a reply to message #728684] Fri, 23 September 2011 16:47 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 942
Registered: July 2009
Senior Member
The bundle your are looking for is org.eclipse.sapphire.sdk.build.processor, but this bundle isn't generally available in runtime environments. Exposing Sapphire's code generation facilities for direct adopter use as part of their model/UI is not in scope for Sapphire. These classes aren't treated as API, etc. None of that would prevent a third-party adopter from including Sapphire SDK in their own runtime distribution, but if this is in the context of the portlet editor that you are working on, you will need to find a different code generation solution as the runtime target of WTP's editors project will not include Sapphire SDK.

- Konstantin
Re: Generating Code [message #728693 is a reply to message #728692] Fri, 23 September 2011 16:48 Go to previous messageGo to next message
Kamesh Sampath is currently offline Kamesh Sampath
Messages: 213
Registered: July 2009
Senior Member
makes sense !
Re: Generating Code [message #728694 is a reply to message #728692] Fri, 23 September 2011 16:49 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 942
Registered: July 2009
Senior Member
For an alternative approach to code generation that is supported in expected runtime configurations, take a look at how Sapphire's CreateJavaTypeActionHandler is implemented using JDT API.

- Konstantin
Re: Generating Code [message #728695 is a reply to message #728694] Fri, 23 September 2011 16:51 Go to previous messageGo to next message
Kamesh Sampath is currently offline Kamesh Sampath
Messages: 213
Registered: July 2009
Senior Member
that's exactly what i was looking for, going by your preferred format i dont want to bring in lot of dependencies Smile
Re: Generating Code [message #728728 is a reply to message #728695] Fri, 23 September 2011 19:29 Go to previous message
Kamesh Sampath is currently offline Kamesh Sampath
Messages: 213
Registered: July 2009
Senior Member
i made it work .. just followed the example of JavaType but for me the case is simple for generating .properties file which i acoomplished with ResourcesPlugin API
Previous Topic:Validation Service
Next Topic:Using multiple source models
Goto Forum:
  


Current Time: Sat Oct 25 15:28:23 GMT 2014

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

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