Eclipse Tips – Some useful static access for PDE/RCP developper
Did you ever be amazed when discovering a static method that provides you exactly the feature that you need?
Did you ever be amazed when discovering a static method that provides you exactly the feature that you need?
No later than this week, I was (again) amazed by such a killer feature. It was just when I want to open the log file in an editor. With 4 classes, it was done!!
So, I will share with you these classes and some of my beloved static methods also provides by them.
- PlatformUI : the one that I used the most…
- access to the Workbench and so easy access to all parts of your application (and get the active ones),
- the PreferenceStore where you can set some preferences of the user,
- and can also create Display to… display ^^ a new window - Platform : we can found a lot of things, I advice you take a look.
- provides a lot of OS related information,
- access to the ExtensionRegistry (all extensions declared… and providing to your extension points
),
- the log file location,
- … and many other things!! - EFS (which stands for Eclipse File System) : Introduce in 3.2, I think that it is an underrated class and that it provides a good API to manipulate files.
- static access to files giving it URI, IPath, File…
- and then manipulating easily via the interface IFileStore which is returned - IDE : A lot of convenience method to open file in editor
- convenience method to open file from inside and outside of the workspace
- convenience method to open file designed by URI, IPath, IFile,…
- convenience method to open a file at a specified Marker
- … and some other options
I let you discover all the possibilities… and share your beloved ones!!

Recent Comments