Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Mylyn/Contributor Reference

< Mylyn
Revision as of 19:20, 11 October 2006 by Ducky.webfoot.com (Talk | contribs) (Self-hosting)

Also see: helpwanted bugs discussion bugs eclipse dev

Conventions

All contributions to Mylar need to be made using Mylar since it links source changes to tasks and contexts, making open development and collaboration easier. Using Mylar ensures that:

  • All Bugzilla reports have a corresponding task context, making them easy to reopen or pick up by you and by others.
  • All commits correspond to a single Bugzilla report, making it easy to navigate from changes to bugs.
  • Use Bugzilla priorities to make weekly planning transparent: P1: must do this week, P2: should do this week, P3: consider for this target milestone, P4/5: requires user input.

Also see: Eclipse coding conventions, User Interface Guidelines, Eating your own dog food

The [Eclipse Charter] explains how people get commit rights.

Workspace setup

  1. Get the latest Eclipse milestone release. Note that this is likely to be a later version than what shows on the top Eclipse downloads page.
  2. Associate J2SE-1.5 with your installed JRE via the Window -> Preferences -> Java -> Installed JREs -> Execution Environments.
  3. Import one or more the project sets (listed below) via File -> Import -> Team Project Set. To check out manually or use seperate projects, view the contents of the .psf file(s).

Note that you will need a Subversion client (e.g. install Subclipse) in order to import the Tigris dependencies (needed for Jira), and you will need to download Jira if you want to run the tests in org.eclipse.mylar.tests. You do not need Jira to run the tests in org.eclipse.mylar.java.tests. (Alternatively, you coule to munge the tests in org.eclipse.mylar.tests to strip out Jira.)

To import these sets, you first need to save the PSF file to your local drive. The import wizard isn't able to grab the file from a URL.

Optional installs:

Running tests

Each component has it's own All<Component>Tests suite.

  • Add a credentials.properties file to org.eclipse.mylar.context.tests and define "username: xxx" and "password: yyy" in it. Email mylar-dev@ecipse.org for a username and password.
  • Add the following to the test configuration under Arguments -> VM Arguments: -enableassertions -Xmx384M

To run the AllTests suite follow the above steps and

  • Check out all of the connector project sets
  • Check out org.eclipse.mylar.tests

Manual Tests

  • Some features of Mylar must be tested manually. The manual tests can be found on the Mylar Testing page.
  • Component owners are responsible for maintaining their respective manual tests and ensuring they are covered two days prior to release.

Building Connectors

Trac

JIRA

  • Create a working set that excludes org.tigris.jira plug-ins so that you have no warnings in the Problems list.
  • Refer to the JIRA Dahsboard doc for troubleshooting.

Self-hosting

Self-hosting, also known as working bootstrapped (i.e. self-hosted) makes eating your own dog food easier and avoids having to update to dev builds.

The following is an example of how to set up a bootstrap workspace, using Eclipse 3.3 on Windows and a C:/Dev workspace directory as an example.

  • Create a new directory for your build workspace, e.g.: C:/Dev/build-3.3
  • Launch Eclipse with this workspace, e.g.: C:\Apps\eclipse-3.3\eclipse.exe -data C:\Dev\build-3.3
  • Check out Mylar from CVS into this workspace, see #Workspace setup
  • Create a new Launch Configuration:
    • SelectRun -> Run... -> create a new Eclipse Application.
    • Call the application Mylar Bootstrap.
    • On the Main tab, set the Location (e.g. C:/Dev/workspace).
      • You can use an existing workspace that you used Mylar with, or
      • You can create a new directory. If you create a new directory, you will need to check out the Mylar source code as above.
  • Launching with this launch configuration will give you a second workbench with Mylar. This workbench will be created based on the target platform (the workbench you're launching from) and the plugins in C:/Dev/build-3.3.
  • Do your development in the runtime workspace (C:/Dev/build-3.3).
  • Whenever your changes make it into HEAD that you would like to use, close your runtime workspace (C:/Dev/workspace), update from CVS in the build workspace (C:/Dev/build-3.3), and then re-launch your runtime workspace.

Notes:

  • The launching workspace will typically consume very little memory.
  • Working in bootstrap mode means you have the source code checked out at least twice, once to bootstrap Mylar, and once to actually develop.
  • You must have two distinct workspaces, you can't bootstrap into the same workspace as you launch from.
  • It is possible to run in debug mode so that the changes apply to the workspace immediately after synch, but this can cause problems with the running workspace if classes change or go missing. This is because the hot-swap virtual machine can only change method bodies, not class definitions.

Contributing patches

Creating:

  • Each patch should correspond to a single bug report, and a single patch should be made for each set of changes to be reviewed.
  • A task context should be attached to each patch to make applying and evolving it easier.
  • With few exceptions patches should be accompanied by a JUnit test, and in general unit tests are one of the most valuable and long-lived contributions. If you are having trouble writing a test (e.g. trickiness verifying what happens in the UI) comment on the corresponding bug report so that we can point you at similar test cases or consider extending the test harness if needed.
  • Minimize the amount of changes to existing code to make review easier.
  • Synchronize often to ensure you have the latest code. Once you start modifying resources, put the Synchronize view in Outgoing mode and press the Change Set button so that Mylar tracks the context for the patch.
  • Before creating a new JUnit test class class check the components test suite for similar test cases (e.g. AllTasklistTests).
  • Set the formatter by importing org.eclipse.mylar/developer/mylar-settings-formatter.xml into Window -> Preferences -> Java -> Code Style -> Formatter. Format code using Eclipse's formatter (Ctrl+Shift+F) and ensure that no have been added.
  • Add an @author tag to each class that you create or make significant modification to, placed below any existing author tags and indicating the bug, e.g.: @author Rob Elves (bug 160315)
  • Ensure that there is no console output. For logging errors use MylarStatusHandler.

Submitting:

  • Ensure there are no build errors, warnings, and that org.eclipse.mylar.tests.AllTests passes.
  • Synchronize using Incoming mode and ensure that there are no conflicts, and merge them locally if there are.
  • Right click the task context change set (or the project containing the patch--patches should be made for a project, not a file), press Team -> Create Patch, and make the file suffix ".txt".
  • Attach the patch to the bug report, and indicate in the comment what testing was done to validate it (e.g. unit test coverage, manual tests performed).
  • Attach the task context to the bug report.

Building a distribution

  • Using PDE Build support to create a Mylar distribution from HEAD, using a plain Eclipse 3.2
    • org.eclipse.mylar-feature/feature.xml -> Overview -> change version number to current date (e.g. 0.4.7.v20060125-0800)
      • On Plug-ins tab -> Versions... -> Force feature version into plug-in and fragment manifests
      • Repeat above for org.eclipse.mylar-bugzilla-feature.xml
    • org.eclipse.mylar-site/e3.2/site.xml
      • Delete old features (grayed out)
      • Add new mylar-bugzilla and mylar features
      • Hit Build All (if this fails restart Eclipse and try again)
  • To install, add the path of org.eclipse.mylar-site/e3.2/site.xml as a local update site
  • Bugzilla support can be built independently of the Mylar UI by checking out the following projects mylar.bugzilla.core, mylar.bugzilla.ui, mylar.tasklist, mylar.core

Merging and building the 3.1 branch:

  • Right-click the org.eclipse.mylar.java, mylar.ide, and mylar.xml project, Team -> Switch to Another Branch..., then Refresh the Branches and select e_3_1
  • The list of files that should not be overwritten is in: org.eclipse.mylar-site/merge.text

Deploying:

  • Instructions are in org.eclipse.mylar-site/release.txt

Web site authoring

  • Create a new CVS location: dev.eclipse.org:/cvsroot/org.eclipse
  • Check out www/mylar as a project
  • To push documentation from org.eclipse.mylar.doc to the web site use the targets in mylar/build.xml

Sandbox

The sandbox is a location in CVS that contributors use for experimenting with features that are not part of the standard Mylar release. These include experimental connectors and bridges, experimental UI features, and developer tools. Sandbox tools:

  • Can have dependencies on libraries that need to be installed locally, i.e. are not checked in and not redistributed. This means that you may need to download additional libraries for some sandbox plug-ins to compile.
  • Can be made available for download in the dev builds under the Sandbox (Experimental) category.
  • Follow the same conventions as the other Mylar components.

Dev tools

  • Introspect Object (action): displays the class and other relevant information (e.g. degree-of-interest, task synchronization state) of any object visible in the workbench. Appears at the end of the context menu for any view that accepts an object contributions.
  • Interest Level Decorator: displays the floating point interest level of elements. Enable via Decorators preference page.


Tips and Tricks

  • Java search (Ctrl-h > Java Search) will include all plugins in your Plugin-in Dependencies. If you want to search other plugins as well, open the Plug-ins view, right click on the desired plugin(s) and choose 'Add to Java Search'. That plugin will now always be included in your java searches.
  • If you are added to the cc list on a report that is not picked up by your usual queries it may go unnoticed. One trick is to create a query for ALL products except the product you usually work in (and hence have queries for) and set the cc field of the query to your id. Now you will be notified of anybody adding you to the cc of a product you don't usually monitor.

Back to the top