Monday, December 22, 2008

Eclipse Debugger, part II

As I said in the Part I, this time I will focus on the Hit Count property and the Conditions of breakpoints. If you go to the breakpoint's properties (right click on the breakpoint and choose Breakpoint properties... option) you will see two interesting options:

Hit count

When we enable the Hit Count and give some positive integer value X the breakpoint will suspend the execution when it would be hit Xth time.
Lets illustrate this with example. If we consider the following code:

and we set the Hit count of the breakpoint (look at the picture above to see where the breakpoint is placed) to 7 we will find the following output in the Console view before the execution is suspended:

So as you can see the execution was suspended when the breakpoint was hit 7th time.

Sometime everyone faces the situation when we want a breakpoint to be active only if some condition is fulfilled (e.g. we go in the loop through a 1000 elements list o people's names and we want to debug this loop for a particular name and we don't want to go 1000 times through this loop). To see how it works let's take the same code and let's set the condition the following way:
In this case the output in the Console view will look as follows:
The given condition is evaluated in the context of the breakpoint, so we can use all the variables that are available the context. Of course you don't have to use the numerical conditions, any expression that gives boolean answer can be used!

Thursday, December 11, 2008

Eclipse Debugger, part I

Last semester I had some classes with students during which they had to prepare some easy projects. One of my requirements was that the project had to be implemented in Java, hence every team used Eclipse as an IDE. In my discussion with students it came out that a lot of them prefer debugger from Visual Studio over debugger from Eclipse. I was pretty surprised as I had a chance to use the VS debugger a lot in one of my projects and it didn't make good impression. When I got into details during the discussions it looked like the students had no idea about many features of Eclipse debugger and after some time some of them agreed that it is better then VS debugger.
This situation made me think that there is a need for some kind of tour through Eclipse debugger's features to share our knowledge about this great tool. Every week I will try to write a little bit about one of the debuger's aspect. If you have any hints or hacks for the debugger let me know - we can learn from each other!

Types of breakpoints
I would like to start with different kinds of breakpoints that are available in the debugger. We can use:
- line breakpoint
- method breakpoint
- field breakpoint
- class breakpoint
- java exception breakpoint
I guess that most of us use usually the first type and we tend to forget about others, however, that often can come very handy.

Line breakpoints
The post popular ones, so I won't get into the details. They make the execution pause whenever the given (marked as breakpoint) line is hit. Breakpoints like this can be created by clicking the ruler on the line we want to put the breakpoint on.
Method breakpoints
This kind of breakpoints pauses the execution whenever the processing enters or/and exists the given method. Breakpoints like this can be created by clicking the ruler on the line where the name of the method in the declaration of the method is written.
When we look to the breakpoint properties (right click on the breakpoint and choose Breakpoint Properties...) we will find the option to activate the breakpoint on method entry or/and exit:
Field breakpoints
Field breakpoints pause the execution whenever the given field is read or/and modified.
In the breakpoint properties we can set when the breakpoint is active:
Class breakpoints
These breakpoints pause the processing when the given class (or interface) is loaded by the JVm for the first time.

Java exception breakpoints
Allow to pause the execution of the application when particular exception is thrown. They can be set in the Breakpoints view. Choose Add Java Exception Breakpoint option:
and give the name of the exception you want to monitor:
In the end in the breakpoint properties you can set if you want this breakpoint to be active on caught or/end uncaught exceptions or maybe on subclasses of the given exception:

Did I miss any kind of breakpoints?

Next time I will try to write about the Hit count option and the breakpoints' conditions.

Monday, December 8, 2008

OSGi example = Spring Dynamic Modules + Equinox Declarative Services

Well, it took me a while to came up with that example.
As I am working on design of some fancy spring osgi equipped application some research was needed to check how and if it works as described ;).
But why not to make this more interesting and add some integration to this deliberations.


In this post I am going to show how to integrate Spring DM and OSGi DS (Equinox implementation). The only purpose for the code is to show that it is possible. It is only OSGi powered version of helloWorld software :D

What can be useful ?

Main idea

As it was late in the night usability of the example is not catchy :D "hello" here "hello there" but the main idea is to show that it works :D.
Ok so we have 3 bundles. Two of them are using declarative services and the last one is using spring to provide it services :D

Programmer notes

First thing to mention. To build spring bean I am using maven. As you all know there is something called maven project structure. The best place to store META-INF is resources directory in src catalog. Don't do it this way. To make bundle visible for PDE tooling we need to store META-INF in the root of the project. Of course this requires changes in pom.xml project description.

As we have it visible as a bundle let me add some content.
First our service:

package nugae.spring.example;
public interface IHelloService {
  void sayHello();

It has its implementation in nugae.spring.example.impl package.
Next we need to define our service definition. It is recommended to split osgi and beans definition.

I assume that you may know standard bean definition so I will only focus on the osgi definition (component-osgi.xml):

Basically, saying that we deliver some service can be done with this declaration:

<osgi:service id="springService" ref="helloService" interface="nugae.spring.example.IHelloService" />

At the moment (in theory) we have our service (and bundle) ready to deployment.

Lets move then to our declarative services. As I've mention we'll add consumer and another provider bundles.
It is worth to mention that in eclipse 3.5M3 we have DS tooling available in PDE.

Declaring service using DS is nothing more complicated than using spring approach.
Neither specifying services required.

So what we have here ?
We just specified that our bundle requires two services (one delivered by other DS bundle and second provided by Spring bundle.

So let bring it to life :D

To bring the DS functionality to our target platform we need some bundles (can be checked out from

The simplest way to run spring osgi support is to use target provided by spring framework.

It contains all required bundles.


It works. Well I am surprised cause sometimes not everything work as described ;).
I think that OSGi brought new quality to developing java application. The level of freedom we've using different approaches make it even more attractive.
If you want to run this example (hopefully you will be able following this post)
source codes can be downloaded from here.

Friday, November 28, 2008

SWT Ribbon again

Chris Aniszczyk posted short info about SWT Ribbon created by Emil Crunhorn.

I was just a little bored today - America has Thanksgiving so we had not had a lot of work in support - and I have tried to run SWT Ribbon under my Ubuntu 8.10. I have to admit I was 100% sure it will not work.

Check the result:

DemoCamp in Poznan

So this week we had the DemoCamp in Poznan. It was the 3rd time and I'm really impressed by how it has changed over time.

First DemoCamp was at the University, lecture style. Lots of attendees, most of them students, tough topics like g-Eclipse and Equinox. Feedback for us was that yes people in Poznan are interested in Eclipse.

Second DemoCamp, together with Ganymede release in June. This time as an informal evening event with beer and pizza. Lightning talks really astonished me! Suddenly it had turned out that there's more RCP developers around than we know. We received some interesting questions too.

And now this week's evening event. We planned for 3 demos and lightning talks session, but I noticed that after second demo, we could have stopped already. People started talking, gathering into groups and discussing their own topics. Amazing!
Topics, I heard of, ranged from "where does Eclipse name come from (FrED)?", thru modeling (promoted tirelessly by Grzegorz), to use of AOP for tiers separation.

This time was special also because of the guests we had: The Embarcadero's big guy, trying to fit delicious polish beer and the new era of SQL development on a very narrow table; an incognito Platform committer from Krakow teaming up with his GSoC student, and our new Platform.UI committer Chris. There were also some unexpected guests like famous traveller Mr. Wallet from Berlin, and some Scottish couple :-) Thank you all for visiting us!

See more pictures..

Monday, November 24, 2008

DemoCamp Poznan

I wish to thanks organizers, speakers (excluding me), and attenders for great atmosphere. I don't want to go here with summary of that event (probably Jacek will do it, and for sure better than me). I want to put here only small reminder.

During lightening talk I pointed out the idea of hackathon. During summit there was toast application presented and as it is a example of capabilities of Equinox ready to hack, why not ? So if you want give it a try please contact the authors (details on the wiki).

Another Eclipse commiter among Eclipse enthusiasts from Poznań!

Last week Christopher Daniel from our team was officially announced a full commiter on the UI component of the eclipse.platform project!
Congratulations Chris! Make the Platform even better then it is now! :)

Friday, November 21, 2008

The Worldwide Kindness Day

My Rational Application Developer was very very kind today to me while I was doing some kind of tracing:

Time to load bundles: 14
Starting application: 1594
Application Started: 18245
Valid-responses ok error M E Removed New-entry MT Created Remove-entry Clear-sticky Checked-in Merged Clear-static-directory Update-existing Copy-file Set-sticky Valid-requests Mod-time Notified Set-static-directory Template Updated Module-expansion

That's an example!

Thursday, November 20, 2008

Eclipse Tip - Ctrl+1 and 'if's

Quick assist can do a lot of work for you. This flash shows what kind of manipulation you can perform on 'if's. Please use next/previous button to navigate between slides.

If you need more info, please go to Eclipse Help.

Wednesday, November 19, 2008

Eclipse Summit Europe 2008 daily report

but before I'll start let me show you my way to Eclipse Summit this year ;)

As I am student (really ;) ) I've got the student discount. Following the rule of savings I have flight to the Germany ;) . It was investment in time and money, train is twice as much time and $ painful. Anyway it was very lively travel. I took one car, one plain, one RE, one S-bahn to get to Ludwigsburg. I booked the chipest accommodation possible but it has at least three drawbacks:

  • It is far to far form the city center.
  • There is only one bus every half hour.
  • breakfast are served till 9am.

But as I pay for everything from my pocket, money counts (lets say I don't like to spend on myself ;) )

Maybe later one I'll report on how Ludwigsburg looks like for me (first time I made whole trip by foot) but now let me say few words about conference itself.

There were 4 sessions today. the choices were sometimes hard. one not wisely made.
Talking only in superlatives I've heard several good speeches, I have some interesting conversation between them and I've seen how huge power is Eclipse community. As I have barely no time today (well it is rather matter of not having internet at my room, even hostel) I'll sum-up what I heard today tomorrow.
Of course I'm not the only person with camera at this event (Ed will probably present bunch of nice photos) but let me show you one (that how it started).

P2 Tip: how to customize default list of update sites?

If you'd like to ship your product together with P2, but containing custom set of update sites in "Help -> Install New Software", then:
1. Go to "Help -> Install New Software -> Manage Sites"
2. Shape the list using Add/Remove/Modify, and press "OK" when you're done
3. Copy org.eclipse.equinox.p2.artifact.repository.prefs and org.eclipse.equinox.p2.metadata.repository.prefs from eclipse/configuration/.settings/
to your final build configuration directory

By default Eclipse comes with two sites configured this way - linking to ganymede release train and updates.

Tuesday, November 18, 2008

Eclipse DemoCamp Poznań!


We'd like to invite you to Eclipse DemoCamp in Poznan - a part of word-wide series of events organized by Eclipse community. We're meeting on Monday evening, November 24th, in Piwnica 21 pub. Starting at 18:00.

We'll be promoting Eclipse as an IDE and RCP platform, this time with our special guest - Wassim Melhem - committer on Eclipse Plug-in Development Environment project, who is currently working on commercial database tooling based on Eclipse. Dawid Weiss from Poznan University of Technology will tell a few words about combining Carrot search engine, and finally Bartosz Michalik will show his work on PDE Product Customization - a heaven (and hell at once) for all RCP integrators.

As always, this time again, you'll have chance to sell yourself, your product, share experiences or even rant a little bit during lightning talks. Last time they were really popular, so prepare good, as you may have to fight for your 5 minutes on stage :D

To better support discussions, we'll have some free beer, pizza and DanceDanceRevolution for most excited Eclipse fans ;-)

All details are at Please register there (directly on wiki, or by sending email to one of organizers).

Sunday, November 16, 2008

DemoCamp's shape

Going to demo camp with presentation is always difficult, especially if you need to travel from Poznan to Krakow (both cities are in Poland). The main problem is that Krakow is in dead zone. It does not matter which transport medium (a car, a train or even a plane) you select, it always takes 6 hours or more to get from one city to another.
You can easily imagine my big astonishment when I saw people that travelled even longer to give their lightning talk and listen to other presenters (including me with RAP). I invited them also to Poznan, which is much closer then Krakow, but they gently refused - they wanted democamp to be similar to conference rather than informal talk, where people share with their Eclipse experience.
I am a little bit said, because we have resigned from fixed schedule in Poznan to be flexible and to encourage our guests to start talking. Eventually our program has been received as rather "poor", and the democamp is considered as an event in its starting phase. This is basically not true, as Jacek (in cooperation with others) is putting a lot of work to get everything working correctly and everybody to be happy.
So, I'd ask a general question: What are you expecting from demo camp you are going to attend?


Saturday, November 15, 2008

I have seen this before

Martin Fowler's latest post shows quite interesting use of Open Source. In one sentence: let the customer to develop your Open Source solution and charge him for that.
This is quite similar to Eclipse approach (maybe except charging), isn't it?

Monday, October 20, 2008

Experiences with Eclipse development

I've heard there are some polish people developing applications using all cool stuff from (like RCP/Equinox/...).

If so, please let me know.

Thursday, September 11, 2008

Poland loaded with DemoCamps

I figured out, I'll post now, while it's true - 30% of November DemoCamps seem to be in Poland!

I'm counting with the hidden one, organized by our local amazing modeling expert, who's affraid he won't find enough speakers.
Altough committers don't grow here in every corner (like mushrooms), there must be a lot of love to Eclipse!

ladybird at it's home

Tuesday, August 26, 2008

Product Customization - GSOC release

This is the time for small summary. I hope Product Customization is about to became part of Eclipse. There is some work to do and there is some work already done. Big thanks to my GSOC08 mentors Kim and Chris for their support.
There are :

  • Remove features from tree (Views, Commands etc.. - in general all IPluginElements / IPluginExtensions if you are familiar with the PDE Product model)
  • Changing name of nodes.
  • Launching product with transformations
  • Exporting product with transformations

available. If you want to see it in action or read in detail please go to my GSOC blog.

Thursday, August 7, 2008

If you ever had to extend an inherited or undocumented Eclipse based application, weren't you wondering what might be hiding in it? Myriads of misterious extension points and handy services. Since Eclipse 3.4 it's easy to deep dive into Eclipse extension points and services thanks to PDE Plug-in Registry view.

But as most of Eclipse based applications use Eclipse 3.3 or even 3.2, now it's getting easier to use Plug-in Registry in those older releases too, thanks to this bug.
Following screenshot presents 3.4 Plug-in Registry view installed in IBM Rational Software Modeler, based on Eclipse 3.3. Revealed are all GMF editors tool palettes with their IDs and names, which makes it easy to add even more tools!

Tuesday, August 5, 2008

EditingSupport + TreeViewer

On of the product customizations I work on is changing name of the object at tree. The first idea sounded quit reasonable for me so I've started implementing it as in place editor for tree items. one thing I found interesting was: "Since 3.3, an alternative API is available, see ViewerColumn.setEditingSupport(EditingSupport) for a more flexible way of editing values in a column viewer." so I've decided to get it a chance.

DISCLAIMER: I won't take any responsibility of you implementing editing in viewer this way. In fact I hope some of you will show me the right way.

So I have a tree viewer with "default" column which is a tree.
Each column editor (including TreeViewer has editElement method which can be used for editing n'th column for a given element). But it doesn't work cause you need a cell editor for given column. How this is provided ? Via EdditingSupport.
EditingSupport need to be associated with given column, so we need a column. Ok but column apart of having editing support need to have label provider set up. The label provider it needs is an CellLabelProvider. Oh dear can we then reuse our ILabelProvider, IFontProvider etc.. we had by the moment ? Yes, and no. There is one wrapper label provider WrappedViewerLabelProvider but unfortunately with the package access. So to reuse it in 3.4 you must copy the code.
That's all ?? Almost. If you are ok with the default firing the editor (on left mouse click, for programmatic actions or tab moving) it's all (well you need also some code for keep you column of proper size, but that's detail). I need to have editor fired only on my programmed events. To say how the editor should be fired provide EditorActionStrategy for the view.
So how it look like:

TreeViewerEditor.create(fTreeViewer, new NameEditorActivationStrategy(fTreeViewer), ColumnViewerEditor.DEFAULT);
fLabelProvider = new ExtensionCustomizationLabelProvider(getCustomizationInfo(), toolkit);
column.setLabelProvider(new CustomizationViewerLabelProvider(fLabelProvider));
column.setEditingSupport(new NameEditingSupport(fTreeViewer));

where NameEditorStrategy, ExtensionCustomizationLabelProvider, NameEditingSupport are my custom implementations of objects I've mentioned before.

And as I have said before: I really hope there is an easier way.

Monday, July 28, 2008

Another reason to love Mylyn!

Mylyn is one of my favorites Eclipse project, I especially like the context feature, but as every software Mylyn also has some bugs, fortunately there is also great Mylyn team. Last Thursday while working on Bug 241505 I wanted to add this bug to the Task List view. I went to the Task Repositories view, right click on the repository, chose Open Repository Task option...and I came across a bug. I went to Bugzilla, submitted a bug, checked out Mylyn code from the CVS and started looking at the code to find and kill this bug (Plyg-in Spy helped me of course to find the code, where the bug could be). In order to start debugging I ran another instance of Eclipse with fresh Mylyn plug-ins can imagine how surprise I was when I couldn't reproduce the issue?! I looked at the CVS history and it appeared that bug reported by me, had already been submitted and it had been already fixed! So now I have another reason to love Mylyn - the Mylyn team fixes bugs faster then I am able to find them! Kudos to the Mylyn team and all its contributors!

Friday, July 18, 2008

Are you Eclipse certified developer?

Are you a developer that uses Eclipse and writes plugins, but you do not contribute often enough to get commiter status?

Do you think it should be possible to get some certificate that would say that you are f.e. JDT expert? That you are really acquainted with that JDT and you know how to use it?

Do you think that there is a gap in Eclipse process, because it certificates commiters (yes, commiter status is a kind of certificate) and does not certificate you, although you know everything about using certain Eclipse project?

Would you like to see such a certificate in your CV?

It is a time to look into that bug.

Sunday, July 13, 2008

GSOC 2008 milestone

Yup it is half of this year GSOC edition. At the moment everything goes well.
If you are interested how the Product customization looks like at the moment you can find some movie at my blog. Thank you Kim, Chris for your advices and support.

Wednesday, July 9, 2008

Thank you Picasso

Someone saw following dialog:

Something really went wrong. Why is that? Let's visualise:

Easy. Support area increments the number of column, so you have two rows 3 columns each and all components are placed there somehow... But... Wait, why there is that empty blue box?

It looks like components responsible for message are not placed on the correct composite...

Let's fix this.


Now everything works perfectly :) Thank you Picasso!

Thursday, July 3, 2008

Eclipse Summer School 2008

I am pleased to announce, that in cooperation with Poznan Univeristy of Technology, we are preparing next edition of Eclipse Summer School. We are going to teach students (and not only, companies are also welcomed) how to use Eclipse and how to create RCP applications.

The tutorial is 5 days long and we guarantee dinners, coffee, tea, sweets and a lot of fun!

You can find more details here: Unforunately the site has no English version, so please use google translate.

We are also looking for sponsors, so if you would like to look for new hires or to promote your company in academic environemnt, please let me know.


PS. Last year 95% of particapants told us that they would recommend our training!

Friday, June 20, 2008

Fighting with "No more handles"

I have not found more irritating thing ever - actually there is the only thing (for me) that causes RCP to stop working.

Unfortunately handle limits are not written down anywhere - because they differ a lot depending on component and operating system. It is very often caused by 10 000 handles limit per process in Windows XP.

How to increase the number of available handles?

Someone clever told: "if you ask, you are wrong".

And this is completely right - do you really need 10000 thousand of controls on your form? Do you really need to be able to serve tens of views and editors at once?

You do not have so many controls? Install sleak and look for handle leaks.

If you went through two previous points, and you are completely sure, that you need every single control you are using, your interface is well designed and you do not have memory leaks... than please open your task manager, go to the processes view, select view -> select columns and check User Objects. You should see something like that:

Now please verify that there is a strong correlation between USER counts and the number of opened editors/views etc, and be sure that No More Handles occurs when User Handles approaches 10 000.

If you have confirmed, that you have really met a Windows limitation, please rethink once more your design.

And then go to and follow their instructions. And be aware of their "limited" responsibility for that hotfix ;-).


Saturday, June 7, 2008

GSOC 2008 Product Customization

For all of you who are interested in progress in my GSOC project: here is a category form my Frankfurt blog which I use to post the progress. Fortunately progress in the project is better than in blogging at this page :D

Sunday, May 25, 2008

Hot Eclipse Summer coming

Next couple of weeks are going to be pretty challenge for all not-yet-Eclipse-converted Java developers in Poland. With the last day of May, we'll see them on Javarsovia. - 2nd edition of Polish Java Conference in Warsaw, probably the largest Java conference in our country.

The same day we're also in Poznan, on a must-see Poznan Open Source Event located at Poznan University of Technology.
Btw. conference name is pretty funny because it's originally abbreviated as PIWO, in english BEER. Now you understand, why I say "must-see" :)
Hopefully they don't give us as long straws as it was recently on Juwenalia:

hope, then everybody'll be ready for DemoCamps invasion!

Wednesday, May 7, 2008

Poznan's Eclipse GSoC students at IBM Eclipse Support Center

We were guesting our Google Summer of Code students recently. We got to know each other and had a chat with : Ola Woźniak who is working on project “Compare with” dialog, Marek Zawirski (on the right) with Push operation implementation and GUI improvements for egit Eclipse plugin and Mateusz Matela (on the left) who was accepted to contribute toString() generator.

They are welcome to use our Eclipse Center as a place where they can find support, advice from our engineers and good coffee :-).

Onec again congratulations and good luck with your projects!

Monday, April 21, 2008

GSOC 2008 announced

After some delay there it is. Congratulation to all students. There is one thing to highlight. This year we have two students located in Poznan. Best wishes Ola and Mateusz :)
UPDATE: look at here there is another one :D good luck Marek.

Monday, April 14, 2008

How good are your tests?

Does this test have any sense?

public void testMe() {
String result = concat("Fr", "ank");

Probably yes, but there's not much use of it, as most of concat(String,String) implementations will pass, e.g. this:

public String concat(String a, String b) {
return "Not implemented :-)";

So, recently I'm working on some smarter testing approach, which you maybe heard of, called mutation testing. It's idea is to rerun tests, modifying the system a little bit every time, to catch those test cases, that don't really care what system returns, or which always pass whatever happens.

Mutation testing is nothing really new, ah actually I think I have seen some articles about it dated back to 1990s..
What nobody liked about it since that old times, is that they're SLOW. Just imagine you have a system of more than 10 classes and you want to make some small changes in it, recompile and rerun whole test suite every time for 100 or 1000 times - you get the idea.

And here I'm getting to the point, why it's worth posting about this on Eclipse blog. After some tiny prototyping with pure junit library, I have switched to jdt.junit and now have ahead of me a pretty nicely working framework. It's really amazing how jdt.junit code is flexible.

Hopefully soon (no later than June - when I'm going to defend my master thesis), my users will get a nasty pinch for every test the tool finds useless :)

Thursday, April 10, 2008

An Automatic generation of EMF Editor Idea

I am quite busy right now, however I have an idea which does not allow me to focus on my task.

Could you please imagine, that you have generated your model and .edit code, and now you want to have nice editor...

EMF generates one, but I'd say its rather a good start point than real editor.

But please imagine that you can are able to metamark your model like on example:

@RootObject(cardinality="1", displayType="Shell Title", displayValue="getName")
//@RootObject(cardinality="*", displayType="list", canCreateNew="true", displayValue="getName")
public interface RootModelClass (){

public String getName();

@Edit(canCreateNew=true, asSubsection="true", value="getName")
public ChildModelClass getChildren();

@TabbedEdit(tabs="first, second")
public interface ChildModelClass (){
@Edit (Editor="Text" flags = "SWT.SINGLE" validator="ExemplaryValidator")
public getName();

@Edit(canCreateNew="true", Editor="RecursiveTree")
public ChildModelClass getChildren();


Generated editor for this example should put the name of the root object as a title of an application/itself, display a list of the children, and then, depending on the child selection, display a recursive tree with child children. On selection of the 2nd level child a new section could be displayed that would allow for edition.

I know this is a rough, incomplete and inconsistent idea, but I'd love to hear any feedback on this.


Wednesday, April 9, 2008

Don't underestimate CDT

If you ask me whether I am C++ or Java programmer I will say Java's one. I used to program C++ a lot and now I am in the situation I will probably do even more.
Recently, I've got a code to analyze. So as I am doing most of my programming in Eclipse choice was as usual. The software is pretty big and I tend to be lazy when I can so I decided to import my code to the managed project.
Unfortunately, the code conventions are a bit different from common practices (or maybe something has changed since I've switched to Java). Some parts of code are kept in *.cxx files and #included in *.hpp files. Unfortunately with default configuration the code in *.cxx is compiled what evidently leads to compilation errors. What I wanted to do (fortunately that rule is followed in whole project) was excluding *.cxx files from compilation.
I started with trying File Types project preferences option, but without results.
Then I found working solution. After setting everything up switch off automatic makefiles. Several minutes ago I was thinking that this is the only solution. But don't ever underestimate tools you don't know well.
Obviously there is a simple and elegant solution. Project preferences ->C/C++ General -> Paths and symbols -> Source locations tab. You can even make index
working on excluded files.
That made my day :)

Wednesday, April 2, 2008

Polish Eclipse Community

As Chris's asked about regional communities I sprint to remind you that we've build one in Poland. And it is each day growing. So if you are not involved yet please visit Eclipse forum. And if you wat to see whole picture of Eclipse community, Polish edition you can do it at this eclipse wiki page.

Eclipse in SDJ articles series

Maybe it is not time for saying that but this is surly worth to be announced.
Last year we (authors of this blog and Mirek Ochodek) started project which was intended to introduce Eclipse to the Polish community.
We came with the idea to write several articles about platform both from the programmer and end user point of view. We started cooperation with "Software" publisher and planned special Software Developer Journal about Eclipse platform. After almost two month of hard work (and at this point I must say I am really grateful for the time and passion all my friends put into this project) we've got all response from the articles' reviewers. All of them was great and I am personally proud of the quality we've achieved. At that point I was hoping that the magazine would be soon available for the community, but by now it is not. Unfortunately due to the problems with sponsorship of such a special issue, recently the project has changed the form. Although this is not the result we all have expected, it seems the articles will be published in monthly editions of the magazine, one by one. The topic we have covered are following:

  1. Eclipse community

  2. Eclipse IDE

  3. Debugging and unit testing in Eclipse

  4. Mylyn - task oriented development

  5. TPTP

  6. Eclipse for web development

  7. Beyond Eclipse

  8. SWT/JFace

  9. Building RCP applications

  10. EMF

  11. GEF and GMF

I will inform you about first article from the series.

Tuesday, April 1, 2008

workspace setup

Are you maybe from big corporation with strict development environment rules?

I remember once comming to such a company, I was given a misterious User Guide doc, about 20 pages long paper telling how to prepare a workspace, what are my coding conventions from now, why should I set up auto-save option, etc. etc. etc. It finally turned to be a day long wend thru Window -> Preferences thicket.

Hmm so how about doing it automatically?

Monday, March 31, 2008

Eclipse is hard to use?

Beside working for IBM Eclipse Suppot Center I'm a PhD student and teacher of Software Engineering course at Poznan University of Technology. During the classes I often ask students to do some tasks in Eclipse (e.g. write some jUnit tests, refactor some code, etc.), however, some of them complain that Eclipse is hard and not intuitive to use. Most of them claim that Visual Studio is more user friendly and that it allows to develop code more effectively. They say that there are too many windows, options, shortcuts, etc. and that it is hard for them to start from stratch.
I started wondering if we could do something to show new users that Eclipse is easy to use and that it has a lot of useful features. Are there any tutorials which shows how to use Eclipse as an IDE? Or maybe there is a need to create tutorials like this? Maybe there should be new UI elements added, which would allow faster start (e.g. Simply Java Project which would require to give the project name only)? Any other ideas what we could do to allow easier start for new Eclipse users (or at least for the lazy ones)?

Friday, March 7, 2008


For sure Eclipse is used in many context and environments. But I was quite surprised when I found it here. Although this is out of scope my current research interests maybe it will interest some of you.

Friday, February 15, 2008

The sly fox' clause

I am working on new status dialog for some time. And my work progress very slowly, so even if this code will be released for M6 it is impossible to make API stable. I do believe that 4 weeks is not enough to do that. This issue seems to have serious impact on my work - it is too late to release the code, because then it will go to API and should be maintained forever. I do not find myself good enough designer to take that risk...
So... should I postpone my work?
Actually I would have a lot of problems if Szymon Brandys and John Arthorne hadn't shared with me their knowledge (yes, they allowed me to write about this if I put their names in the note).
So, the trick is to put following comment into javadoc:

IMPORTANT: This class is <em>not</em> intended to be subclassed.

This little clause is warranty of binary compatibility in case of any changes. Well... actually it indicates there is no warranties at all, and if you try to derive from that API anything its your problem.

Of course I could use final clause. But then nobody would be able to use my classes and provide feedback...

The trick is called "soft API".

By the way, if you have a second or two please look at new status dialog.


Friday, February 8, 2008

CoreException anit-pattern

Hello there

I have run recently into bug 212340. There is described anti-pattern that causes stack trace to vanish.

The explanation is quite easy - currently StatusManager#handle accepts IStatus, and CoreException has getStatus method... So it is almost reflex action to write:
StatusManager.getManager().handle(e.getStatus()); CoreException's stack trace is lost...

So... wrap CoreException in IStatus before passing it to StatusManager!


Thursday, February 7, 2008

Automatic generation of BIRT reports

Automatic generation of BIRT reports is a common task for every company that has reports that should be presented to the customers.

Those reports should be delivered regularly. If howto that I am going to present is available somewhere than I am sorry, but I was not able to find it out and I had to merge knowledgle scattered in a several wiki pages.

But in the ends solution seems to be very easy:

1. Download BIRT runtime and unzip it somewhere. You should have now birt-runtime-2_2_1_1 folder.
2. Set up environment variable to point to that folder either in OS or inside birt-runtime-2_2_1_1\ReportEngine\genReport.bat(sh for linux).
3. Put your jdbc jar file in folder birt-runtime-2_2_1_1\ReportEngine\plugins\\drivers.
4. Execute genReport.bat script to see usage. For all those good computer scientists (and good computer scientist is a lazy one) I present sample command:
genReport.bat -f PDF -o outputfile.pdf -F report_design.rptdesign

I hope it will help somebody.

Wednesday, February 6, 2008

Exporting RCP application in Eclipse 3.4M4 with Java 1.6 on board

Recently I have been trying to export small RCP application from Eclipse 3.4M4. Unfortunately I encountered problems with exporting plug-ins which were using Java 1.6 specific features. I have even reported new bug, however Remi Chi Jian Suen was on his place and suggested me to add:
jre.compilation.profile = JavaSE-1.6
entry to the file of my plug-ins. It worked perfectly - thanks Remi! The only doubt I have is: shouldn't it be added automatically when user uses Java 1.6 no to let him go to similar troubles?

Tuesday, February 5, 2008

4'th February - World Cancer Day

How this topic is related to Eclipse ? Well, not directly. But as Eclipse is a community we should take care of each other. I belief at least some of you will find this information really useful.
Link to my blog's record:
Direct link to the presentation about cancer's prevention methods:

Saturday, February 2, 2008

Cut the tail

As Chris has posted the oldest bug in PDE is fixed. Maybe this is a good starting point for cutting the tail ? The next in queue are:

Maybe there are not most interesting ones but there is a lot more bellow id 100000.
So let's start slicing the tail :)

Btw. the oldest bug is 30.

Thursday, January 31, 2008

OSGi happy family: UserAdmin

Bundles, wiring, life-cycle and services architecture are not the only part of OSGi specification. Although they're "Core", standard covers also a number of services that we most likely gonna need - like HTTP, position (GPS!), preferences or user management.

User Admin Service comes into action whenever our application is run by multiple users with different privileges. It brings notion of Roles, Users and Groups, who have their properties and credentials. User can perform actions on behalf of selected role if he's one of that role's basic members and has all memberships required by that role. Authorization code looks like this:

User user = (User) UserAdmin.getUser("jacek");
Authorization auth = userAdmin.getAuthorization(user);
if (auth.hasRole("CVS_USERS")) {
// ...

Naturally users can come and go at any time, thus we're given actually two services: one for querying users (UserAdmin) and another to track any changes (UserAdminListener).
Generic specification allows for wide range of implementations behind UserAdmin. Equinox's one lays on Preferences (yet another OSGi service).
However UserAdmin is functionally very similar to JAAS, JAAS depends on JDK1.3 which is still to high barier for OSGi.

Wednesday, January 16, 2008

On my way to become commiter - homework

This post I dedicate to every fellow working day and night to get commiter status.

There is a time in every eclipser life, when one cannot hide longer in the shadow of internal packages, and has to stand firmly in the snihe of public API.

But one has to be very carefull, because demons of history sleep in Eclipse API. And if someone tries to influence their doze, will be punished.

There is only one way to survive: be faithful to the Eclipse tradition - do not try to break rules.

If you do not know am I talking about - please take a look into eclipse wiki. That's your homework (and mine too).

Just to give you prove that deamons do not sleep:
I have fixed once bug 205194 and that was serious crime which I have not even realized. Then the beast come to me.

Please do not follow my path.

Cheers ;).

Tuesday, January 15, 2008

Do bugs go to heaven?

As we're on fuzzies subject, I wonder how many of you still fill them when you mark bugs FIXED. Probably not many, I heard it's a daily ritual for committers to click FIXED button. :) But what happens after that single preciously investigated being disappears from our Mylyn task list, Firefox history or finally current Milestone horizon?
Well, bugs don't end up their lives in heaven. They sleep buried deeply in unmaintained CVS branch and patiently wait for their time.

Some people happen to work with applications based on Eclipse 3.0 or 3.1 and, among all good they produce, they accidentally bring past into life. Here I come into action with magic Spell Book bugzilla and it's always such a relief to see spells like "fixed in v20030501", or "problem was class XYZ.getFoo() which I have just updated" instead of incorrect Target Milestone field or meaningless "Fixed".
And I'll not mention some EMF gurus who seem to have fun leaving beautiful trace of their code transparency. EMF bugs go to heaven :)

Friday, January 4, 2008

Eclipse Con 2008

I will be there!