Showing posts with label eclipse. Show all posts
Showing posts with label eclipse. 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!
May 9, 2008
Plugin obfuscation with obfuscate4e
A new version of obfuscate4e is out the door. So let me tell you what it's all about.
Obfuscate4e helps you obfuscating your eclipse-plugins. It integrates ProGuard into the EclipseIDE and provides some functionality to ease the integration into the PDE build process. That means whenever you build your plugin (using plugin export, feature build or product build) it is obfuscated automatically.
There are quite a few reasons to obfuscate your plugins: smaller bundles and faster downloads, removing unused classes, hiding implementation details, ...
Even if you don't develop plugins, obfuscate4e has something to offer: it registers a proguard ant task you can use in your build scripts. But to leverage its full strength, consider converting your java project into a plugin project, even if you don't plan to use it in an OSGi environment.
Obfuscate4e comes currently in version 0.6, so it is not quite rock solid. And some knowledge of the ProGuard syntax is needed. But don't be afraid, it is not that tricky. So check it out, use it, and give us some feedback on how to improve it.
Obfuscate4e helps you obfuscating your eclipse-plugins. It integrates ProGuard into the EclipseIDE and provides some functionality to ease the integration into the PDE build process. That means whenever you build your plugin (using plugin export, feature build or product build) it is obfuscated automatically.
There are quite a few reasons to obfuscate your plugins: smaller bundles and faster downloads, removing unused classes, hiding implementation details, ...
Even if you don't develop plugins, obfuscate4e has something to offer: it registers a proguard ant task you can use in your build scripts. But to leverage its full strength, consider converting your java project into a plugin project, even if you don't plan to use it in an OSGi environment.
Obfuscate4e comes currently in version 0.6, so it is not quite rock solid. And some knowledge of the ProGuard syntax is needed. But don't be afraid, it is not that tricky. So check it out, use it, and give us some feedback on how to improve it.
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. ;-)