facebook

Customizing the templates

  1. MyEclipse Archived
  2.  > 
  3. Documentation
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #215028 Reply

    Where do I find documentation on how to customize the templates used to generate class files?
    I found the XSLT files. They don’t help at alll. I want to get rid of the two comments that appear at the top of a file, and replace them with the company standard header. Can’t find those. I have to completely redo your class level comments to company standard.

    Actually… why in the world didn’t you guys use the eclipse code generator. I have that setup to generate code the way I want it. Now I have to do it all over again, thank you. Because of this, I use your product primarily as a jsp editor, and tomcat controller. The rest of your product is useless to me becuase it’s actually faster to use the elicpse code generators then it is to use yours, and then copy, paste and modify it.

    #215029 Reply

    Riyad Kalla
    Member

    Grim,
    I believe the templates you might be looking for are here (I’m assuming Struts templates, I didn’t see you specify which one was the problem): <myeclipse install dir>\eclipse\plugins\com.genuitec.eclipse.wizards_3.8.1\Templates

    And as you aptly pointed out our templating system desperately needs a front end for user editing. On the backend of things we are moving over to velocity and will quickly followup with a front end for editing the templates. There is no ETA for this, but is an open enhancement we hope to address soon.

    We appologize for the inconvenience, that is the opposite of what we are trying to accomplish with ME and our J2EE tools. I hope you find some of the other functionality useful however.

    #215043 Reply

    Scott Anderson
    Participant

    Grim,

    Actually… why in the world didn’t you guys use the eclipse code generator.

    Mainly because it is marked *internal* within the JDT so it is explicitly *not an API* and therefore not intended to be or written to be usable by classes outside the Eclipse JDT.

    #215052 Reply

    Paul
    Participant

    @support-rkalla wrote:

    And as you aptly pointed out our templating system desperately needs a front end for user editing. On the backend of things we are moving over to velocity and will quickly followup with a front end for editing the templates. There is no ETA for this, but is an open enhancement we hope to address soon.

    Is there any possibility of allowing user created templates, and then the wizard picking up those possible fields, and presenting a gui for those new templates?

    A couple of interesting plugins I’ve seen that may be relevant are http://quigen.sourceforge.net/ and http://simteec.sourceforge.net/. Both of these I believe are also based on Velocity.

    #215053 Reply

    Scott Anderson
    Participant

    Thanks for the links. As Riyad mentioned in his post, we’ll be going to a full Velocity-based templating mechanism in the future as well. Perhaps contacting these authors would be a good starting point.

    Have you used one or both of these extensively? If so, what’s your review of it with respect to features and product quality?

    #215111 Reply

    Paul
    Participant

    I haven’t used either, though I’ve been thinking about installing simteec. That one appears to be the most complete and mature to me, though that is just my own uninformed opinion. It parses a user created template file and with that fills in the required values from a user created properties file, and this results in the desired output file.

    It would be nice to have a wizard that could read and parse one of these template files, and then prompt for the necessary values – as opposed to creating the properties file. This would certainly fill a lot of random holes people have in regards to desired features/wizards. Maybe you (myEclilpse) could even create a repository of sorts where people drop their own templates for others to use (Spring/iBatis/etc…)

    #215127 Reply

    Why not use the PDE generator templating mechanism, which is built into 3.0? Specifically the JET portion?

    #221083 Reply

    aluepke
    Member

    Hi,

    I am not sure, if this thread is still of any interest, but in case
    you are still searching for a solution, I just wanted to let you know,
    that I would be happy to help you if you are interested in
    using Simteec (or parts of it) for your project.

    Best regards,
    Andre

    (Founder of Simteec)

    #221117 Reply

    Riyad Kalla
    Member

    aluepke,
    We always looks for opportunities to work with others (assuming we have the bandwidth available to take on another task). I have passed your offer along.

    On a side note your plugin looks most promissing, I like that its a generic approach for all templating, not a specialized “EJB”, “Hibernate”,etc-ONLY approach. Thank you again for the offer.

    #224266 Reply

    Coignition-1
    Member

    Hi

    I’m trying to create a selection of class templates for my company and by the looks of your forums I’m not the only one interested in this feature. I’ve seen the posts based on the com.genuitec.eclipse.wizards_x.x.x\Templates solution but this doesn’t work for class files right?

    Here’s what I’d love to see:
    User goes to File->New then sees my companies name as one of the options (If not possible they see it as a folder under ‘Other’)
    Then in this folder is a selection of my templates
    This is basically what Netbeans’s template feature gives you.

    Has this feature been released since this thread?
    If not there seems to be lots of posts about this over the last year is there a single one I should monitor?

    Thanks
    des

    #224283 Reply

    Riyad Kalla
    Member

    des,
    It seems you can do this manually by reading the document here <MyEclipse install dir>/eclipse/plugins/com.genuitec.eclipse.wizards_3.8.4/docs/index_en.html

    and then editing the Templates in the template dir… I have no done this before however so I can’t offer much guidence.

    #224671 Reply

    Coignition-1
    Member

    Riyad

    Thanks for the reply. The problem I have with this current template solution is that it only works for certain types of file JSP, XML etc and the type I’m really interested in, java class files, isn’t supported – or am I mistaken?

    Scott had mentioned you were working on a more complete solution, is there any update on that?

    Thanks
    des

    #224677 Reply

    Riyad Kalla
    Member

    des,
    I don’t have any information pertaining to the customized templates, sorry.

    #228155 Reply

    Coignition-1
    Member

    Hi Guys

    Is there any update on this? Anything planned for 4.0?

    Thanks
    des

    #228159 Reply

    Riyad Kalla
    Member

    Anything planned for 4.0?

    Not related to customized templates, but in the grant scheme of what IS comming in 4.0… that is a lot like getting ready to use Windows XP over Windows 98 and asking if Icon Editing has been improved 😀

Viewing 15 posts - 1 through 15 (of 15 total)
Reply To: Customizing the templates

You must be logged in to post in the forum log in