MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
DevAlternatives
Post subject: Create custom tags for scaffolding  PostPosted: May 28, 2012 - 04:10 PM
Registered Member
Registered Member


Joined: Mar 08, 2012
Posts: 34

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,
[url]
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-28824-highlight-camelcase-sid-e78f25cef0701c60d7f5661fd348616a.html[/code]
[/url]
Java class
Code:

package 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
Code:

<%@taglib prefix="custom" id="gaudi.customTags"%>
<custom:tableName select="$model"  />

On the plugin xml
Code:

<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>
       
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
cconway
Post subject:   PostPosted: Jun 03, 2012 - 02:24 PM



Joined: Apr 04, 2011
Posts: 196

The 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
MyEclipse for Spring Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
DevAlternatives
Post subject: reply  PostPosted: Jun 04, 2012 - 11:03 PM
Registered Member
Registered Member


Joined: Mar 08, 2012
Posts: 34

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,
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Support-Brian
Post subject:   PostPosted: Jun 06, 2012 - 09:20 PM
Moderator
Moderator


Joined: Aug 21, 2004
Posts: 2584

As 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.

_________________
Brian
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits