My slides about my experience with webOS and the development of Sorting Thoughts for webOS:
Programming
webOS by Example: Sorting Thoughts
Platform check in Eclipse 3.5
To check the running platform in an Eclipse 3.5 plugin or RCP app use this:
org.eclipse.jface/src/org/eclipse/jface/util/Util.java
...
/**
* Note: this may be made internal in 3.5
* @return true for windows platforms
* @since 3.5
*/
public static final boolean isWindows() {
final String ws = SWT.getPlatform();
return WS_WIN32.equals(ws) || WS_WPF.equals(ws);
}
/**
* Note: this may be made internal in 3.5
* @return true for mac platforms
* @since 3.5
*/
public static final boolean isMac() {
final String ws = SWT.getPlatform();
return WS_CARBON.equals(ws) || WS_COCOA.equals(ws);
}
...
How-to: Eclipse Commands
If you searching for good eclipse commads instructions, see here…
Six good articles by Prakash G.R.:
- Commands Part 1: Actions Vs Commands
- Commands Part 2: Selection and Enablement of IHandlers
- Commands Part 3: Parameters for Commands
- Commands Part 4: Misc items …
- Commands Part 5: Authentication in RCP applications
- Commands Part 6: Toggle & Radio menu contributions.
Other articles:
- Using advanced features in Eclipse popup menus
- Advanced features in Eclipse popup menus – Take 2: The new API
- Commands in die Toolbar einfügen
and the standard set of references:
Lösungen für einen SWT Rich Text Editor
Wenn man, wie ich, vor der Aufgabe steht einen WYSIWYG Rich Text Editor in eine Eclipse RCP Anwendung zu integrieren, stellt man leider schnell fest, das es keine Standardlösung gibt. Vielmehr hat man folgende Optionen mit ganz speziellen Vor- und Nachteilen, für die man sich entscheiden muss:
GuiceBerry: JUnit with dependency injection
GuiceBerry brings the joys of dependency injection to your test cases and test infrastructure. It leverages Guice to accomplish this. It allows you to use a composition model for the services your test needs, rather than the traditional extends MyTestCase approach.
GuiceBerry does not supplant your JUnit testing framework — it builds on top of it (and works around it, when necessary), so you can run your tests normally, from your favorite command line or IDE environment.
Links
- Presentation Video: Clean Code Talks – “GuiceBerry” and Slides
- GuiceBerry Project Page
- GuiceBerry Tutorial
- Guice
Berkeley DB JE: DPL Assistant for Eclipse
The Berkeley DB Java Edition Team announced the DPL (Direct Persistence Layer) Assistant Eclipse Plugin:
This first version of the plug-in performs validation of DPL
annotations in Java source code. Each time you save changes from the
Java source code editor, the validator analyzes annotations (@Entity,
@Persistent, etc.) and reports any errors or warnings that it can
detect, in a similar way to how the IDE reports Java compilation
errors.
- Usage and Installation infos: Berkeley DB Java Edition Forum
- Update-Site: http://download.oracle.com/berkeley-db/eclipse/
Java Performance Tuning
A Conversation With Java Champion Kirk Pepperdine:
“Because we’re trained to look at code, when something goes wrong, we look at code… Developers often fix things that have little or no impact on overall performance. I’ve seen teams literally waste months rewriting ugly code that had no impact on performance.”
Kirk Pepperdine
The Eclipse Movie..
..or the organic software visualization of Eclipse (SDK).
This visualization, called code_swarm, shows the history of commits in a software project. A commit happens when a developer makes changes to the code or documents and transfers them into the central project repository. Both developers and files are represented as moving elements. When a developer commits a file, it lights up and flies towards that developer. Files are colored according to their purpose, such as whether they are source code or a document. If files or developers have not been active for a while, they will fade away. A histogram at the bottom keeps a reminder of what has come before.
see Code Swarm, http://code.google.com/p/codeswarm
code_swarm – Eclipse (short ver.) from Michael Ogawa on Vimeo.
Communicate code changes – But how?
What is the best way to communicate source code changes? Write a mail, send an instant message or hope the next cvs sync will inform all your co-worker? Vincent Massol suggests two solutions: “Diff emails on SCM commit” and “RSS feeds”. This solutions are good ideas for small projects, but with a lots of changes (important and unimportant) this doesn’t work.
I think the best way to communicate important source code changes is a project team Wiki with the ability to create source code links. This links should have two possible targets. When you click on a source code link in a standard browser, you will directed to the source code in a WebCVS view and a click in the Eclipse embedded web browser will open the source code.
If you use SnipSnap as project wiki tool, you can install my IDE Wiki Plugin for Eclipse to use source code links:

Links
- IDE Wiki Plugin – Project Site
- Screencast
- Installation Instruction
- Download (ZIP: plugin + SnipSnap extension)
- Eclipse Update Site (plugin only):
http://ide-wiki.googlecode.com/svn/trunk/IdeWikiUpdateSite/
Must have Code Quality Plugins for Eclipse
Findbugs looks for bugs in Java programs
Update-Site: http://findbugs.cs.umd.edu/eclipse/
PMD scans Java source code and looks for potential problems
Update-Site: http://pmd.sourceforge.net/eclipse
Checkstyle helps you ensure that your Java code adheres to a set of coding standards
Update-Site: http://eclipse-cs.sourceforge.net/update/
Code Analysis Plugin (CAP) checks dependencies between the classes and packages and gives you a hint about the architecture, reusability and maintainability.
Update-Site: http://cap.xore.de/update
moreUnit is a eclipse plugin that should assist you writing more unit test.
Update-Site: http://moreunit.sourceforge.net/org.moreunit.updatesite/
EclEmma is a free Java code coverage tool for Eclipse.
Update-Site: http://update.eclemma.org/
JAutodoc is an Plugin for automatic adding Javadoc and file headers to your source code.
Update-Site: http://jautodoc.sourceforge.net/update/
Java Wikipedia API 3.0.1 released
Das MathEclipse Projekt hat eine neue Version von der Java Wikipedia API veröffentlicht. Die API ermöglicht das Rendern von Wikipedia-Texten zu HTML, PDF und Docbook. Verwendung findet die API z.B. im “Eclipse Wikipedia Editor“.
Links
- Java Wikipedia API Projekt-Seite (License: Eclipse Public License – v 1.0)
- ChangeLog? – gibt’s leider nicht
- Wikipedia Markup
- Alternative Java™ API für SnipSnap Wiki Texte: Radeox
Comparing of Emma and Cobertura
Google Video Link: CIJUG Emma vs. Cobertura (Feb 2007) via CIJUG
Eclipse Plugin Tip – EclEmma
EclEmma is a free Java code coverage tool for Eclipse, available under the Eclipse Public License. Internally it is based on the great EMMA Java code coverage tool, trying to adopt EMMA’s philosophy for the Eclipse workbench:
- Fast develop/test cycle: Launches from within the workbench like JUnit test runs can directly be analyzed for code coverage.
- Rich coverage analysis: Coverage results are immediately summarized and highlighted in the Java source code editors.
- Non-invasive: EclEmma does not require modifying your projects or performing any other setup.
..implemented by Marc R. Hoffmann. It’s simply the best JUnit coverage plugin for Eclipse.
- Project Site
- Update Site: http://update.eclemma.org/
