No matter you are a C programmer, C++ PG, or Java PG, you would like to generate some code automatically by program written by yourself. Here is some materials for this kind of task.
How to build the data structure for your code analyzing?
How to generate code?
How to format the generated codes?
How about your software architecture?
How about your software extensibility?
...
I implementation is to use jEdit and add myself java codes into jEdit to fill my requirement about programming, as code generating and so on.
You can download jEdit from http://www.jedit.org/index.php?page=download.
How to extend jEdit?
One method is to edit View.java as following.
http://astyle.sourceforge.net/
Artistic Style 1.24
A Free, Fast and Small Automatic Formatter
for C, C++, C#, and Java Source Code
Home Page: | |
Project Page: |
Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C# and Java programming languages.
When indenting source code, we as programmers have a tendency to use both spaces and tab characters to create the wanted indentation. Moreover, some editors by default insert spaces instead of tabs when pressing the tab key, and other editors (Emacs for example) have the ability to "pretty up" lines by automatically setting up the white space before the code on the line, possibly inserting spaces in a code that up to now used only tabs for indentation.
Since the NUMBER of space characters showed on screen for each tab character in the source code changes between editors (unless the user sets up the number to his liking...), one of the standard problems programmers are facing when moving from one editor to another is that code containing both spaces and tabs that was up to now perfectly indented, suddenly becomes a mess to look at when changing to another editor. Even if you as a programmer take care to ONLY use spaces or tabs, looking at other people's source code can still be problematic.
To address this problem, Artistic Style was created - a filter written in C++ that automatically re-indents and re-formats C / C++ / C# / Java source files. It can be used from a command line, or it can be incorporated as classes in another C++ program.
There is complete documentation for using Artistic Style. Most documentation is included in the distribution package.
News and Release Notes
Information on the changes in the current release. The News contains information on major changes and how they might affect the use of Artistic Style. The Release Notes contains a list of all changes made to the program. Information on old releases is also listed.
The latest release can be downloaded from the SourceForge file releases page. The green "Download Now" button will, in most cases, download the correct package for your platform. Otherwise you can select the appropriate package from the "Newest Files" list. The OpenVMS and Windows packages contain compiled binaries. Other platforms will need to compile the source code. Makefiles are included for the most popular compilers. Follow the install instructions for the appropriate platform as described in the "Install Information" documentation.
The latest development files can be checked out from the Artistic Style repository using Subversion.
Information on compiling and installing Artistic Style. The Windows and OpenVMS platforms come with a precompiled executable. Other platforms must compile the project. Follow the instructions for the appropriate platform (Linux, Mac, OpenVMS, or Windows).
Artistic Style may be used and distributed under version 3 the GNU Lesser General Public License (LGPL). The LGPL is a set of additional permissions added to version 3 of the GNU General Public License. You can use Artistic Style in free or commercial software without charge. Projects that use Artistic Style do not have to make the source code available. If Artistic Style itself is modified, however, the modified Artistic Style source code must be made available.
This page contains scripts to support the Artistic Style program. They are in various script languages and work on different platforms. It includes scripts to clean the directories of backup files created by Artistic Style.
There are several applications that use Artistic Style as contributed software. It is either embedded in the application or called as a command line program. The applications include Graphical User Interfaces to view the effect of formatting on the source code, development environments for various platforms, and other software.
Artistic Style has compile options for creating a shared library (DLL) or static library for use with a Graphical User Interface (GUI). With the Java Development Kit (JDK) installed it can be compiled as a Java Native Interface (JNI) and called from a Java program. The Developer Information documents the calling procedure and has example programs for C++, Java, and C#.
Bug Reports, Change Requests, Notification
Bug reports and change requests should be submitted to the bug tracker page. It is best to log in to SourceForge before submitting a report so you can be contacted if necessary. Note that code copied and pasted into the bug report will not be indented after the data is submitted. You must indicate the indentation when you submit the request (e.g. replace leading spaces with periods).
New releases are announced through an astyle-announce mailing list. You will receive notification of new releases and important repository commits. No SourceForge user account is needed, but registered site users can subscribe using their SourceForge mail alias. (Mail aliases take the form: username@users.sourceforge.net). The sign-up page can also be accessed from the user support page. There are other ways to subscribe on the file releases page that use an RSS feed. You can use them if you want.
To contact the project by email use the address jimp03@email.com.
Maintainers
Artistic Style is maintained and updated by Jim Pattee. The original author was Tal Davidson, Israel.
Acknowledgments
Thanks to Jim Watson, Fred Shwartz, W. Nathaniel Mills III, Danny Deschenes, Andre Houde, Richard Bullington, Paul-Michael Agapow, Daryn Adler, Dieter Bayer, Sam Cooler, Jim Duff, Emilio Guijarro, Jens Krinke, Eran Ifrah, Travis Robinson, Max Horn, Ettl Martin, Mario Gleichmann, J P Nurmi, Colin D Bennett, Christian Stimming, MrTact, Wim Rosseel for their patches and contributions to Artistic Style.
Thanks to SourceForge for giving Artistic Style its home.
Thanks to all the dedicated beta-testers and bug notifiers!
http://www.codeworker.org/Download.html
CodeWorker 4.5.4, 01may2010 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Platform | Type | Size | Archive | GnuPG signature | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
WINDOWS 98/2000/NT/XP | binaries | 667086 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Any platform (?) | sources | 3278840 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
http://www.codeworker.org/Links.html
Generative programming | |
The summer school aims to give a comprehensive overview of GP as a modern software development methodology. The lectures are given by internationally recognized experts of the area. | |
Definitions, stories and a lot of other topics about Generative Programming. | |
Second International Conference on Generative Programming and Component Engineering (GPCE'03) . | |
A software factory is a product line that configures extensible development tools with packaged content and guidance, carefully designed for building specific kinds of applications. |
Domain-Specific Modeling | |
The DSM Forum exists to spread the knowledge and know-how of Domain-Specific Modeling. DSM raises the level of abstraction beyond programming by specifying the solution directly using domain concepts. | |
A DSM tool to generate full production-quality code from high level design models. | |
The Generic Modeling Environment is a configurable toolkit for creating domain-specific modeling and program synthesis environments. | |
Domain-Specific Languages - an Overview. |
Aspect-Oriented Programming / Subject-Oriented Programming | |
An AspectJ tutorial. | |
Another AspectJ tutorial. | |
AspectJ may take some getting used to, but aspect-oriented programming can be a nice complement to object-oriented programming. | |
This paper intends to extend the AspectJ approach to C/C++, to facilitate aspect-oriented programming with C/C++. | |
It provides practitioners and researchers a comprehensive source of information about Aspect-Oriented Software Development. | |
Subject-oriented programming is a program-composition technology that supports building object-oriented systems as compositions of subjects. |
Code generation | |
The website of a book written by Craig J. Cleaveland, which presents a way to generate source code. | |
Articles, resources, and forums about the code generation, maintained by Jack D. Herrington, the author of Code Generation in Action. | |
This site focuses on the topic in general and the Anticipatory Optimization Generator (AOG) in particular. AOG is a system for translation Domain Specific Languages (DSLs) into efficient code. | |
Free discussion and (sometimes insolent) opinions about advantages and drawbacks of code generation. | |
A return on experience where code generation gave satisfaction (XML + GSLgen). |
A use of CodeWorker is proposed about chess and PGN (format for describing chess games).
Comand to format java code http://www.peterfriese.de/formatting-your-code-using-the-eclipse-code-formatter/