contact ME

Use this form to reach out to me.

Ask me about the software development consulting and vocal services that I can provide for your project.

Westboro
Ottawa, ON
Canada

I am an independent software development consultant, specializing in model-driven development with Eclipse technology, which has been a passion for the last ten years.  I am widely recognized for my high-quality output, timely delivery, and friendly and engaging manner.

I also happen to be a capable singer, performing sacred and secular works for choir and tenor solo from the renaissance to today.  If you are presenting vocal music in Ottawa, eastern Ontario, or west Québec, I can be your tenor.

IMG_1359.JPG

Blog

An ad hoc record of Christian W. Damus's professional and personal activity.

Link to Documents in Papyrus Model Repositories

Christian W. Damus

Last time, we looked at searching for stuff in your Papyrus model repositories. What is better than searching for models and documents? Linking to them so that you don't have to search again.

papyruslinking.jpg

The Kepler release of Papyrus has a facility for creating hyperlinks from shapes in diagrams to arbitrary documents in the local filesystem or anywhere on the Internet that is addressable by a URL. This is updated in the upcoming M2 milestone of the Luna release to support hyperlinking to documents in CDO model repositories. That's right, documents in model repositories. The Kepler release of CDO added support for storage of "file resources", text or binary, as CLOBs and BLOBs, respectively, in the database. As usual, I have recorded a short video demonstration of this new feature in action.

A brief demonstration of a new feature in Eclipse Papyrus M2 of the Luna release: hyperlinking to documents in CDO model repositories.

In brief, Luna M2 will have:

  • the Model Repositories view now shows all resources in your repository, including non-Papyrus models and file resources. You can create and edit file resources in this view
  • a refactored hyperlink dialog: all the different types of hyperlinks are now managed in a single tab, not in separate tabs
  • in the hyperlink dialog, browse currently connected repositories to select a file resource ("document") or even a Papyrus model to link
  • drag-and-drop documents and models from the Model Repositories view to a shape in a diagram to create hyperlinks
  • create hyperlinks (by browse or drag-and-drop) to resources in a repository from models in other repositories or the workspace
  • click a hyperlink in the pop-up action bar to open the linked document or model in the appropriate editor, opening the connection to the repository first, if necessary

See bug 415373 for the further details.

  

Search Your Model Repositories

Christian W. Damus

The first new feature of CDO model repository integration in the Luna release of Papyrus has landed: model search.

Papyrus model repository search

As usual, I have recorded a short video demonstrating this new feature.

In the Kepler release, Papyrus added text-based and OCL-based searching of models in the Papyrus Search tab of the Eclipse Search dialog. Naturally, this only covered searching models in the workspace.

Now, with the latest nightly build of Papyrus and the latest integration build of CDO (yes, both are required!), you can start searching models in your repository by matching substrings or regular expressions (case-insensitive or not) against:

  • element name
  • all string-valued attributes of each element
  • specific attributes (string-valued or not) of specific kinds of elements — the "Advanced" mode

Searches can be scoped to:

  • the workspace: all currently connected repositories, including all open projects in the local workspace
  • the selection: selected repositories, folders, and models in the Model Repositories view

Search results are shown as usual in the Search view and expand to show how individual attributes matched. Double-clicking a search result navigates to that element in the model, opening it in an editor first, if necessary. When a repository connection is closed, all search results from that repository are purged from the Search view.

Searches are implemented using CDO's awesome server-side OCL query capability, by generating OCL query expressions based on the search criteria specified by the user in the UI. CDO's OCL support was already pretty awesome in the Kepler release, but it is made even awesomer by a couple of new enhancements in Luna implemented to assist applications like Papyrus:

  • using CDO's standard query parameter API it is now possible to specify an implicit root EClass for objects. This is often used to make the operations defined by EObject easily accessible in your OCL expresions — cf. bug 416366
  • the OCL environment in the CDO server now provides two additional operations on the OclAny class to simplify querying — cf. bug 416474
    • cdoAllProperContents(OclType) — gathers all instances of a given type within a resource as a collection of that type
    • cdoMatches(String) — efficiently determines whether any string attribute of an object matches a regular expression

Download a build (you will need CDO, the Papyrus main build, and the CDO integration feature from the "Papyrus Extra" build) and start searching! Or wait for M2 of the Luna Modeling package if you're patient. See bug 415371 for details.