Showing posts with label rcp. Show all posts
Showing posts with label rcp. Show all posts
May 11, 2009
obfuscate4e 0.7.0 released
Just want to let you know that obfuscate4e 0.7.0 is now available to help you obfuscate your eclipse plugins. The hightlight of this release is automatic detection of classes referenced in extensions. This makes setting up your project for obfuscation a lot easier. So check it out!
August 29, 2008
August 15, 2008
Eidle 0.2 Release Canditate 2
The second candidate of the version 0.2 of Eidle is available. It includes all the functionality planned for 0.2. Since candidate 1, I added (basic) support for multi-monitor systems and further evolved the auto minesweeper.
The final release isn't far away and will probably not be too different from this candidate. So give it a try, and tell me what you think.
The final release isn't far away and will probably not be too different from this candidate. So give it a try, and tell me what you think.
May 16, 2008
Eidle 0.2 Release Canditate 1
I've just uploaded the first candidate for the upcoming Eidle release. So let me tell you what Eidle is all about.
Eidle is a screensaver framework based on EclipseRCP. As such it can easily be extended by your own animations. Currently, it comes with a 15-puzzle-like animation, a flashlight animation, an integrated browser, a picture presenter and a minesweeper autoplayer.
Eidle currently focuses on the integration into Windows, for which an installer is provided. I've also made some experiments on integrating it into EclipseRCP-based applications like the EclipseIDE or Lotus Notes8, but this probably won't make it into the next release.
Eidle is a screensaver framework based on EclipseRCP. As such it can easily be extended by your own animations. Currently, it comes with a 15-puzzle-like animation, a flashlight animation, an integrated browser, a picture presenter and a minesweeper autoplayer.
Eidle currently focuses on the integration into Windows, for which an installer is provided. I've also made some experiments on integrating it into EclipseRCP-based applications like the EclipseIDE or Lotus Notes8, but this probably won't make it into the next release.
September 26, 2007
Switching between languages at runtime
One of the requirements we have in our project is to support switching between different languages at runtime. To make this work in the RCP runtime, we decided to close the workbench window and open a new one when the language changes. This works quite well, especially since we have put all state data of the gui in separate models.
Another thing was how to handle data lazily loaded by the platform. For example, a view tab may be visible before the view is actually instanciated. The platform then uses the data (name) given in the extension definition of the view. But this is static, so it won't change if the language changes. We solved this by providing what we call ViewLocalizations via a custom extension point. The ViewLocalization resides in the same bundle as the view it belongs to and knows how to translate the view name. Our Presentation then uses the view localization to determine the right name for the view. Of course, a bundle should not be activated only because one of its ViewLocalizations is needed. Therefore, we put all the ViewLocalizations of a bundle in a separate package which we excluded from the lazyStart-mechanism.
This solution works quite well, but generates a considerable overhead. Especially since beside views, also perspectives, actions, etc. have to be handled this way. So if you have any ideas for improvements, please let me know.
Another thing was how to handle data lazily loaded by the platform. For example, a view tab may be visible before the view is actually instanciated. The platform then uses the data (name) given in the extension definition of the view. But this is static, so it won't change if the language changes. We solved this by providing what we call ViewLocalizations via a custom extension point. The ViewLocalization resides in the same bundle as the view it belongs to and knows how to translate the view name. Our Presentation then uses the view localization to determine the right name for the view. Of course, a bundle should not be activated only because one of its ViewLocalizations is needed. Therefore, we put all the ViewLocalizations of a bundle in a separate package which we excluded from the lazyStart-mechanism.
This solution works quite well, but generates a considerable overhead. Especially since beside views, also perspectives, actions, etc. have to be handled this way. So if you have any ideas for improvements, please let me know.
July 23, 2007
An extension is not an extension point
I'm currently working for a customer in an RCP project. There is a lot of work to be done and we are around a dozen of programmers actively contributing. A couple of weeks ago we had a strange problem.
One of the core plugins of the app defines an extension point which is actively used by other components. At some point these extensions were not loaded anymore. After quite some time of guessing we found that there was a new plugin using the extension point. But instead of defining an extension the developer (not really familiar with the Eclipse extension mechanism) had defined an extension point. He named it exactly as the existing one and used the original schema file by referencing it from the original core plugin. I was somewhat surprised that the framework did not complain about this duplication, but the main lesson to learn is certainly that there is some basic RCP mechanisms every developer should be familiar with before contributing.
One of the core plugins of the app defines an extension point which is actively used by other components. At some point these extensions were not loaded anymore. After quite some time of guessing we found that there was a new plugin using the extension point. But instead of defining an extension the developer (not really familiar with the Eclipse extension mechanism) had defined an extension point. He named it exactly as the existing one and used the original schema file by referencing it from the original core plugin. I was somewhat surprised that the framework did not complain about this duplication, but the main lesson to learn is certainly that there is some basic RCP mechanisms every developer should be familiar with before contributing.
July 22, 2007
Actions with text in EclipseRCP
I'm using EclipseRCP for more than three years now, and I must say they've come a long way. I still really enjoy it, and with all the upcoming projects there's always new things to discover.
Standard functionality (like hooking buttons into the GUI) is next to trivial (as it should be) but sometimes things get a little bit more complicated when you want your application to look different than the Eclipse IDE.
A simple example, I like toolbar buttons to have a text next to the image. A little read shows that you can achieve this by setting the toolbar style in your actionbar advisor, and then defining your (global) actions there. Things get a bit more involved when you start using editors, and you want your editor actions (contributed via the IEditorActionBarContributor interface) to look the same as the global ones. You can still set the ActionContributionItem.MODE_FORCE_TEXT mode on your toolbar item, but there is no way to change the text alignment (I like the text to be below the image). Digging into the eclipse code I found that the toolbar used for the editor actions is created using the IActionBarPresentationFactory interface. A default one is used if you don't define your own presentation factory (extending AbstractPresentationFactory) which implements IActionBarPresentationFactory. So I created my own presentation (basically delegating to WorkbenchPresentationFactory) and let it extend IActionBarPresentationFactory.
It works, but uses internal API. So if anybody knows a better way to do that, drop me a line.
Standard functionality (like hooking buttons into the GUI) is next to trivial (as it should be) but sometimes things get a little bit more complicated when you want your application to look different than the Eclipse IDE.
A simple example, I like toolbar buttons to have a text next to the image. A little read shows that you can achieve this by setting the toolbar style in your actionbar advisor, and then defining your (global) actions there. Things get a bit more involved when you start using editors, and you want your editor actions (contributed via the IEditorActionBarContributor interface) to look the same as the global ones. You can still set the ActionContributionItem.MODE_FORCE_TEXT mode on your toolbar item, but there is no way to change the text alignment (I like the text to be below the image). Digging into the eclipse code I found that the toolbar used for the editor actions is created using the IActionBarPresentationFactory interface. A default one is used if you don't define your own presentation factory (extending AbstractPresentationFactory) which implements IActionBarPresentationFactory. So I created my own presentation (basically delegating to WorkbenchPresentationFactory) and let it extend IActionBarPresentationFactory.
It works, but uses internal API. So if anybody knows a better way to do that, drop me a line.
Subscribe to:
Posts (Atom)
Blog Archive
About Me
- Volker
- codes for a living and also in his freetime, probably for lack of a real hobby. ;-)