It's all about the answers!

Ask a question

A report on my experience developing plugins for Jazz


Irwin Kwan (11) | asked Aug 29 '07, 10:57 a.m.
Hi,

I spent the summer at IBM Research developing an idea and a prototype in Jazz. I had not programmed using Eclipse before, so this summer was my first introduction to both Jazz and Eclipse, and associated technologies such as SWT/JFace. I would like to take this moment to write up some comments based on my experience with developing a plugin for Jazz.

The version I started with was Jazz Beta 0.6, and I upgraded from Beta 0.6 to Beta 0.6 M1, and then to M2.

in a nutshell, what I'm building involves a view which displays information about people who are working on work items. I wanted to display, in a tree, information similar to what you might find in the Work Item Explorer, but with some people as well.

I had particular problems with the following mechanisms in Jazz, however. I'll outline them below, and would welcome comments or suggested alternatives for implementations.

I have specific complaints below, but they really boil down to two things:

1) There aren't enough reusable components in Jazz for me to do 'big things' with, and
2) There is no available documentation describing how to use the API or do certain tasks.

Getting the current repository and projectArea This seems simple, but yet is surprisingly annoying. I did figure it out but I would put this as a candidate of "Sample code to put in the Programmer's Guide".

By the way, this is the code that I ended up writing:

		ITeamRepository[] repositories = TeamPlatform.getTeamRepositoryService().getTeamRepositories();


List<ITeamRepository> loggedin = new ArrayList<ITeamRepository>();
for (ITeamRepository repos : repositories) {
if (repos.loggedIn())
loggedin.add(repos);
}
// prefer logged in repositories
if (loggedin.size() > 0) {
fTeamRepository = loggedin.get(0);
} else {
fTeamRepository = repositories;
}

try {
fTeamRepository.login(null);
} catch (TeamRepositoryException e) {
MessageDialog.openError(fWorkbenchWindow.getShell(), "Error",
"Something is wrong with your repository connection.");
}

// Get project Area
List areas = ConnectedProjectAreaRegistry.getDefault().getConnectedProjectAreas(fTeamRepository);
fRecentProjectAreaHandle = (IProjectAreaHandle) areas.get(0);


Querying is painful. I eventually got used to it and I saw that they changed the querying mechanism in M2 to be a bit easier. It took me a while to discover that you could nest Terms inside Terms, and use both AND and OR functions. However, the real pain with using the query mechanism comes with the final "Object" argument when using AttributeExpressions or VariableAttributeExpression. For a while, after upgrading to M2, I was trying to query by status using an AttributeExpression, and it's like trying to program in a weakly-typed language. It would crash with a message claiming that "the incorrect argument" was provided. Even if you have an idea of what parameter you should put into the final argument, it becomes guesswork - if searching for a contributor, do you put an IContributor, or an IContributorHandle? I don't know even now (though I suspect that both will work).

After a while, you get the hang of it, but it still feel like a lot of code.

One thing I would have liked to see is easily-accessible, pre-canned queries. You'd be able to call one function and easily get queries for "All of your open work items that you own" or "All new work items after _date_".

Querying with the Query Dialog and executing custom operations on the result I want to query for a set of work items for my plugin. Unfortunately, there is no way to use the existing QueryDialog to do this, because the dialog is (1) internal and (2) cannot have some of its operations overriden because they are private, not protected. There is a method in the QueryDialog to process the results, and it would have been very useful for me if I could have overriden this method to perform my own operations on the results.

Cloning the code is not a good solution, but it also doesn't compile due to some issues with the Tab factory. I don't know the details, but I think it has something to do with extensions and I'm not familiar enough with Eclipse to know how extensions work.

I have heard that the QueryDialog is being improved with a new interface, so I would suggest making it accessible and extensible as a component for a developer to use.

Displaying work items in a table I would have loved to be able to use the columns in the WorkItemExplorer to display the status, severity, and priority of a work item in my view (along with the pretty icons)! Unfortunately, I wasn't able to figure out how they worked. I looked at the underlying mechanism and there wasn't anything I could easily take for my own use there. I would have liked to have a column that I could easily extend, or similar to display the status icons.


These are just a few of the examples of things I would like to see improved with the Jazz API. A lot of it was just learning the API and how it worked, and since it's still in a lot of flux I can understand why not many resources have been put into that direction yet. However, I really hope to see API docs in the future! The other thing is just seeing cool stuff in Jazz and thinking, "I want to use that" and then ending up not being able to. many of the components in Jazz are really neat and I'd like to see them easily used in many plugins, not only for developer ease, but also consistency of the UI.

I think a lot of it has to do with the "cool" components being internal. For example, when I first wanted a query, I looked for the QueryDialog (internal), and then when that didn't work I used the ContributorSelectionDialog (which is also Internal).

Thanks for listening, and I hope to see some feedback on this.

6 answers



permanent link
Stefan Hufnagl (29411719) | answered Aug 30 '07, 3:55 p.m.
Hi,

interesting feedback...without going too much into details also I struggle with the Jazz.

From my point of view:
* API Doc. is important and should be improved.
* The Big Picture for me was missing, I purchased MS Visual Studio Team System Books to get it (because MS VSTS is similar to Jazz).

Question:
* How could we improve the situation ?
* Will you share your experience in details?

Just my first thoughts...

Stefan

permanent link
Bill Higgins (24611) | answered Sep 05 '07, 11:48 a.m.
Re: Big Picture, have you read the Technical Overview doc on Jazz.net?

https://jazz.net/learn/LearnItem.jsp?href=content/docs/platform-overview/index.html

If you have read it but it doesn't provide the Big Picture you're looking for, how could we improve it?

If you hadn't previously read this doc, does reading it provide the big picture you were hoping for?

permanent link
Stefan Hufnagl (29411719) | answered Sep 10 '07, 3:38 a.m.
Hi,

thanks for your hint with Tech. Overview. It seems to me that jazz has two Aspects.

Technical Aspect:
* Very good starting points, I read everything I could get.

Methodical Aspect:
* Missing for me are the Process/Methodical things in the documents. Thats the reason that I mentioned MS VSTS, MS invest a lot of efforts in good documentation and books.

Questions:
* Also for me and my colleges rise the question "how could we improve the jazz situation?" (Because I believe in Jazz).
* How is it possible to publish article regarding Jazz ...

Regards,

Stefan

permanent link
Chris Daly (61651) | answered Sep 10 '07, 7:03 p.m.
JAZZ DEVELOPER
Questions:
* Also for me and my colleges rise the question "how could we
improve the jazz situation?" (Because I believe in Jazz).
* How is it possible to publish article regarding Jazz ...

One answer to these questions is here:

https://jazz.net/learn/articles.jsp

Another answer is that you could write your article as a blog post and
then post a link here on jazz.extend (or jazz.user).

I think it would be great if we had a "Planet Jazz" (like Planet
Eclipse) to aggregate blog postings about Jazz, but there may not be
enough critical mass of jazz bloggers yet (sort of a chicken-and-egg
problem).

permanent link
Stefan Hufnagl (29411719) | answered Sep 11 '07, 6:32 a.m.
Hi,

together with my college we work on a Jaz documentation.

Content:
* Create a Jazz Project Area.
* Collect/Create the Req. for a GUI Calc.
* Two Developers will join.
* Create a simple AWT Calculater in Eclipse
* Create Junit Test.
* Create a build.xml
* Put it under jazz Version Controll.
* Solve a merge conflict
* Adopt/Change the build.xml (so it fits to Jazz Build)
* Create a Report

Together with this Document we build a VMWare Image (6 GB) with Jazz M2 included. Also, if we have time, we will try to adress "W"-quesions (why, what is the reason for this...etc.)

Any suggestions ?

permanent link
Christophe Elek (2.9k12921) | answered Sep 12 '07, 4:46 a.m.
JAZZ DEVELOPER
hufnagl@de.ibm-dot-com.no-spam.invalid (shufnagl) wrote in news:fc5r68$lth
$1@localhost.localdomain:

Any suggestions ?

Yep :) where can we have a look at it ? :)

--
Christophe Elek
Serviceability Architect
IBM Software Group - Rational

Your answer


Register or to post your answer.