code-generation

How can I get a list of tables in a SQL Server database along with the primary key using ONLY C#?

Given a database, how can I retrieve a list of Tables along with the primary key of each table? Thanks. Edit: This is for a code generation tool I'm making, I need to somehow run the SQL script using C# only. ...

Are there any .NET tools that can generate forms based on some kind of metadata?

What i want is to describe a form (fields with types, names, validation rules) via some xml or dsl. Then, in the runtime my code feeds this tool with metadata, it generates form (web, win forms, whatever), it's shown to a user, user inputs data, pushes OK, tool calls my code via some delegate with values as key-value dictionary. Of cours...

ANTLR, code generation

The problem is as follows: I have an AST tree, e.g.: ^(IF cond stmt) : { } Now, I would like to generate the code in the following order: if_begin cond stmt if_end So as you can see, IF code encloses the two additional rules. Hence I would like to know, how can I generate such code. I don't want to use return values of cond and s...

Subsonic 2.1 : Way to ignore a column while generating code?

For some reason, a row named "rowguid" with a "uniqueidentifier" parameter was added to some tables on an already existing project. While regenerating the code, I found out that a method named "Insert(string Key)" was used, but doesn't exists anymore (it's now Insert(string Key, Guid varRowguid). Is there a way to "ignore" a column wh...

Code Generator for wrapper classes

Hi guys, Do you know of a tool that generates wrapper class based on another class? EDIT: By wrapper class I mean a class which wraps all exposed(public, protected) properties methods events so that you can put any logic in the middle. My concrete purpose is use it to verify the behavior of the wrapped class. ...

Yii framework "meta db model" creation + postgres inheritance

I have few DB tables, witch are build using inheritance from one table witch is an sort of "template" for creation of new tables, and now i have set of businesses logic methods witch work on columns inherit from template, additional columns are used only as params for presentation of models, they're have no meaning for logic. The goal i...

data entry constructor open source project

I was wondering if there exists some open source toolkit or application for generating one-form data entry applications based on some data model description? Host language is probably irrelevant, and the data-model might be very simple. I know, that it is not very complicated to implement such a constructor, but I do not want to re-inv...

How to automate generating and running input files and parsing output files.

I have tried to do it myself--asking for help on specific functions, but the more I think about the possibilities, the more lost I get. I have some software (quantum chemistry packages). That reads input files and generates output files that are basically clumps of data of the form: Energy:[many spaces]6.3432 H 5 O 33 OHO 32 And weird st...

Generation of Windows forms from databases.

Is there any tools using which I can use to create Windows forms from selecting database table only? ...

Creating a .net webservice stub with xml storage.

I've been asked to come up with a .net web service stub for multiple similar webservices which will: implement create/read/update/delete/find for an arbitrary object. hold persistent xml data for objects of that type. Is there anything out there that does this job already or anything that can make the job of creating it easier? ...

Is it possible to have Netbeans generate hashCode and equals using the Apache Commons HashCodeBuilder and EqualsBuilder?

Netbeans will generate equals and hashCode for you, but I would like the generated methods to use the Apache Commons EqualsBuilder and HashCodeBuilder instead. In Eclipse it's possible using a plugin (Commons4E). How can I accomplish this in Netbeans? ...

Generate PHP code from WSDL (for service replacement)

We have few Web Services witch now are handled by an external application, and we plan to replace them as an new own implementation. Is there some tool/class witch will generate stock php interface and structures 100% compatible with those WSDL's we have now? I'll have to re-implement this wsdl interface, and i have to be sure, that in...

smart automatic C code generator with nested if in python

I'm generating automatic C++ code from python, in particular I need to select some events for a list of events. I declare some selections: selectionA = Selection(name="selectionA", formula="A>10") selectionB = Selection(name="selectionB", formula="cobject->f()>50") selectionC = selectionA * selectionB # * means AND this generate the C...

program/site to generate html form code based on mysql database

I have a mysql databased with many tables and fields. I would like to quickly generate a set of prototype forms based on the mysql database (or create table statements). Anyone have any suggestions? html form code would be great. Full PHP validation and insert updates would be even better. Also Zend framework code would be ideal. I was...

Use perforce to capture current state of external directory

I have a directory outside the repository. I put generated sources in there. These generated sources take FOREVER to create. Rather than have everyone on the team generate these sources, I would like to use our build machine to generate the sources, and check them in to perforce. How do I do this and ensure that the source controlled dir...

Supporting artificial "casting" of generated .Net types

(I applogise in advance for the length of this post, however the problem is fairly complex - hopefully everything is clear however I have simplified the scenario a lot and so there is a good chance that I've missed a vital fact, or there is something that I've not explained.) Setting the scene I'm using code generation to generate C# w...

Is it possible to use Razor View Engine outside asp.net

If I look at the Razor View Engine, then I see a very nice and concise syntax that is not particularly tied to generating html. So I wonder, how easy would it be to use the engine outside asp.net in a "normal" .net environment for example to generate text, code,... Any pointer, example, comment or explanation is welcome. ...

Automatic Code Generation for Strings.xml from Eclipse

I find it a waste of time that every time I need to enter a string that I have to go edit the strings.xml file manually. What I'd like to be able to do ideally is have Eclipse pop up a dialog box that lets me specify the name of the resource and the value for it. Then Eclipse would generate the code in strings.xml and paste the correct...

Why are templates so slow to compile?

Large templated projects are slow to compile, the STL being a main culprit of this it seems from empiric evidence. But, why is it slow to compile? I've optimized builds before by watching for header includes and by combining compilation units, but I don't get why template libraries are quite so slow to compile. ...

How to generate new method or property stub in Zend Studio ?

Is there a way with Zend Studio to generate new method or property stub ? So that if I,m writing code in a php class like $this->SomeMethod('parameter1',$param2); and 'SomeMethod' is a new method I want to write I would like to be able to have the IDE generate this for me: public function SomeMethod($arg1, $arg2) { caret here } Bu...