code-generation

How to pick bitflag values?

I have a set of options, some orthogonal (can be combined in any combination), some exclusive (only one from the set is allowed), and need to pick a set of enum values so that they can be combined with bit-wise or and extracted with bit-wise and. I would prefer that or-ing invalid combination would be detectable. Are there any tools for...

How to retrieve metadata for return values of an sql server stored procedure

I want to analyze an SQL Server stored procedure from .NET code to retrieve metadata for the data/columns it returns (not OUTPUT parameters). Like when you drag/drop a sp on a DataSet i VisualStudio and it automatically generates columns. It could be useful for me for some code generation I'm testing out. The procedures contains simple...

How can I create a wizard in .NET?

How can I write a wizard in Visual Studio/.NET to generate code and insert it in a form? ...

Overriding line number in generated Java source

Is there any way to override the line numbers in Java (e.g., by using some kind of preprocessor directive)? I am "compiling" a high-level language, down to Java byte code using Janino. I need compiler errors to report the line from the original file, not the generated Java code. C# has the #line directive, and I've successfully exploi...

What criteria have you used to determine whether or not to implement a Software Factory?

I was discussing with a co-worker the other day the similarities of implementing a Software Factory for your development organization vs. using more of a scaffolding solution like active record. We both thought that implementing a Software factory may be considered by some to be a good idea when you have a larger group of developers and ...

Recommended VB.NET Code Generators

Can someone recommend some good VB.net code generation tools? I only need a tool for developing desktop applications. So the web side of things doesn't really concern me too much. ...

Is LLBLGen similiar to codesmith?

Hi, Is llblgen just like codesmith? Is there any tool out there that will create all the CRUD plumbing for you? And all queries on tables that you can filter by primary key (like Get a user by ID) or by foreign key (get user addresses by UserID if the address table has userID in it) etc. DO code generators do more than the above? ...

Can I query the parameters and "selected" column names from a stored procedure?

I am trying to write a custom code generator that can parse stored procedures. I wrote a few regex, but they don't seem to work all the time. I do have access to the database; does a system query exist that will return the required parameters and possible return values? I have played around with sp_depends, but it does not seem to includ...

Domain Specific Language for Business Objects?

I'm thinking of writing a domain specific language (DSL) to model business objects. The DSL will not be executed, instead it will be used by a template based code generator (probably CodeSmith) to generate the .NET & SQL. The DSL will need to support the definition of the following elements: Classes (name & description) Properties (na...

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

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

Generating your LINQ-to-SQL datalayer

I usually use Codesmith & NetTiers for my datalayers, and as they can be run from the command line it just requires a simple batch file to regenerate / rebuild everything whenever changes are made to the database. Now I'm looking at LINQ-to-SQL, but I'm not finding the WYSIWYG entity designer as convienient. What other methods are avail...

C# Code Generation

I am looking at creating a small class generator for a project. I have been reading about CodeDOM so it the semantics of creating the classes does not appear to be an issue, but am unsure oh how to best integrate the generation into the development and deployment process. How should I trigger the creation of the classes? I have read...

C# CodeDom Automatic Property

I have a property created with CodeDom. How can I set it to being an automatic property instead of adding CodeFieldReferenceExpressions against a private member? ...

STEP/EXPRESS tools for .NET

Hi, Has anyone had any experience with using the STEP and EXPRESS formats in a .Net environment? I am looking for a tool that will generate a c# class structure based on an EXPRESS schema. I would also like the tool to create a parser/file generator for importing and exporting to STEP-files. Does anyone know of a tool that does this? ...

When generating code, what language should you generate?

I've worked on a number of products that make use of code generation. It seems to be the only way to achieve both a high degree of user-customizability and high execution speed. The downside is that we are requiring users to install a compiler (primarily on MS Windows). This has been an on-going headache, because vendors like MS keep ...

Has anyone used any .Net code generation frameworks in Mono? (Subsonic, .netTiers, etc..)

Mono appears to have really come a log way since the last time I really used it. I'm interested in doing some ASP.Net development using Mono. I have used .netTiers/CodeSmith at work and really enjoy the speed with which code generation gives you a clean working data access layer. The question is has anybody used any code generation wi...

Generating DLL assembly dynamically at run time.

Hello World! :-) I have an interesting challenge that I'm wondering if anyone here can give me some direction. Currently I have some code that is being generated dynamically. Another words a C# .cs file is created dynamically by this program, and the intention is to include this C# file in a project where you want to use it. The chal...

.net code generation solutions: how can I write less code?

What solutions are there to avoid writing repetitive code? For example code generators, etc. More specifically for translating objects between the several tiers of my application (from one service to another, from the service to the client (ObservableCollections etc)). Of course more generic solutions are also welcome. ...

Best Python templating library to facilitate code generation.

It's been awhile since I've done something like this and it seems that everyone and their grandmother has created a templating library for python, from Mako, Cheetah, Genshi, etc... Instead of me spending the next day (or year) reading about them all, any suggestions for templating engines that I should look into in more detail? Thanks...

.Net - Detect if desired identifier is a keyword

Is there a way, in .net, to detect if a word is a keyword in a given .net language? I am using a fairly simple code generator for this project, and I would like to start automating it. Right now I do each one by hand, so fixing any issues that arise is pretty easy. However, once this starts happening automatically I am going to need...