code-generation

What is the best way to auto-generate INSERT statements for a SQL Server table?

We are writing a new application, and while testing, we will need a bunch of dummy data. I've added that data by using MS Access to dump excel files into the relevant tables. Every so often, we want to "refresh" the relevant tables, which means dropping them all, re-creating them, and running a saved MS Access append query. The first ...

ANTLR: Grammar Test for Optional Parameter (using ? operator)

I have an ANTLR grammar and am defining a function in my language that allows an optional parameter. How can I check whether the optional parameter is passed in or not within the code generation block? I'm basically looking for the syntax to do something like this hypothetical tree grammar statement: myFunc returns [int retval] : 'myFu...

Controlling VS auto-Code formatting

I like single line styles in my content pages...like this .lblLogin {left:14px;top:95px;position:absolute} .lblPassword {left:14px;top:128px;position:absolute} When I drop a new control on a page VS creates generic style classes .Style1, .Style2, etc., after renaming them and making them single line, if I move a control on th...

Tool to generate WSDL 2.0 for RESTful URLs and document schemas?

I need to make a web "service". Since the primary use of this service is going to be to read and write some data that can be encoded as XML documents (the same data both ways), I want to do this as REST interface. Since I will be asked to provide WSDL, is there a tool to ease the pain of this? Is there something that will let me provi...

Can I create server-side Java classes, OR mapping, and client-side AS classes from a single model description?

I have a Java server application and a Flex client application. For my data model, I have typical objects, like User etc., that are basically the same in the database, the server-side Java code and the client-side AS code. I. e., the public fields of my AS and Java classes are named identically, and have the same types and values as the ...

What unit testing tools are being used to test Rhapsody generated C++ code?

I am using the Rhapsody modeling tool to design multi-threaded C++ embedded applications. What unit testing approaches and tools are currently being employed for unit and functional test? Is anybody using the companion unit testing tool for Rhapsody (Test Conductor)? ...

Library to create java stubs for webservice.

Hello. I would like to know if anyone can recommend a good library to generate java webservices stubs as clients. Currently I'm using a product which has embedded a generator which only needs the WSDL and then creates the needed classes and methods. My problems is it throws warnings and doesn't create any method for some webservic...

Sharepoint Code Generation Tool

our team is looking to use a code generation tool for the current sharepoint application we are working on. We want to be able to generate most of the stored procedures and business entities instead of having to write them from scratch. Any recommendation what is the best code generation tool to use with sharepoint projects. I am familia...

Registration Codes/Server Verification & Joomla

This question can be broken up into a couple of parts: What is the best way to create a registration key for a product in PHP (ie. a person purchases a PHP program and after payment receives an activation key) I want to be able to store the registration keys on my server (Joomla) and associate the key with my existing users. Then the P...

Ignore Code Analysis for SqlMetal generated files

I'm developing a C# project which includes a SqlMetal generated file. I'd like to use Code Analysis. I've turned on "Suppress results from generated code" in the Code Analysis options, but it still reports on the SqlMetal classes. Is there some way to turn this off? I'm using Visual Studio 2008 and SqlMetal 2.0.50727.3082 ...

Useful Eclipse Java Code Templates

You can create various Java code templates in Eclipse via the Window->Preferences->Java -> Editor -> Templates e.g. sysout is expanded to: System.out.println(${word_selection}${});${cursor} You can activate this by typing sysout followed by CTRL+SPACE What useful Java code templates do you currently use? Include the name and des...

MSVC++ 6.0: Fatal error C1509 "Too many exception handler states in function"

I'm working on a project that uses a lot of generated files for a GUI. After some recent updates, I get this error. If I remove some controls (the new ones or some old ones, doesn't seem to matter which), the error goes away. I've temporarily worked around the problem, but I'd like a more permanent solution. I've seen mentioned on th...

Java reflection: How do I override or generate methods at runtime?

Hello! It is possible in plain Java to override a method of a class programmatically at runtime (or even create a new method)? I want to be able to do this even if I don't know the classes at compile time. What I mean exactly by overriding at runtime: abstract class MyClass{ public void myMethod(); } class Overrider extends MyCla...

Why does visual studio 2008 break my web page?

I have a aspx page that has a UpdatePanel and a asp timer. the timer tick is the trigger for the update panel. If add anything to the update panel (even a space!) Visual Studio automagically adds the following <Triggers> <System.Web.UI.AsyncPostBackTrigger ControlID="tm1" EventName="Tick"></System.Web.UI.AsyncPostBackTrigger> ...

Simplify Enterprise Architect code generation

Using Enterprise Architect (version 7.5), I'm trying to refine the code generation for C#. To make an attribute with an initial value that is a string generate properly, the only way I've been successful is with the code below. Does anyone know if a simpler way to do this? It currently seems a little bloated. %if attType=="string" and a...

Form builder like Zend_Form_Html or ExtJS Form for JQuery

I was wondering if there is a JavaScript based HTML Form builder, similar to what you can do with Zend_Form_Html or with the ExtJS Forms but based on JQuery? There are several form related plugins but you still have to code every form manually. The idea is, that I usually only want to edit/add single entities from my Domain Model (e.g. i...

Page generation from PHP class

I'm actually creating websites for fun and some of my friends told me that I could be more efficient if I could create the output of the page with a php class that would represent the whole page. I was wondering how you people would do it. Thanks ...

Add partial class with EnvDTE.CodeModel

Hi, I try generate source code from Visual Studio macros using CodeModel. All works fine, but I don't know how to create class with "partial" modifier. I would like to set "partial" via CodeModel, not with text maniuplation in TextDocument. Is it possible? And How? Thanks ...

Auto-generate stub methods that throw in eclipse

Similar to http://stackoverflow.com/questions/46003/how-to-change-generate-method-stub-to-throw-notimplementedexception-in-vs, but for Eclipse instead of Visual Studio Both NetBeans and Eclipse have a function that, if you declare a Java class to implement an interface but omit one or more methods, will automatically generate a stub met...

Is there a tool to automatically generate wrappers around classes ?

I'd like to access some internal classes of the .NET Framework, but using reflection is not very readable, and fun to use. Does somenone know if a tool exists to generate wrapper classes automatically around these internal classes ? ...