Finally Eclipse 3.4 Ganymede has been officially released! While I’m currently working on Eclipse based product I was monitoring the progress of the platform beginning with Milestone 3. It looks like release 3.4 is moving Eclipse into the right direction. Provisioning mechanism was included into standard distribution, it is called p2. We probably have to wait some time to get more mature version of it – but it’s great that it is in a “main stream” now.
I really enjoy some enhancements that make working with Eclipse IDE more efficient:
- Automatic updates done in background;
- Option for determining network proxy settings from system instead of configuring them in preferences;
- Mylyn extension for search plugin;
Small but annoying issue: Delta Pack is not included into standard distribution for RCP/Plugin development (bugzilla)! Fortunately there is now at least a message in editor for *.product configuration explaining that Delta Pack has to be installed separately (in Eclipse 3.3 you could spent several hours investigating the issue of missing Delta Pack).
Activator is a class in a Eclipse plugin which controls the plug-in life cycle. It contains methods like
stop(BundleContext context) and a static method
Activator getDefault() – which returns static field
plugin. What is interesting the the static field
plugin is set in the non-static public method
start(BundleContext context) or in a public constructor.
Such code is generated by Eclipse wizard for creating new plug-in. And this is Eclipse pattern for accessing the shared instance…
Actually there are more places where this pattern is used in Eclipse framework and very often it is the only way for obtaining a reference to particular object. Let me discuss those later.
It looks like Eclipse DemoCamp will come to Krakow sometime in June. The agenda is not available now, but I hope it will be interesting. There is a lot of exciting stuff coming with Eclipse 3.4 (I’m currently working with Eclipse 3.4 M7 platform and looking forward for final release that is coming in end of June).
Agenda, specific date and place should be announced here
All the resources in Eclipse workspace are case-sensitive. Name of the file inside a project in Eclipse workspace is case-sensitive. On Eclipse API level two resources called somefile.TXT and somefile.txt are different resources. The problem starts while such resources are stored in the file system. Method
org.eclipse.core.resources.IResource.exists() will return false for somefile.TXT if there is already somefile.txt in the workbench. This cause problem if you are for example implementing wizard for creating new file resource – basing on the Eclipse API you cannot check if such file already exists. My workaround for this was using java.io classes directly for this. Another problem is if in you wizard you want to overwrite existing file with new one e.g. somefile.TXT with somefile.txt. If you try to use
org.eclipse.ui.ide.IDE.openEditor(IWorkbenchPage page, IFile input, String editorId, boolean activate) for this overwritten file – it will fail opening it. In Eclipse 3.3 there was introduced method
openEditor(IWorkbenchPage page, URI uri, String editorId, boolean activate) – which doesn’t have problem with case-sensitivity. Unfortunately it opens the file in read-only mode while the new resource is out of the workbench! I haven’t found any nice programmatic way to “refresh” workbench in order to reflect the changes that were made on file system behind the scene (as user can do manually by pressing F5). May workaround for this is opening the editor twice – first time using
openEditor(IWorkbenchPage page, IFile input, String editorId, boolean activate) and closing it immediately in order to “refresh” workbench and after that using
openEditor(IWorkbenchPage page, URI uri, String editorId, boolean activate) – now the new file is already in the workbench and the it’s not opened in read-only mode.
This is one of the problems I encountered while developing Eclipse plugins on Windows platform. I’m missing possibility for configuring all the resources related code for dealing with OS-dependent stuff like mentioned above problem with case-sensitivity.
Eclipse 3.3 API reference can be found here.