Welcome, Guest! Log In | Create Account

Contributor Guide

From textuml

Jump to: navigation, search

Contents

Important links

  • Documentation - make sure you are familiar with the TextUML Toolkit Documentation.
  • Forum - if you have problems doing any of what is described below, don't hesitate to ask for help on the support forum.
  • Bug reports - found a bug or looking for areas to contribute? The issue tracker is the place to go.

Info for testers

  1. keep the Error Log view open so you can monitor any logged errors during operation. You can also set it to activate on log events by default - it is available on the drop down menu on the top right side of the view.
  2. please report any problems you might find using the issue tracker
  3. please provide any exceptions you see (they will be in the log, and some might generate error dialogs too).
  4. attach screenshots if necessary/helpful.
  5. the documentation on the tool and notation features provide a good basis for testing.
  6. we are not only looking for error reports, but general feedback too. Feel free to share your opinion on what you think sucks, or missing features (given the tool goal, which is to support creating models that are suitable as input for code generation). Feedback on the web site and documentation is very welcome too.

Info for developers

This section is intended for people developing or contributing patches to the TextUML Toolkit project, not for end users. It describes how to configure a development environment in order to properly build the TextUML Toolkit from the source code.

Requirements

  • Java 5 or later
  • Eclipse SDK 3.5 (download)
  • EMF SDK 2.5 (from Galileo update site)
  • EMF Data Integrity Frameworks Extender SDK 1.3
  • UML2 Extender SDK 3.0 (from Galileo update site)
  • a Subversion client

You can easily obtain EMF, UML2 and even Subversive, a Subversion client for Eclipse, using update manager.

Checking out the source code

Download this team project set file and import it into Eclipse.

Generating code

The TextUML Toolkit depends on a good amount of generated code. The generated code is not checked into the repository, so every developer needs to trigger the code generation in order to have the full source code available.

UML meta-model extensions

  • open the /com.abstratt.mdd.core/models/meta.genmodel file using EMF GenModel editor
  • if you have just checked out, you will get an editor with two tabs, "Generator" and "Problems", with an error message on the second saying a file named meta.ecore does not exist. To fix that, do the following:
    • select the "Generator" menu on the top menu bar and select the option "Reload"
    • on the first page, select "UML model" as the model importer
    • skip the second page ("UML Import")
    • on the third page ("Package Import"), make sure "com.abstratt.mdd.core.meta" is selected as a root package, and hit "Finish"
    • close meta.genmodel and reopen it, the error page should be gone
  • right-click the root node (Meta)
  • choose "Generate Model Code"

This should (re-)generate the implementation of the meta-model extensions under the /com.abstratt.mdd.core/src-model source folder.

Parser

Run the Ant script at com.abstratt.mdd.frontend.textuml.core/generate-textuml-parser.xml (right click, Run As > Ant build). It should generate the SableCC-based parser implementation based on the grammar defined by the textuml.scc file on the same project.

Once it is done (takes a while), select the src-gen directory (or the project itself) and invoke the Eclipse refresh action (F5). That will show that new packages were created under the src-gen directory. Any build errors in this project should now be cleared.

Any time you make changes to the grammar file, you have to manually repeat the process: run script, refresh src-gen dir.

Running the tests

Run com.abstratt.mdd.core.tests.AllCoreTests as a "JUnit Plug-in Test" (information on running JUnit plug-in tests). Make sure you allow plenty of memory using -Xmx200m as a VM argument. All tests should pass.

Running the TextUML Toolkit as an Eclipse application

Just launch a runtime workbench from your development Eclipse (instructions). Again, allow enough memory for the VM with -Xmx300m or more.

Building all features and plug-ins

If you want to generate an update site for the TextUML Toolkit, follow these instructions:

  1. Do not use your usual Eclipse install. Install Eclipse SDK (3.4.2 or 3.5.1)
  2. Do not use your usual Eclipse workspace. Launch Eclipse against a workspace location dedicated for generating a build.
  3. From within Eclipse, install UML2 SDK, EMF SDK and EMF Query SDK. Install Subversive or Subclipse.
  4. Ensure you have a JRE or JDK version 1.5 and ensure that is what Eclipse is using (Preferences > Java > Installed JREs). You don't need to run Eclipse with that JRE, but it must be the default JRE in Eclipse (i.e. your target JRE).
  5. Change the Java compiler compliance level to 1.5 (Preferences > Java > Compiler > Compiler compliance level).
  6. Follow the instructions above for checking out the source code using the Team Project Set file and generating code. Running the tests is a good idea.
  7. Open the site.xml file under com.abstratt.update (or com.abstratt.update_e34 for generating an update site compatible with Eclipse 3.4) with the Site manifest editor and build the features and plugins by hitting the Build All button (to learn more about the Site Manifest editor, see Eclipse FAQ and Eclipse Help).

There you go. If everything goes well, you should have an update site generated inside the update site project. You can now upload it as a publicly available update site. Do not commit this project to the SCM repository.

Contributing code

Things to keep in mind when submitting patches or checking in code:

  • any code you submit must be licensed under the Eclipse Public License
  • only submit code you wrote yourself or EPL code, if written by others
  • every source file must have a Copyright and License Notice
  • note that if your employer is the owner of any IP you create, the employer should appear as the contributor on the copyright notice
  • when submitting code originally written by others (EPL only), preserve the copyright notice found in the original code

See also: Eclipse Legal Resources.