Skip navigation
Toggle Sidebar

Revision 101 committed to SVN

The first openspaces.org edition of projectcreator has been checked in to svn. 

I am referring to revision 101

This version breaks the various creation tasks into discrete handlers which are executed in sequence and share a common replacements context.

As seen in the file ProjectCreator.java:

ProjectCreator.java -snippet
CommandHandler[] handlers = new CommandHandler[] {projectHandler,
    new SpaceOptionHandler(),
    new PropertiesFileHandler(),
    //new SourceHandler(), replaced by following handlers:
    new DomainCreationHandler(),
    new ServiceCreationHandler(),
    new PUXMLCreationHandler(),
    new AntFileHandler(),
    //end SourceHandler replacements
    new CustomTemplateHandler(),
    new EclipseHandler(),
    new IntelliJHandler()};
for(CommandHandler handler: handlers) {
        replacements.putAll(handler.getReplacements(attrs, br));
    }
    for(CommandHandler handler: handlers) {
        if(attrs.isVerbose()){
          System.out.println("\nINFO: executing \n\n\t"+handler.getClass().getSimpleName()+"...\n");
          System.out.println("INFO: contents of replacements equals: \n"+replacements);
          System.out.println("\t\tHit Enter to continue...");
          System.in.read();
        }
        handler.exec(attrs, replacements);
    }


Add -verbose as a starting argument to create the pause between execution of each handler
Major features of this release are:

1) creates java, pu.xml, build.xml and either eclipse or intellij -specific project files
2) Encourages/forces creation of a shared domain - there are still some issues with this
  a) intellij support for automatic shared domain not yet implemented
  b) eclipse support for automatic shared domain implemented but has a weird bug that forces you to edit the .project file manually after you import the project into eclipse [instructions on what to edit are explicitly provided in the generated .project file itself]
3) supports arbitrary tokens for replacement within all generated files
4) supports the specification of additional files - java files are added to the service package under src/java, non-java files are added to the root of the generated project

Note: when building the projectcreator.jar file be certain to do as I did in the buildjar.cmd file and copy all eclipse-related templates into classes\eclipse before jar-ing.  Eclipse makes a habit of removing the project.launch template...

Docs and screencasts to come.

  January 2008 >>
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Some small changes

Adaptavist Theme Builder Powered by Atlassian Confluence