code-generation

Java source code generation frameworks [closed]

六月ゝ 毕业季﹏ 提交于 2019-12-03 04:11:15
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. I have a set of Java 5 source files with old-style Doclet tags, comments and annotations. And based on that I would like to write a generator for another set of Java classes. What is the best way to do that? And are there any good standalone libraries for code analysis/generation in Java? Any shared exprience in this field is appreciated. So, far I have found these: JaxME's Java Source Reflection - seems good, but it

Code Generators or T4 Templates, are they really evil?

青春壹個敷衍的年華 提交于 2019-12-03 03:58:57
问题 I have heard people state that Code Generators and T4 templates should not be used. The logic behind that is that if you are generating code with a generator then there is a better more efficient way to build the code through generics and templating. While I slightly agree with this statement above, I have not really found effective ways to build templates that can say for instance instantiate themselves. In otherwords I can never do : return new T(); Additionally, if I want to generate code

Eclipse UML plugin with Java Code Generation

瘦欲@ 提交于 2019-12-03 03:24:42
Does anyone know of a good (read: Free) Eclipse UML plugin that can also do code generation? If not, does anyone know of any good Eclipse UML plugins? EDIT : I'm running Eclipse IDE on Fedora Linux TIA Noob eUML is free (read the license for restrictions): http://www.soyatec.com/euml2/features/ Also Jupe: http://jupe.binaervarianz.de/ I've had some luck creating UML diagrams based on java code with ObjectAid: ObjectAid Download Page . It was made for Eclipse so it should work. However, I don't know if it does code generation... but it makes a pretty picture! The site lays out how to install it

Delphi-IDE: how to change the way class-completion works?

ε祈祈猫儿з 提交于 2019-12-03 03:18:32
Class completion in Delphi is a big time-saver, but I haven't found a way to customize it. I would like a getter and setter for a property to be grouped together instead of being thrown all over my unit; The interface part is generated properly, but the implementation section becomes a mess if you leave things up to the IDE. I want methods to be ordered like this by default: function TAaa.getAaa(); procedure TAaa.setAaa(); procedure TAaa.Baa(); function TAaa.getCow(); procedure TAaa.setCow(); procedure TBbb.getAaa() I want the implementation section to be in the same order as the interface; I

XSD Gen Classes That Reference a Common Type

ⅰ亾dé卋堺 提交于 2019-12-03 02:52:08
I am using XSD's to define my DTO types in C#. I am using XSD.exe to gen the classes from the XSD's. I have a Common.xsd that defines an Address type and I want to use this in more than one class: <xs:complexType name="Address"> <xs:sequence> <xs:element name="Street1" type="xs:string"/> <xs:element name="Street2" type="xs:string"/> <xs:element name="City" type="xs:string"/> <xs:element name="State" type="xs:string"/> <xs:element name="Zip" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:element name="Address" type="mhm:Address"/> I am referencing this in a company XSD: <xs:include

Get Project or Relative Directory with T4

主宰稳场 提交于 2019-12-03 02:34:48
问题 How can I get a reference to the directory of the visual studio project or solution or the directory of the t4 template from within a t4 template? I have a template that concatenates a number of files together which are located relative to the template. I need to get a reference to there absolute location through a relative means. Hard coding an absolute path is not acceptable because the visual studio project will not always be in the same location and this would break the code generation.

is there a simple compiler for a small language

被刻印的时光 ゝ 提交于 2019-12-03 01:55:52
问题 I am looking for a simple compiler that compiles a simple language, I need it to write a paper about it and to learn how compilers work, I am not looking for a sophisticated thing just a simple language (by simple I mean a small code because for example gcc is toooooo big). any help is appreciated. 回答1: If you want to look at code, I'm very impressed with Eijiro Sumii's MinCaml compiler. It's only 2000 lines long. It compiles a pretty interesting source language. It generates real machine

How do I generate C# code from WADL files?

匆匆过客 提交于 2019-12-03 01:33:41
I am looking for a code generator than can generate C# code to access RESTful web services described by WADL files in a way similar to how wadl2java works. Doing som searching I came across the rest-api-code-gen project on Google Code, but although the latest source does in fact support C#, the REST Describe & Compile demo site does not. (The C# button is there, but it's disabled.) I realize I could download the source and set up my own server with the latest version, but I would prefer not to, as what I need is a command line tool and not a web application with dependencies to Google Web

Using T4 Templates to Generate multiple classes based on POCO

佐手、 提交于 2019-12-03 00:43:53
Im looking for a way to increase productivity when I add a table to my database. Generally, when I add a new table I have to perform the following steps. Add table to the database (simple) Create the corresponding EF Code First class. (i dont use db migrations) Create a POCO model that matches the EF class created in #2. Create repository class Create Commands and Handlers for CQRS pattern Create AutoMapper maps for the newly created classes I recently created a new website where the requirements were to use EF Database first and I saw how it was using the tt files to generate the classes.

What is scaffolding? Is it a term for a particular platform?

流过昼夜 提交于 2019-12-03 00:18:53
问题 Scaffolding, what is it? Is it a Rails-only thing? 回答1: Scaffolding generally refers to a quickly set up skeleton for an app. It's not rails-only since other platforms have it as well. It's also not generally meant to be a "final" system; merely the first, smallest way to do it. 回答2: From Wikipedia: Scaffolding is a meta-programming method of building database-backed software applications. It is a technique supported by some model-view-controller frameworks, in which the programmer may write