Archive for the ‘Plugin Dev’ Category

Creating a model template in Rational’s modelling tools

Wednesday, March 26th, 2008

When starting a new model I seldom want to start from a blank canvas; instead I’d like to use a template to get us going. Within RSA/RSM there are already some templates provided, and whilst useful, they are (necessarily) very generic.

A simple way to enable this is to create a model from an existing model from the New UML Model wizard page.

New UML Model from an existing model (page 1) New UML Model from an existing model (page 2)

Whilst this approach is workable for an ad-hoc approach to copying models, it’s far from ideal, especially in an environment where you would like your modelling team(s) to be using a consistent set of templates. A better approach would be to hook into the “Create model from standard template” mechanism. Whilst this isn’t particularly difficult to do, it doesn’t appear to be that well documented, with the only reference I found being a support page relating to RSA v6 (which is using an export wizard that doesn’t appear to be available in v7).

The way it’s done is by creating an Eclipse plug-in with an extension of the “com.ibm.xtools.modeler.ui.wizards.template” extension point. Under this extension you specify a directory which contains the model to be used as a template, an image to be used in the wizard page and a template definition file that pulls the whole thing together and provides some descriptive text.

Since I think that it’s likely that it’s likely there are people out wanting to do this who are not Eclipse plug-in developers, and in fact may not even be a developer (in the case of business analysts, for example). I’ve decided to write an article that goes through it in a lot more detail. Trust me, it’s simple, and you won’t need to write a single line of code. ;-)

Article: Create an RSA model template

Do you want to RAP?

Monday, October 15th, 2007

Some may argue that the development and release of the Eclipse Rich AJAX Platform is a pointless waste of energy; why on earth should we need to learn yet another way of building AJAX apps - don’t we have enough already?

The point here is that, if you already know how to write Eclipse applications there’s very little you need to learn :

The RAP project enables developers to build rich, Ajax-enabled Web applications by using the Eclipse development model, plug-ins with the well known Eclipse workbench extention points and a widget toolkit with SWT API (plus JFace).

So, if you already know SWT and JFace, if you understand how to write Eclipse plugins and how to package them together to create an application, then you’ve got a very small amount to learn to be able to package your application as a rich web app.

To get an idea of what it can do, have a look at the web versions of (reasonably) well known RCP mail demo and the example SWT (or rather RWT) controls demo.

Pretty neat, eh?

Extending RSA 7’s UI to support profiles

Friday, September 28th, 2007

Hopefully these days, most developers are aware of UML profiles and the value that they can add to a development team. As with other UML 2.x compliant modelling tools, IBM’s RSA tooling has direct support for the creation and deployment of profiles (including into an RSM install).

Although I’ve produced profiles before, I’d always lived with having to create a generic UML element and then apply the stereotype afterwards. If your profile is something that relates to domain in which you’re working, it’s likely that you will want to create these elements reasonably frequently. In this case, this long hand approach can become a little tiresome.

So, given that RSA is based on Eclipse, the platform that promotes extensibility, I wondered whether there would be a way to extend RSA’s modelling user interface. Not holding out much hope I had a quick look in the help - only to find that indeed it does.
(more…)

Dynamic Eclipse plug-in extension

Tuesday, July 31st, 2007

Wayne Beaton’s just written up a blog entry about Making Eclipse Plug-ins using JRuby or Groovy. I certainly agree with his opening statement :

Warning! if you have no experience building plug-ins, this post will probably mean very little to you.

… but if you do have an awareness it’s a good read.

It’s set me thinking about how I could use it but so far have failed to find a single example that would have helped me out. That said, it definitely falls into my cool category and is something I may well be looking to shoe-horn into a solution in the future.

Eclipse JDT resource copy exclusion

Wednesday, May 30th, 2007

What a nice article title…. clear as mud ;-)

So, what the article is really about relates to my playing with a postfix notation DSL; and specifically, adding IDE support within Eclipse. Since I’m going to be using Java bytecode as the underlying execution mechanism for the DSL it makes sense to try to reuse some of the Eclipse JDT functionality; but the JDT does more than I want. Specifically, any files that the JDT finds that cannot be processed by its builder are merely copied to the output directories (i.e. whilst .java files are compiled into .class files, all other files such as .xml or .postfix are merely copied).

Well, I don’t want that; I want the JDT to ignore my files. So we need to add a copy exclusion filter.
(more…)

Domain specific constraints in RSM

Tuesday, April 10th, 2007

Adding domain specific semantics to a UML model is an incredibly useful thing to do. It enables early validation of thinking and ideally puts constraints onto the development teams that are required to help secure a sucessful delivery. It could also enable better code generation, but I’m not a fan of that!

Adding some validation constraints into the IBM Rational modelling tools is actually really quite easy, assuming that you’re not frightened of Java and Eclipse plugins. (Of course if you have no one in your team who isn’t frightened, perhaps you should just bite the bullet; it’s really not that hard you know ;-) )
(more…)

Missing Source for plugins in PDE

Friday, March 30th, 2007

Whilst writing an RCP application in Eclipse 3.2.1 I found it quite strange that some of the referenced Eclipse plugins that I was using had their source attached, while some didn’t. The problem isn’t helped by the fact that you (quite rightly) can’t update the Plug-in Dependencies library to attach the source. Whilst I haven’t got the complete, final and correct answer, I’ve got a little short term hack workaround.
(more…)

Filtering out WID generated projects

Wednesday, February 28th, 2007

If you’ve ever used WebSphere Integration Developer (WID) and also do Java development, like me you’ll probably find having all the generated projects cluttering up your workspace quite annoying.
(more…)