platform-core – http://eclipse.org/eclipse/platform-core/updates
Sample settings of the Runtime Spy .options file
#### Monitoring settings
# monitor class loading
# monitor bundle activation
# monitor resource bundle (*.properties) loading
#### Trace settings
# trace class loading – snapshot the execution stack when a class is loaded
# trace location – file in which execution traces are written
# trace filters – Java properties file defining which classes should
# be traced (if trace/classLoading is true)
4. Well even after enabling all types of monitoring, we still sometimes can not find out why certain apps leads to OutOfMemory Error !
Then the only way out is to generate the Heap Dumps and Thread Dumps.
We can add this vmarg in eclipse.ini –
-Xdump:java+heap+system:events=user,opts=CLASSIC+PHD so that whenever SendSignal is executed corresponding dumps will be generated.
Otherwise we can start eclipse in command prompt as follows and then do Ctrl+break to signal the vm.
eclipse -vm \bin\java.exe -console -consoleLog -vmargs -verbose:class -verbose:dynload -Xms1024m -Xmx1536m -XX:MaxPermSize=128m -Xdump:heap+java:events=user,opts=CLASSIC+PHD -Xgcpolicy:optavgpaus.
Another way to send stop signal to vm – cdb -p -c “.dump /ma java.dmp;q” – Where is the integer process Id of the java process.
5. Time to highlight the importance of designing API and SPI using eclipse codebase.
This is an invaluable source of knowledge about evolving Eclipse API and proper usage of annotations like
@noimplement, @noextend etc.
Its a classic : http://www.eclipse.org/eclipse/development/java-api-evolution.html
6. In order to enforce API Analysis we should refer to – http://www.eclipse-tips.com/tutorials/26-api-tooling-tutorial. After all Eclipse is meant for coding clean interfaces and abstract classes that communicates to users through simple annotations and robust patterns.
7. Its not a bad idea to enforce internationalization – using the setting – org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error in .settings file.
Fixing Int issues at the early stage prevents from wasting a good amount of time and introducing unsolicited bugs at the time of product delivery phase.
8. we should flag ‘unused imports’ as errors in preference to make it a daily habit getting rid of unnecessary evils.
9. Templating try / catch to actually catch and log an exception is a MUST ! Eclipse should fix this by default providing a exception.printStackTrace() statement. Empty catch blocks are silent killers that remain hidden inside deeply nested api !
— enforce usage of @since, @noimplement annotations
13. The last but not the least FindBug (http://findbugs.cs.umd.edu/eclipse) should be part of development environment and be actively used.
Well … a bonus tip for hackers 🙂 … don’t forget the decompiler plugin –http://java.decompiler.free.fr/jd-eclipse/update- using which you can even debug any class that essentially do not have source base shipped with its tool !