Automatically Code Generation 【自动代码生成】

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

 

 

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.

Documentation

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.  

Download

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.

Subversion

The latest development files can be checked out from the Artistic Style repository using Subversion.

Install Information

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

License

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.

Scripts

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.

Links

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. 

Developer Information

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

CodeWorker_WIN4_5_4.zip

CodeWorker_WIN4_5_4.zip.asc

Any platform (?)

sources

3278840

CodeWorker_SRC4_5_4.zip

CodeWorker_SRC4_5_4.zip.asc

Documentation

Type

Size

Document

Reference Manual

892598

CodeWorker.pdf

Reference Manual

-

Online documentation

Tutorial

-

Practice of parsing and code generation for generative programming

Tutorial

French

Automatiser le développement d'applications; parcours découverte

 

Last Java interface for CodeWorker (version 4.5.4)

Platform

Type

Size

Archive

WINDOWS 98/2000/NT/XP

binaries

725533

CodeWorker_Java.zip

Any platform (?)

The sources are located in the directory "java/src" (download CodeWorker sources). Please read this page about the Java interface for more information.

 

Last .NET assembly of CodeWorker (version 4.5.4)

Platform

Type

Size

Archive

WINDOWS 98/2000/NT/XP

binaries

1775507

CodeWorker_NET.zip

Any platform (?)

To compile it for Mono, the sources are located in the directory "cs/src" (download CodeWorker sources). Please read this page about the .NET assembly for more information.

 

Changes

Date

Type

Caller

Description

30apr2010

feature

-

Manual control against multiple inclusion of a script file: use the #if existFunction preprocessor directive.

30apr2010

feature

-

Preprocessor directives are enriched with #if predicate ... #else ... #end.

 

 

 

 

 

 

 


 

http://www.codeworker.org/Links.html

Generative programming

Summer School, june 2002

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.

Generative Programming Wiki

Definitions, stories and a lot of other topics about Generative Programming.

GPCE'03

Second International Conference on Generative Programming and Component Engineering (GPCE'03) .

Software Factories

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

DSM Forum

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.

MetaEdit+

A DSM tool to generate full production-quality code from high level design models.

GME: the Generic Modeling Environment

The Generic Modeling Environment is a configurable toolkit for creating domain-specific modeling and program synthesis environments.

Domain-Specific Languages

Domain-Specific Languages - an Overview.

 

Aspect-Oriented Programming / Subject-Oriented Programming

Getting started with AspectJ

An AspectJ tutorial.

An Overview of AspectJ

Another AspectJ tutorial.

Aspects, Concerns and Java

AspectJ may take some getting used to, but aspect-oriented programming can be a nice complement to object-oriented programming.

Aspect C++: language proposal

This paper intends to extend the AspectJ approach to C/C++, to facilitate aspect-oriented programming with C/C++.

AOSD.net

It provides practitioners and researchers a comprehensive source of information about Aspect-Oriented Software Development.

Subject-oriented programming

Subject-oriented programming is a program-composition technology that supports building object-oriented systems as compositions of subjects.

 

Code generation

Program generators with XML and Java

The website of a book written by Craig J. Cleaveland, which presents a way to generate source code.

Code Generation Network

Articles, resources, and forums about the code generation, maintained by Jack D. Herrington, the author of Code Generation in Action.

Software Generators

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.

Code Generation is a Design Smell

Free discussion and (sometimes insolent) opinions about advantages and drawbacks of code generation.

When less is more

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/

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值