code-generation

access forms as asp.net's listview

I made an access vba application where all my architecting was simply creating a one-to-many relationship between a "status" table and a "data" table that contained all the other details of my record. Created a form with the single click of a button with my "status" table open, and wallah,,, I got a form for my open or closed records th...

Is there something like .NET's T4 for Java?

I'm helping a friend develop a Java application. They are a non-MS shop. I was tasked to write some repetitive code, so naturally as a .NET dev I thought of using T4. But I'm stuck on Java/Eclipse (and no C# is allowed) so what are my options? What do Java people use for code generation? Build tasks? ...

Does visual studio 2010 unlimited modeling project do reverse engineering?

Does visual studio 2010 unlimited modeling project do reverse engineering? How about code generation from the UML models? I am playing around with it and it makes beautiful UML class diagram but I can't find any options to create code templates based on them. ...

AOP or APT for overriding methods from super classes

I have a large library of wicket components that are annotated with a custom annotation @ReferencedResource or another annotation @ReferencedResources, that has a ReferencedResouce[] value() parameter to allow multiple annotations. Here is a sample code snippet: @ReferencedResources({ @ReferencedResource(value = Libraries.MOO_TOOLS...

Netbeans Change Implement code

When Netbeans automatically implements abstract methods it generates a code something like this: new Example() { public void doSomething() { throw new UnsupportedOperationException("Not supported yet."); } }; Is it possible to remove that error throwing part from the template so next time when I use this feature it won...

How to generate c# code?

I'm writing a desktop application. It would need to generate c# code on client machines. I thought of using CodeDOM (complex) or simple string manipulations (fragile). What else? Which way is recommended? ...

Compile Time Code Generation in D

I'm currently learning D, and one of the things I've wondered about is whether D has a way of duplicating the code generation capabilities of JVM languages. Here's a scenario: I have an object, and I want to generate a string based on that object that gives it's name and all its fields. In Java/Scala, I could just use reflection, but su...

Using generics with com.sun.codemodel

Using com.sun.codemodel, I would like to generate a generic LinkedList field. I can create a raw field using this code: JDefinedClass masterClass; String detailName; JDefinedClass detailClass; JFieldVar detailField = masterClass.field(JMod.PRIVATE, LinkedList.class, detailName); But I could not find a way to create a LinkedList with a...

How to validate generated Java code's syntax?

I made a little app to generate Java test classes based on certain set of information. Basically, I am generating the boilerplate code needed for a library that we are using. I would like to test the generated code in better way than just comparing the output to an expected string. Is there any facility to test if the Java code conta...

Building RIA services project without Visual Studio

I'm trying to build RIA-enabled Silverlight project on the continuous integration server. There is no Visual Studio installed on it. Therefore I'm missing some libraries/targets. What needs to be installed in order to build RIA project with only MSBuild? ...

GUI from XML+Schema

Hello. I have a complex XML+Schema to configure my system. I'm looking for a quick and dirty way to give my users access to that XML but in a simple GUI that also validates the entries. Is there some tool that can generate GUI (preferably C#) from the XML ? Thanks, SW ...

Any framework can generate forms from database schema?

As titled, in any language. Just do not want to miss any great framework. CakePHP - scaffolding django web2py ...

VS 2010: automatic declaration of controls in code-behind (*.designer.cs) files, when those are in a separate project - how?

In a simple web application project, when adding new controls to an *.aspx file, Visual Studio generates a corresponding declaration of that same control in the *.designer.cs file. This works well (at least most of the time, as some might know) ;-) Now, we have a more complex setup where we've decided to move all code-behind files to a ...

Does IntelliJ IDEA have a Create Wrapper code generator

If I have an interface with a few methods. Sometimes I need to create a new implementation of the interface which wraps another instance of the interface and delegates most of the methods to the wrapped instance. Then I would change a couple of the implementations, maybe not delegating them. A classic example would be the Collections....

how do i parse a dtd file

I want to parse a dtd file and use the info I get from that to create some classes. I know that I can convert it to a xsd and then parse it, but I was hoping to avoid that. Everything I find via google is to validate against a dtd. So I guess my question is: How do I parse a dtd file using c# or are there any tools or libraries out the...

reverse engineer/create c# interface from sql server table

does anyone know how of a tool where I can point to my sql server database and it reads the schema and generates c# interface classes from the tables? for example - say I have a table called 'Customers' with a "Name" column, "Address" Column and a "Phone" column it would generate a ICustomer.cs file with string Name {get;set;} string Ad...

javascript/jQuery code generator

I'm wondering if there is a tool out there that does any javascript code generation. I'm asking because the team I'm on are not web developers. They are VB6 developers. We are looking at a AJAX, JavaScript/jQuery, JSON, webservices model and was wondering if there were any tools that would provide the basics for JavaScript template...

qt qmake extra compilers with dependencies among generated files

Can qmake handle dependencies of generated source files? We have a prf file like this: idl_h.name = Generate .H file for ${QMAKE_FILE_BASE}.idl idl_h.input = IDLS # variable containing our input files idl_h.variable_out = HEADERS idl_h.commands = <command that takes .idl and genrates .h> idl_h.output = $$IDL_GEN_DIR/${QMAKE_FILE_BASE}...

T4 code generation template not behaving

I have a template fragment that looks like this: <#+ if (length == "0") #> return record.Substring(offset); <#+ else #> return record.Substring(offset, <#= length #>); When length != "0" it works fine, but when it is "0" it emits the record.Substring(offset); code ok but is then followed by the text "0);" (without the double-quote...

Can I define properties in partial classes, then mark them with attributes in another partial class?

Is there a way I can have a generated code file like so: public partial class A { public string a {get; set;} } and then in another file: public partial class A { [Attribute("etc")] public string a {get; set;} } So that I can have a class generated from the database and then use a non-generated file to mark it up? ...