Thursday, September 01, 2011

My Eclipse Development Tips

Here are few tips which I learned while developing RCP Application for my dad:
1) How to make RCP application open in full screen?

In the default RCP application which eclipse provides as tutorial, there is a class ApplicationWorkbenchWindowAdvisor which extends WorkbenchWindowAdvisor. Override parent class method and add this single line:

public void postWindowOpen() { /* Opens the Application in Maximized form */ getWindowConfigurer().getWindow().getShell().setMaximized(true); }
2) If you have made RCP application from scratch, you will see the VIEWS don't have rounded corners. How to get all VIEWS have rounded corners?

- Create a file plugin_customization.ini (at the same level as plugin.xml) in your RCP application
- Add the line "org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=false" into this file

Note: Remember to add this file to your build path, other wise while running application from eclipse you will get rounded-corners but when you export it as a product, you will once again get it same as square corners
3) In Javadoc you want to change the value of @Author tag from say your company employee ID to your own name?

Eclipse takes $user.name environment variable to put the value the @Author tag in the java doc. To override this behavior you can add the following line into the eclipse.ini file
-Duser.name=My Name

More to come later...

No comments: