tag:blogger.com,1999:blog-36914197442993514802024-03-13T09:00:33.787+01:00eclipser-blogThis is a blog of Eclipse enthusiasts from Poznań (Poland) who would like to share their knowledge of Eclipse. We work for the IBM Support Center for Eclipse at Poznań University of Technology.Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.comBlogger126125tag:blogger.com,1999:blog-3691419744299351480.post-46959951336702279722014-10-01T14:10:00.002+01:002014-10-01T15:09:01.850+01:00Workspace unsaved changes mystery demystified<p>
Are you an Eclipse plug-in developer and you have seen at least once a warning saying something about <i>unsaved changes in the previous session</i> like the one below?
</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-P_VaycFe_D4/VCvvwV4_akI/AAAAAAAAACk/3EksKdWZSHw/s1600/before.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-P_VaycFe_D4/VCvvwV4_akI/AAAAAAAAACk/3EksKdWZSHw/s1600/before.png" /></a></div></br>
<p>
Well, I bet you did, although you probably never paid attention to it since the warning is quite harmless, although can be very annoying. Let me explain why...
</p>
<p>
The warning is generated during Eclipse startup if your workspace was not properly saved during the previous session. <i>Not properly saved</i> means that something bad happened like process crash, blue screen, power down, etc., and normally you would lost your work. However, Eclipse is able to detect this situation and recover. Not a very fancy recovery, but it does the job and so the warning message is very informative because it's good to know that Eclipse just recovered your work behind the scenes. So far so good.
</p>
<p>
The annoying part is that it can happen even if you are 100% sure that you closed your Eclipse the right way without any crash and all looked good when you closed it the last time. So, why Eclipse tries to recover something if there <strike>is</strike> <b>should be</b> nothing to recover?
</p>
<p>
The answer is that in most cases you didn't do anything wrong and the <i>unsaved change</i> was generated by some badly written plug-in that modified your workspace after you already asked Eclipse to shut down. If you are a curious person like I am, you will probably ask "<i>Fine, but which of the plug-ins is the bad one?</i>" Well, easier said than done. Especially because it happens during shutdown and you will be warned there was some <i>unsaved change</i> during next Eclipse startup. This is a bit too late...
</p>
<p>
The warning became so annoying that I decided to spend some time to adjust the workspace save behaviour so that we can distinguish <i>unsaved change</i> caused by power down from the one caused by a badly written plug-in and then find out in a semi-automatic way which plug-in is the culprit. Since <a href="http://download.eclipse.org/eclipse/downloads/">Eclipse SDK 4.5 build-id I20140930-0800</a> additional error message will be logged if there is any code that tries to modify your workspace after you already asked Eclipse to stop. Here is an example:
</p>
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-nbQF3XcMxkk/VCvv6qLPe4I/AAAAAAAAACs/PC5oOWCR3uo/s1600/after.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-nbQF3XcMxkk/VCvv6qLPe4I/AAAAAAAAACs/PC5oOWCR3uo/s1600/after.png" /></a></div></br>
<pre>!ENTRY org.eclipse.core.resources 4 10035 2014-09-30 17:27:37.511
!MESSAGE The workspace will exit with unsaved changes in this session. Snapshot requestor: org.eclipse.core.internal.events.NotificationManager$NotifyJob(Updating workspace)
!STACK 0
java.lang.RuntimeException: Scheduling workspace snapshot
at org.eclipse.core.internal.resources.SaveManager.rememberSnapshotRequestor(SaveManager.java:553)
at org.eclipse.core.internal.resources.SaveManager.snapshotIfNeeded(SaveManager.java:1476)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1499)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2321)
at org.eclipse.core.internal.events.NotificationManager$NotifyJob.run(NotificationManager.java:41)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)</pre>
<p>
If you have auto-build enabled, in most cases the error will mention one of these classes:
</p>
<pre><code>org.eclipse.core.internal.events.AutoBuildJob
org.eclipse.core.internal.events.NotificationManager.NotifyJob</code></pre>
<p>
This is the code that requested additional workspace save after you manually asked Eclipse to stop but in reality, this is not the problematic part of the code. So, how can you tell which workspace operation triggered an auto-build which in turn requested additional workspace save? Here is where the "<i>semi-</i>" part of the solution plays a role.
</p>
<p>
Whenever you see an error saying that <i>The workspace <b>will exit</b> with unsaved changes in this session.</i>, you already know that some plug-in modified your workspace without your knowledge after you asked Eclipse to stop. In order to find this plug-in you need to enable a few debug options including the <a href="http://www.eclipse.org/eclipse/news/4.5/M2/#resource-notifications">new debug option for resource change notifications</a> and then capture the console output to a file.
</p>
<p>
In the case I investigated, here is what I did:
</p>
<p>
1. Add <code>-consoleLog</code> to your eclipse.ini file.<br/>
2. Run Eclipse using the following command:<br/>
<pre><code>eclipsec.exe >> trace.txt 2>&1</code></pre>
3. Go to <b>Window > Preferences > General > Tracing</b> preference page.<br/>
4. Enable the <b>Enable tracing</b> option.<br/>
5. Expand the <b>Platform Core Resources</b> node and enable the following options:<br/>
<pre><code>org.eclipse.core.resources/build/delta=true
org.eclipse.core.resources/build/failure=true
org.eclipse.core.resources/build/interrupt=true
org.eclipse.core.resources/build/invoking=true
org.eclipse.core.resources/build/needbuild=true
org.eclipse.core.resources/build/needbuildstack=true
org.eclipse.core.resources/build/stacktrace=true
org.eclipse.core.resources/debug=true
org.eclipse.core.resources/notifications=true
org.eclipse.core.resources/save=true</code></pre>
Not all of them are strictly necessary, but since you don't want to do this more than once, it's better to gather all the data at first attempt.<br/>
6. Start using your Eclipse normally and observe the Error Log view. If you see "<i>The workspace will exit with unsaved changes in this session.</i>" error followed by "<i>The workspace exited with unsaved changes in the previous session;...</i>" warning, it is time to look at the trace.txt file.<br/>
<p>
The relevant part of the trace file is between the line that says:
<pre>Tue Sep 30 17:27:34 CEST 2014 - [ModalContext] org.eclipse.core.internal.jobs.ThreadJob(Implicit Job): Full save on workspace: starting...</pre>
and the first line that contains <pre>java.lang.RuntimeException: Scheduling workspace snapshot</pre>
</p>
<p>
Any resource change event that happened between this two lines could be the culprit of <i>unsaved changes</i> so now you need to read the trace file and see which event is suspicious. In my example, it was quite easy because the following event was generated after every full save on workspace:
</p>
<pre>Type: POST_CHANGE
Build kind: 0
Resource: null
Delta:
/[*]: {}
/External Plug-in Libraries[*]: {}
/External Plug-in Libraries/.searchable[*]: {CONTENT}</pre>
<p>
What it means is that whenever I ask Eclipse to stop, some plug-in modifies the content of <i>/External Plug-in Libraries/.searchable</i> file as part of the save operation. This results in subsequent resource change events being populated and triggering auto-build and in the end workspace snapshot which will give the <i>unexpected change</i> warning during next startup. Having all this data, the only thing that is left is to find out which plug-in is responsible for <i>/External Plug-in Libraries/.searchable</i> and then fix it.
</p>
<p>
If you want to see an example how the whole investigation was done in practice, take a look at <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=444988">bug 444988</a> where one of the problematic plug-ins was identified and will be fixed in the near future hopefully.
</p>
<b>Happy hunting! :)</b>Szymon Ptaszkiewiczhttp://www.blogger.com/profile/06077473347616527673noreply@blogger.com0tag:blogger.com,1999:blog-3691419744299351480.post-82769360206658590282013-06-28T12:36:00.000+01:002013-06-28T12:36:43.858+01:00Summary after DemoCamp in Poznan<p>
Eclipse DemoCamp in Poznan is over. It went great and a lot of people showed up. We had 55 people registered from which 44 showed up during the event. Fortunately, the local was big enough to hold everyone. Presentations were very interesting, although after the survey we sent to participants it turned out that those with an actual live demo were more attractive.
</p>
<p>
Here are some photos of our DemoCamp:
</p>
<a href="http://1.bp.blogspot.com/-SbnQO6LVj2U/Uc1vPRT16AI/AAAAAAAAABQ/xNBDjScr6H8/s1600/DSCF2470.JPG">
<img border="0" src="http://1.bp.blogspot.com/-SbnQO6LVj2U/Uc1vPRT16AI/AAAAAAAAABQ/xNBDjScr6H8/s320/DSCF2470.JPG" />
</a>
<a href="http://2.bp.blogspot.com/-yDJaarycw5Y/Uc1vPhrOcaI/AAAAAAAAABU/2nE2sQ6Wvko/s1600/DSCF2476.JPG">
<img border="0" src="http://2.bp.blogspot.com/-yDJaarycw5Y/Uc1vPhrOcaI/AAAAAAAAABU/2nE2sQ6Wvko/s320/DSCF2476.JPG" />
</a>
<a href="http://2.bp.blogspot.com/-7b00qxvK5EY/Uc1vPk0lmkI/AAAAAAAAABY/3oLDDoZNpiM/s1600/DSCF2485.JPG">
<img border="0" src="http://2.bp.blogspot.com/-7b00qxvK5EY/Uc1vPk0lmkI/AAAAAAAAABY/3oLDDoZNpiM/s320/DSCF2485.JPG" />
</a>
<a href="http://1.bp.blogspot.com/-H6ul-ERR7Q8/Uc1vQUYWFAI/AAAAAAAAABo/zLmj_gKLqyM/s1600/DSCF2492.JPG">
<img border="0" src="http://1.bp.blogspot.com/-H6ul-ERR7Q8/Uc1vQUYWFAI/AAAAAAAAABo/zLmj_gKLqyM/s320/DSCF2492.JPG" />
</a>
<a href="http://4.bp.blogspot.com/-PU1B_edOTUU/Uc1vSqGN75I/AAAAAAAAABw/7MB45-NHME4/s1600/DSCF2502.JPG">
<img border="0" src="http://4.bp.blogspot.com/-PU1B_edOTUU/Uc1vSqGN75I/AAAAAAAAABw/7MB45-NHME4/s320/DSCF2502.JPG" />
</a>
<a href="http://4.bp.blogspot.com/-0EnkEieyAhU/Uc1vVR9ImMI/AAAAAAAAAB4/1tfcQnQUL5k/s1600/DSCF2517.JPG">
<img border="0" src="http://4.bp.blogspot.com/-0EnkEieyAhU/Uc1vVR9ImMI/AAAAAAAAAB4/1tfcQnQUL5k/s320/DSCF2517.JPG" />
</a>
<p>
If you want to join us and present something in November, let me know.
</p>
<p>
See you in November! <br />
Szymon
</p>
Szymon Ptaszkiewiczhttp://www.blogger.com/profile/06077473347616527673noreply@blogger.com0tag:blogger.com,1999:blog-3691419744299351480.post-72226370991306980092013-06-07T10:55:00.000+01:002013-06-07T10:55:08.874+01:00Poster is done<img src="http://wiki.eclipse.org/images/e/ef/EclipseDemoCampKepler2013Poznan.png" alt="Eclipse DemoCamp Kepler 2013 in Poznan" width="500px">Szymon Ptaszkiewiczhttp://www.blogger.com/profile/06077473347616527673noreply@blogger.com1tag:blogger.com,1999:blog-3691419744299351480.post-22663180497642435642013-06-05T17:58:00.002+01:002013-06-05T17:58:14.553+01:00Eclipse DemoCamp in Poznan is coming<p>
The next version of one of the most popular IDEs is almost done. Get ready to be the first to see what's new in it! Join our Eclipse DemoCamp in Poznan and find out!
</p>
<p>
The event will be hosted at <a href="http://www.brotherspub.pl">The Brothers Pub</a> on Wednesday, June 12 at 6:30 PM. You can find more information about the event on our <a href="http://wiki.eclipse.org/Eclipse_DemoCamps_Kepler_2013/Poznan">wiki page</a>.
</p>
<p>
If you want to join us, please <a href="http://eclipsedemocampkepler2013poznan.eventbrite.com">register</a>, so that we can make sure you can get beer and pizza when you come. And hurry up, because there are not many seats left!
</p>
<p>
See you there! <br />
SzymonSzymon Ptaszkiewiczhttp://www.blogger.com/profile/06077473347616527673noreply@blogger.com0tag:blogger.com,1999:blog-3691419744299351480.post-29683996973606546892012-03-20T18:42:00.009+01:002012-03-20T18:53:50.707+01:00'Ignore optional compile problems' is now available with 3.8/4.2 M6<ul><br /><li>Have you ever been overwhelmed by thousands of potentially unimportant warnings in your Java project?<br /><li>Have you ever tried to avoid excessive error reporting from a source folder containing auto-generated code?<br /><li>Have you ever looked for a specific problem and could not find it because it drowned somewhere in the Problems view?<br /></ul><br /><br />If answer to any of the above questions is 'Yes', then I have good news for you! Finally, after several busy weeks, we have an option to ignore all configurable compile problems just a few clicks away!<br /><br /><h2>It's really simple!</h2><br />You can turn on the new <b>Ignore optional compile problems</b> option for each source folder available in your Java project. To do that, go to <b>Project properties > Java Build Path > Source</b> and toggle the value of 'Ignore optional compile problems' to <b>Yes</b>. With this option set to 'Yes', JDT compiler will suppress errors and warnings configured in the <b>Preferences > Java > Compiler > Errors/Warnings</b> page.<br /><br><br /><br /><img src="http://download.eclipse.org/eclipse/downloads/drops4/S-4.2M6-201203151300/images/ignore-warnings-source-folders.png" alt="Java Build path page with 'Ignore optional compile problems' highlighted"/><br /><br><br /><br />We wouldn't have the new option without great help from Satyam and Markus who spent a lof of time reviewing patches for <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=220928">bug 220928</a>. Thanks guys!<br><br /><br />For other noteworthy things available in 3.8/4.2 M6 see the entire <a href="http://download.eclipse.org/eclipse/downloads/drops4/S-4.2M6-201203151300/eclipse-news-M6.html">New and Noteworthy</a>.Szymon Ptaszkiewiczhttp://www.blogger.com/profile/06077473347616527673noreply@blogger.com0tag:blogger.com,1999:blog-3691419744299351480.post-5962460991420552282011-11-29T21:17:00.001+01:002011-11-29T22:09:11.375+01:00Time to say goodbye!I think I should start this writing from stating that this is a guest post, as I am no longer a member of IBM Eclipse Support crew.<br />
<br />
It has been almost 5 entire years since my office was formed as a kind of joint venture between Poznan University of Technology and IBM. My main responsibility was to help customers with their Eclipse related problems. As you know, many IBM Rational products are Eclipse based, even those server-side, so I never had enough time to blog or actively participate in Eclipse development - I barely managed to open a number of bugs that could change how corporations perceived Eclipse and Eclipse-based solutions.<br />
<br />
I'd say that my experience gathered on the border of open-source and enterprise worlds is a rather unique one. And I would like to share it with you <a href="http://www.eclipsecon.org/2012/sessions/what-do-companies-want" target="_blank">at EclipseCon</a>.<br />
<br />
I guess that my 5 years of work for IBM may be summarized with the following xkcd strip - I just started realizing that careers are hard ;-).<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://imgs.xkcd.com/comics/ages.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="145" src="http://imgs.xkcd.com/comics/ages.png" width="620" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span class="Apple-style-span" style="-webkit-text-size-adjust: none; background-color: white; font-family: 'dejavu sans mono', monospace; font-size: 11px; white-space: pre-wrap;">Every age: "I'm glad I'm not the clueless person I was five years ago,
but now I don't want to get any older."</span></td></tr>
</tbody></table>
If you wonder what I will do next, please stay tuned! I will announce that on my newly created blog once it gets added to the planet Eclipse (I have already opened <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=364912" target="_blank">a bug for that</a>).<br />
<br />
I would like to publicly say "Thank you" to Daniel Megert for his incredibly reliable work, not only in JDT<b> - </b>and nominate him to Eclipse Community Awards in recognition.<br />
<br />
Thank you for reading this post :). I hope that I will have now much more time for writing.<br />
<br />
Krzysztof (Chris) DanielKrzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com3tag:blogger.com,1999:blog-3691419744299351480.post-56748917796126697022011-05-30T09:02:00.000+01:002011-05-30T09:02:03.703+01:00A very interesting bug reportOne image is worth more than a thousand of words.<br />
Just check this <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=347564">real bug</a> report:<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-FMO_DJh8WJ4/TeNOMiuUyeI/AAAAAAAAB1s/Q0p7IrC8cEQ/s1600/Bug347564.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="452" src="http://1.bp.blogspot.com/-FMO_DJh8WJ4/TeNOMiuUyeI/AAAAAAAAB1s/Q0p7IrC8cEQ/s640/Bug347564.png" width="640" /></a></div>Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com0tag:blogger.com,1999:blog-3691419744299351480.post-43830614940882163212011-04-28T12:00:00.000+01:002011-04-28T12:00:47.871+01:00New preferences for EclipseHello All!<br />
As you probably have noticed, Eclipse preferences are not perfect. A majority of enterprise companies struggle with enforcing consistent setttings across multiple installations, and so far nobody find a remedy which would be good enough.<br />
<br />
Recently a light appeared in the tunnel. Ericcson contributed <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=334016">code</a> for obtaining preferences from a certain URL, something similar to <a href="http://code.google.com/a/eclipselabs.org/p/workspacemechanic/">the Workspace Mechanic</a>, which may solve some of the enterprise problems.<br />
<br />
On the other hand, two GSoC proposals have been accepted in the area of preferences. I would like to get it done right this time, so any <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=341891">comments/suggestions are welcome</a>.Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com1tag:blogger.com,1999:blog-3691419744299351480.post-78915575907063831302011-02-28T10:06:00.002+01:002011-02-28T10:06:43.125+01:00New preferences for EclipseThis is just a small update to let you know that Eclipse preferences which I have described in my last post are hosted in Eclipse labs <a href="http://goo.gl/WcJvD">here</a> together with usage description.Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com0tag:blogger.com,1999:blog-3691419744299351480.post-845777731537959452011-02-21T09:19:00.005+01:002011-02-21T13:17:40.794+01:00New preferences for EclipseIt has been long time since I recently blogged on Planet Eclipse, but as an Eclipse Support Center we have been incredibly busy during the recent year. <a href="http://eclipser-blog.blogspot.com/2010/06/eclipse-preferences.html">Last time</a> I have mentioned preferences issues that are pretty often reported and left without a fix, because of Equinox preference limitations.<br />
We had no other choice to solve customer woes than to start a closer cooperation with Poznan University of Technology, and a group of excellent students, as a part of their thesis, analysed, designed and coded a separate preferences module, which addresses (almost) all issues in "old" preferences that we have been aware off.<br />
<br />
<b>Check out their webcast - it is definitely worth it (for some reason the video does not get displayed on Planet Eclipse, you have to refer to the original blog entry or <a href="http://www.youtube.com/watch?v=iFATKeQk7cw">directly to Youtube</a>).</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/iFATKeQk7cw?feature=player_embedded' frameborder='0'></iframe></div><div class="separator" style="clear: both; text-align: center;"><br />
</div>The project was started in Eclipse labs, but we would like to move it to incubator. Could any of full time commiters guide us through the process of code donation? Any help will be deeply appreciated.<br />
<br />
The code itself requires further work, like adding proper licensing headers, project naming issues, etc. I expect the code will be ready for reviews and donations before the end of month.<br />
<br />
Those excellent students that did that thing are:<br />
Marek Kuzora<br />
Anna Ferster<br />
Filip Wisniewski (responsible for the editor)<br />
<br />
Congratulations!<br />
<br />
<span class="Apple-style-span" style="color: #999999;">Note: Poznan University of Technology has more excellent students which would like to get experience in commercial environment (and write their thesis, too). So if you have any non-business-critical project (or research project) to realize, please drop me a line (krzysztof.daniel somewhere at pl.ibm.com), and I will contact you with appropriate person.</span>Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com4tag:blogger.com,1999:blog-3691419744299351480.post-51190917404124075722010-06-21T11:09:00.000+01:002010-06-21T11:09:41.807+01:00Eclipse preferencesAs you may remember from my earlier postings, on of conditions on which you can get your degree at Poznan University of Technology is taking part in so call Software Development Studio course. Participating students learn how it is like to write a software in real project, where are deadlines, quite a big team, changing requirements, real communication problems, etc. It is the first real experience of students with business world.<br />
<br />
Google has recently created their workspace mechanic, which addresses the most common problem that big adopters of Eclipse has - preferences management in corporate environments. I am very happy that someone has finally noticed this problem.<br />
<br />
However, I am not happy with installing 3rd party software to manage all the preferences. More, I do not believe it is a correct way. Eclipse, as a great platform, should offer such a functionality without the need of installing non-Eclipse plugins.<br />
<br />
That's why I am supervising the project called 'Extended Preferences'. It is at very early stage, we are not sure if it will be welcome by Eclipse Foundation, but if you have some specific requirement which you think we should implement, <a href="http://code.google.com/a/eclipselabs.org/p/e4preferences/issues/list">just let us know</a>.<br />
<br />
For now, we would like to satisfy following requirements:<br />
<ul><li>ability to define during the development, which preferences can be exported</li>
<li>ability to define import strategy (override, merge or reset)</li>
<li>ability to create a set of preferences to distribute them amongst developers</li>
<li>ability to promote project preferences to workspace preferences</li>
<li>support preferences which can be shared across workspaces</li>
<li>help developers to use preferences correctly (implement change listeners!)</li>
<li>create migration tool </li>
</ul><br />
We are not sure if we will succeed, the project is at very early stage, but we are going to try hard.<br />
<br />
I will keep you informed :)Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com3tag:blogger.com,1999:blog-3691419744299351480.post-33807676461657801572010-01-26T15:54:00.000+01:002010-01-26T15:54:36.710+01:00Dropins diagnosisThis post is P2 related but I could not find the appropriate words to start it. Actually I would not know what to say about P2 even if I could write this in my native language. P2 was definitely a pain at some point, but I still have no clue about the real root cause - was it P2 or just the change of general approach to plugin management.<br />
<br />
While there are certainly areas for improvement, the P2 team does a great job in fixing bugs. They are preparing API, which in my opinion will speed up P2 adoption because you all will be able to wrap existing functionality into your UI, so there will be much more testing and much more bug reports :-).<br />
<br />
I wanted to let you know that one, in my opinion very important, bug has been fixed:<br />
<a href="http://bugs.eclipse.org/264924">Bug 264924 - [reconciler] No diagnosis of dropin problems</a>.<br />
<br />
If you add right now to your .options file following lines<br />
<pre>org.eclipse.equinox.p2.core/debug=true
org.eclipse.equinox.p2.core/reconciler=true
</pre>P2 will inform you what bundles were found in dropins/ folder, what request was generated, and what is the plan of installation. Maybe it is not detailed explanation of what actually happened, and what went wrong, but it should give you strong information about where to start - was your bundle in the plan? Was it installation problem (P2 fault) or maybe it is just not optimal to include your feature?<br />
<br />
This is not a lot and a lot at the same time ;-).Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com0tag:blogger.com,1999:blog-3691419744299351480.post-19344180028425468082009-12-17T14:02:00.001+01:002009-12-17T14:02:25.280+01:00Xtext - how to start<div>Sometimes is better to have screwdriver than swiss knife. At least people from the are of DSL think that. Well, I have decided to follow this path. I need a screwdriver. In our world one of the options is to use <a href="http://www.eclipse.org/Xtext/">Xtext</a>. Xtext is a framework for development of textual domain specific languages (DSLs).</div><div><p>What does it mean?</p>You can build a grammar description and with the use of the framework get a:<br />
<ol><li> EMF model related to this grammar.</li>
<li> Fully functional text editor. </li>
<li> Scaffold for the generation tool </li>
</ol><p>What for?</p><p>I need to record some data in structured form. I need model. Text editor is more convincing. <br />
But this is only my motivation. There is a sea of use cases. </p><p>How to start ?</p>You can download Eclispe Modeling tools distribution from <a href="http://www.eclipse.org/">Eclipse downloads site</a>. Or use update site.<br />
Then you can follow <a href="http://www.eclipse.org/Xtext/documentation/0_7_2/xtext.html#getting-started">Xtext documentation</a>. And this is the reason for this post. Although, you don't need to spend weeks on learning Xtext principles to build usable tools, still there are some things missing from the documentation.<br />
</div><div>You have created project, you have written your grammar. Now is a generation step. Is build successful ? Not really. If you look at the console view, you can find why. <br />
<cite>You are generating without ANTLR. It is highly recommended to download and use the plug-in 'de.itemis.xtext.antlr' using the update site http://download.itemis.com/updates/milestones</cite> <br />
Of course solution is to download the plug-in. After that you can follow the <i>getting started</i> tutorial.<br />
</div><div>Code is generated and now is time for building your XPand templates to generate Java code from your model. How to do that? There is no "generate sth.." button in your target environment. <br />
The simplest way is to import your xxx.generator plug-in project from source to target. You are almost done. The only thing left is to add required dependencies to imported project. It is also helpful to add XPand nature to this project. After that you can follow tutorial, build XPand templates, and generate Java code.<br />
</div>Hope this short note will help somebody to start the adventure with the screwdriver even smoother ;)<br />
Next time I will show you how to change editor default coloring.Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-3691419744299351480.post-56734783454574000712009-11-26T14:12:00.007+01:002009-11-30T13:44:57.393+01:00Business and academic environment should go together!You may not know this, but IBM Eclipse Support Center is a child of Poznań University of Technology and IBM. Both parties believe that science is valuable only when it is closely connected to the real business world.<br /><br />This is quite difficult to achieve at quite abstract level of ogranizations. "We support universities", "We are close to business world", those statements looks great in PR, which does not implicate real usefulness. The science should be inspired by business, and the business should benefit from the science. <br /><br />Poznan University of Technology managed to create quite good environment, where students can gain real experience, which is so important nowadays. Rules of cooperation are quite simple:<br /><ul><li>A company proposes a project, which cannot be mission-critical.</li><br /><li>6 students (4 developers, PM, Architect-Analytic) realize it as a bachelor thesis. This phase takes about 4-5 months.</li><br /><li>Everybody is happy, everybody gets something valueable. Students participate in real projects, talk with real customers, while companies have their projects made for free.</li><br /></ul><br />We'd like to help those students, give them Eclipse know-how, which will make them really productive. Because of that reason we decided to held <b><span style="color:green">FREE</span> Eclipse course for students.</b> Check the presentation for details:<br /><center><br /><iframe src="http://show.zoho.com/embed?id=649935000000005003" height="335" width="450" name="InvitationForTraining2-odp" scrolling=no frameBorder="0" style="border:1px solid #AABBCC"></iframe><br /></center><br />If you think that the cooperation between universities and commercial worlds is an absolute must, and you have ideas for which you do not have resources, please contact us <a href="http://eclipse.put.poznan.pl/contact/">contact us</a>.<br />Even if you have ideas about Eclipse itself, if you think there is something that can be improved by those students, some new feature implemented, do not hesitate!Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com0tag:blogger.com,1999:blog-3691419744299351480.post-75901370654530542952009-11-20T10:38:00.002+01:002009-11-20T10:47:25.776+01:00Eclipse Demo Camp in PoznańThis year Eclipse DemoCamp will be hosted at Poznan University of Technology.<br /><br />Please refer to details <a href="http://wiki.eclipse.org/Eclipse_DemoCamps_November_2009/Pozna%C5%84#Lectures"></a>.<br /><br />Check out our special guest!Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com1tag:blogger.com,1999:blog-3691419744299351480.post-48963325492369757162009-11-03T11:12:00.004+01:002009-11-03T11:27:38.926+01:00Small but usefull enhancements to StyledTextThe biggest problem with line indenting in StyledText was that only the first line was indented when word wrapping was enabled.<br />But right now this issue has been <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=115432">fixed by Felipe Heidrich</a>.<br />See the snippet:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_HD8AYVGgSww/SvAEo5zitFI/AAAAAAAAA9A/FvvYHa_Uvx4/s1600-h/StyledTextIndenting.PNG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 214px;" src="http://4.bp.blogspot.com/_HD8AYVGgSww/SvAEo5zitFI/AAAAAAAAA9A/FvvYHa_Uvx4/s320/StyledTextIndenting.PNG" alt="" id="BLOGGER_PHOTO_ID_5399821053975508050" border="0" /></a>Can you see the difference between first and second paragraph? I think it will address many many issues that you had with text indentation.<br /><br />The most important new API method is:<br /><code><br />StyledText#setLineWrapIndent(int, int, int)<br /></code><br /><br />The patch was released into Eclipse 3.6 M4 stream, so you need to checkout SWT from HEAD to utilize this awesome functionality.<br /><br />Regards,<br />ChrisKrzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com0tag:blogger.com,1999:blog-3691419744299351480.post-40695889352993816562009-11-02T09:40:00.003+01:002009-11-02T09:52:44.187+01:00Helios Staging RepositoryIf you work with Eclipse 3.6 dev stream and you need to install various additional tools/frameworks (like Mylyn, EMF or WTP) and you are fed up with googling for particular update sites you can use <a href="http://wiki.eclipse.org/Helios">Helios</a> Staging Repository (http://download.eclipse.org/releases/staging).<br /><br />Well, it allowed my to set up my new shiny M3 in 10 minutes.Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com0tag:blogger.com,1999:blog-3691419744299351480.post-1218865647418802042009-10-28T16:42:00.003+01:002009-10-29T07:47:34.837+01:00Eclipse e4 - getting started - dependency injection readingEclipse e4 right now is almost the synonym of the word "future". <br /><br />If you look for an excellent presentation that will bring you into the future, you can find it <a href="http://tomsondev.files.wordpress.com/2009/07/slides.pdf">here</a> (made by Tom Schindl).<br /><br />Reading <a href="http://jcp.org/aboutJava/communityprocess/final/jsr330/index.html">JSR 330</a> is also a good idea, because it will give you the basic understanding of Dependency Injection.<br /><br />The last, but not least, is looking at org.eclipse.e4.core.services.context.IEclipseContext javadoc, and then, in the end, at org.eclipse.e4.workbench.ui.internal.Workbench.<br /><br />All those readings will give you fair understanding of how dependency injection is used in e4.Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com2tag:blogger.com,1999:blog-3691419744299351480.post-47317029472802370242009-10-19T12:09:00.012+01:002009-10-19T15:08:37.256+01:00A word or two on status handling<div style="text-align: left;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_HD8AYVGgSww/StxyBtGEj0I/AAAAAAAAA84/7Bn-1l5HKl4/s1600-h/kodojebca.gif"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 150px; height: 107px; float: right;" src="http://piecyk.org/pub/kodojebca.gif" border="0" /></a>This summer was extremly hot in <a href="http://eclipse.put.poznan.pl/">Eclipse S</a><a href="http://eclipse.put.poznan.pl/">upport </a><a href="http://eclipse.put.poznan.pl/">Center</a>, but right now I have a little bit more time for Eclipse code writing.<br /></div><br />During those busy weeks I have seen a couple of times posts about logging, extended logging and other logging facilities, which are really great for headless applications, err, for OSGI applications.<br />But they all cannot be used to provide top-notch customer experience in business apps, because in general logs inform experienced users that something went wrong, but they will not help them in solving the issue.<br /><br />UI is quite happy, because all plug-ins that have user interface based on <span style="font-family:courier new;">org.eclipse.ui.workbench</span> may use <span style="font-family:courier new;">StatusHandler#handle(IStatus, int)</span> to report an issue and inform the user in consistent manner. But it is quite difficult to add custom actions to such an error report (f.e. '<span style="font-style: italic;">Refresh</span>' or '<span style="font-style: italic;">Restart</span>') although those kind of improvements are requested again and again for various problems (<a href="http://bugs.eclipse.org/33972">OutOfMemoryException</a>, <a href="http://bugs.eclipse.org/75170">NoMoreHandles</a>).<br /><br />Some people dream about <a href="http://bugs.eclipse.org/144035">automated Eclipse error reports</a>, while other would like <a href="http://bugs.eclipse.org/182776">to have more control</a> over displayed message (but they do not fill bugs ;-) ). The problem is also that non-UI plug-ins also report problems, and those problems should not be only logged, especially if a user can do something meaningful.<br /><br />I have spent some time on investigating those issues, and here is my demo(excuse poor screencast quality, it simply took to much space, so I compressed it, a version with slightly better quality is <a href="http://www.cs.put.poznan.pl/kdaniel/resorces/statushandlingDecorators.htm">here</a>), which shows what I have in mind: small service, which allows for registering customer status handling services, so you can decorate, handle, modify or add user hints before the status and error dialog is finally presented to the user.<br /><center><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash5/cabs/swflash.cab#version=5,0,0,0" width="658" height="489"><br /><param name="movie" value="http://www.cs.put.poznan.pl/kdaniel/resorces/if3.swf"><br /><param name="play" value="true"><br /><param name="loop" value="false"><br /><param name="quality" value="low"><br /><embed src="http://www.cs.put.poznan.pl/kdaniel/resorces/statushandlingDecorators.swf" quality="low" loop="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="658" height="489"></embed><br /></object><br /></center><br />This is not a part of work in progress, so until there is a huge interests please do not expect this code to appear in the platform. But you can help me decide if I should push this to Eclipse.<br /><iframe src="https://spreadsheets.google.com/embeddedform?key=t7w87sp_CDYn4SWLWwBSL8w" marginheight="0" marginwidth="0" width="760" frameborder="0" height="340">Loading...</iframe><br /><br />Best Regards,<br />Chris<br />Rational Eclipse TSEKrzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com2tag:blogger.com,1999:blog-3691419744299351480.post-28453512109376843532009-09-08T12:04:00.001+01:002009-09-08T12:06:04.638+01:00We have official website :DFinally, after almost 3 years you can read a little bit more about us:<br /><br /><div style="text-align: center;"><a href="http://eclipse.put.poznan.pl/"><span style="font-size:130%;">http://eclipse.put.poznan.pl/</span><br /></a></div>Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com2tag:blogger.com,1999:blog-3691419744299351480.post-79505815237548468422009-09-08T10:12:00.001+01:002009-09-08T10:13:46.876+01:00CNF goes to RAP<a href="http://3.bp.blogspot.com/_JDXC-LpQd0U/SqYfjZr5u6I/AAAAAAAADqE/Em2yW_g7vT4/s1600-h/Screenshot-2.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5379021497991543714" src="http://3.bp.blogspot.com/_JDXC-LpQd0U/SqYfjZr5u6I/AAAAAAAADqE/Em2yW_g7vT4/s320/Screenshot-2.png" style="cursor: pointer; float: left; height: 289px; margin: 0pt 10px 10px 0pt; width: 320px;" /></a><br />
As we started new project at the university the decision was to check if RAP can be used as web presentation layer. Yup, we'll try but there are some features missing.<br />
The biggest component we need in our system is Navigator (with pluggable content providers). But guess what ;) we have it in Eclipse == <b>CNF</b>. Unfortunately it doesn't work on RAP yet.<br />
Oh, well since yesterday there is some progress ;). If you're interested there is a <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288761">enhancement request</a> opened for this issue. There you can find modified CNF plug-in and usage example. Runs on RAP 1.3.0.Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-3691419744299351480.post-25844417685151037752009-08-20T08:57:00.003+01:002009-08-20T09:49:04.717+01:00Preferences NightmareBusiness Eclipse adopters quite common request for <a href="http://bug.eclipse.org/143457">headless preferences import/export</a>. Eclipse preferences has one big disadvantage - they are exported if and only if they have been changed. So if you and your friend have some compiler settings, and you would like to import his preferences, it is impossible, because both preferences set will be merged. There is also a request to <a href="http://bugs.eclipse.org/246754">reset all existing preferences prior to import</a>.<br /><br />We, as Eclipse support, have tried to deliver solutions to those problems. But we failed because of something rather unexpected:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_HD8AYVGgSww/So0EYARMA3I/AAAAAAAAA8Q/nN-5sO_62SA/s1600-h/obstactle.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_HD8AYVGgSww/So0EYARMA3I/AAAAAAAAA8Q/nN-5sO_62SA/s320/obstactle.JPG" alt="" id="BLOGGER_PHOTO_ID_5371954740958331762" border="0" /></a><br />There is too much freedom in preferences allowed.<br /><br />Developer tends to:<br /><ul><li>Cache preference node. This results in beautiful <span style="font-family:courier new;">java.lang.IllegalStateException: Preference node "org.eclipse.core.XYZ" has been removed.</span></li><li>assume that nobody else will modify those preferences and there is no need to listen for changes.<br /></li><li>assume that preferences can be changed only by preferences dialog and put some business logic into <span style="font-family:courier new;">IPreferencePage#performOK()</span>.</li></ul>And what about you? Can your preferences be exported and imported and changed via 3rd party? Or is it necessary to dig through your code innards to find what you call in performOK?<br /><br />Is it so difficult to choose the right way?<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_HD8AYVGgSww/So0NxnWFW5I/AAAAAAAAA8Y/r4JXLywF9tA/s1600-h/whichroad.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_HD8AYVGgSww/So0NxnWFW5I/AAAAAAAAA8Y/r4JXLywF9tA/s320/whichroad.JPG" alt="" id="BLOGGER_PHOTO_ID_5371965076549229458" border="0" /></a>Best regards,<br />ChrisKrzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com2tag:blogger.com,1999:blog-3691419744299351480.post-20278170187512012062009-08-17T14:38:00.004+01:002009-08-17T15:01:22.974+01:00Headless nightmareIt is considered as a proper design to separate *.core from UI. Such code is flexible and very easy to maintain. And exposes important functionalities to others, so they can adopt it and create amazing tool.<br /><br />But have you ever thought what will happen if your code will be used by headless client? In Eclipse support it is quite common case - someone create a scripts which creates workspace, sets up preferenfes, runs validation, builds jars and deploys them somewhere. It's only a couple of minutes to write that kind of script. Extending Eclipse requires a little bit more time, but it is possible to f.e. start server from ant script!.<br /><br />Great!<br /><br />But headless ant is also very quick route to headless hell. Ant application is not aware that there is no UI. Other plug-ins also seem to ignore that fact. Various dialog try to appear and break the build (there is no workbench!). There is actually ant application which creates workbench, but is it really headless script then, when user has to sit and answer when prompted?<br /><br />And what about you, dear Eclipse developer?<br />Do your *.core components work in headless mode? Are they protected against failed extension point initialization?<br /><br />I do not have even idea how to solve this issue correctly. I do not even know what should I request from bugzilla. Should each Eclipse application has own bundle set? Should Equinox allow for UI/non-UI/more general plugin division? Each architecture change will require a lot of work in many plug-ins (some plug-in cannot be easily decoupled, because f.e. *.core exposes extension point which needs to be contributed by one (and only one) extension (which is currently UI dialog)).<br /><br />Now something related to <a href="http://eclipser-blog.blogspot.com/2009/07/look-at-code-and-find-npe.html">my previous post</a>:<br /><ul><li>10% of readers was able to find the route couse in less than 10 seconds (I thought it is impossible).</li><li>60% needed more than 10 seconds, but less than 1 minute.</li><li>10% of readers finished before stopwatch shown 2 minutes.</li><li>7% was able to complete the quest in 5 minutes,</li><li>7% asked for more time.</li></ul>Chuck Norris also completed the survey. He was contacted by the code which asked for fix (-1 sec).<br /><br />You all are in quite good shape :-).<br /><br />Regards,<br />ChrisKrzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com4tag:blogger.com,1999:blog-3691419744299351480.post-44032456381186832282009-07-13T08:35:00.006+01:002009-07-13T09:58:32.080+01:00Look at the code and find NPENPE at IconAndMessageDialog.getSWTImage(). No line number.<br />How much time do you need to figure out what's wrong?<br /><br />This <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=107082">bugzilla entry</a> contains spoiler (comment 6, and solution, comment 10).<br /><br />The challenge code is:<br /><pre class="prettyprint lang-java"><br />private Image getSWTImage(final int imageID) {<br /> Shell shell = getShell();<br /> final Display display;<br /> if (shell == null || shell.isDisposed()) {<br /> shell = getParentShell();<br /> }<br /> if (shell == null || shell.isDisposed()) {<br /> display = Display.getCurrent();<br /> } else {<br /> display = shell.getDisplay();<br /> }<br /><br /> final Image[] image = new Image[1];<br /> display.syncExec(new Runnable() {<br /> public void run() {<br /> image[0] = display.getSystemImage(imageID);<br /> }<br /> });<br /><br /> return image[0];<br /><br /> }<br /></pre><br /><iframe src="https://spreadsheets.google.com/embeddedform?key=teuOMrG8BNCZTTLQzQNDoPQ" width="800" height="600" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe><br /><br />BTW. Does anybody knows good plug-in to export html code?Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com1tag:blogger.com,1999:blog-3691419744299351480.post-42063209955752408512009-07-06T17:43:00.002+01:002009-07-06T17:47:01.329+01:00Is this under EPL?<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_HD8AYVGgSww/SlIqQeamskI/AAAAAAAAA7A/O_sojiM5PH4/s1600-h/DSC02848.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_HD8AYVGgSww/SlIqQeamskI/AAAAAAAAA7A/O_sojiM5PH4/s320/DSC02848.JPG" alt="" id="BLOGGER_PHOTO_ID_5355389369427866178" border="0" /></a>Krzysztof (Chris) Danielhttp://www.blogger.com/profile/02643339658259354232noreply@blogger.com1