- This topic has 3 replies, 3 voices, and was last updated 12 years, 8 months ago by
Brian Fernandes.
-
AuthorPosts
-
Hi ,
We want to add some custom tags on the template project in order to extract some specific properties of the persistence model (table name and schema) , I tried with the below code but with no success, on a previous post we accomplish a similar task by an extension point in the plugin on the TableDataTypeInputProvider for changing the names in each of the attributes, I’m using Oracle 11g and MyEclipse 10
Thanks in advance,
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-28824-highlight-camelcase-sid-e78f25cef0701c60d7f5661fd348616a.html
“>
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-28824-highlight-camelcase-sid-e78f25cef0701c60d7f5661fd348616a.html
Java classpackage org.custom.provider; import org.eclipse.jet.JET2Context; import org.eclipse.jet.JET2Writer; import org.eclipse.jet.taglib.JET2TagException; import org.eclipse.jet.taglib.TagInfo; import org.skyway.core.model.data.DataType; import org.skyway.integration.data.persistence.emitter.ITableEmitter; import org.skyway.integration.data.persistence.tags.JPAEmitterTag; public class CustomPersistenceTable extends JPAEmitterTag { public void doAction(TagInfo td, JET2Context context, JET2Writer out) throws JET2TagException { DataType dataType = (DataType) getElementFromXPath( getAttribute("select"), context); ITableEmitter emitter = null; emitter = (ITableEmitter) getEmitter(context, ITableEmitter.class, dataType); out.write(emitter.getTableName()); } }
On the DataType.jet
<%@taglib prefix="custom" id="gaudi.customTags"%> <custom:tableName select="$model" />
On the plugin xml
<extension point="org.eclipse.jet.tagLibraries"> <tagLibrary deprecated="false" id="customTags" name="Custom Generation Tag Libs" standardPrefix="custom"> <emptyTag class="org.custom.provider.CustomPersistenceTable" name="tableName" whenContainingLineIsEmpty="remove" > <attribute name="select" type="xpath" use="required" > </attribute> </emptyTag> </tagLibrary> </extension>
cconwayMemberThe templates are provided so that users can make minor modifications to them and scaffold the CRUD pattern. The level of customization being asked for is not supported by MyEclipse for Spring support. If you can get it to work, then that is great and I commend you, but we are unable to tell you how to achieve every possible customization related task.
The templates are there, and you can use them in that form. Outside of that, I’m afraid you are venturing beyond the intent of the template project.
Cindy,
Our approach for doing custom tags is because some functionalities are not extensible from the actual templates (i.e. Extract only the table name for doing some custom generations for adding sequences to oracle tables). We understand that your company is reusing some of the functionalities that skyway builder provides in order to offer the MyEclipse for Spring, and your support is more for “end users” , but our project goes beyond of the simple crud generation and we would like to have documentation and support on these kind of customizations directly from skyway, is it possible to contact them through you ? or can you give me some contact info for requesting support to them ?
Thanks in advance,
Brian FernandesModeratorAs Cindy stated, your needs go beyond the intended scope of the MyEclipse for Spring application; supporting your customizations within the product is therefore not possible.
As far as support directly from Skyway is concerned, I’m afraid that these features and further work in this area are something that neither Skyway nor Genuitec find viable. Your requests have been discussed with both companies and we cannot provide more support in this area.
I’m sorry I could not be of further assistance, please let us know if you need any additional clarifications.
-
AuthorPosts