Java

Avoid pitfalls with property testers in a RCP app

Sorting Thoughts Context Menu
For a new Sorting Thoughts feature that give the user access to context based action items in a context menu, I learned again that Eclipse and the Command Core Expressions are sometimes not very clear. When you leave the trivial way, you can waste many many time to find the right solution.

At first glance it seems to be very easy, I thought I must only register and implement a property tester and all is fine. But I was wrong. Without the help of Robert Wloch article “Property Testers with Command Core Expressions” I never thought that I have to implement a start up trigger (IStartup) and a ISelectionChangedListener too. So, if you want implement context based menu entries with property testers read the article first.

Links


Useful RegEx Plugin for Eclipse

RegEx Util is a very useful Eclipse plugin for testing Java regular expressions:

Links


Comments Off more...

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);
	}
...
Comments Off more...


Lösungen für einen SWT Rich Text Editor [Update]

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:

(continue reading…)


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

Comments Off more...

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.

Comments Off more...

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

Comments Off more...

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/

Comments Off more...

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

Comments Off more...

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.

Comments Off more...

Dozer 3.0 Released

Dozer is a powerful, yet simple Java Bean to Java Bean mapper that recursively copies data from one object to another. Typically, these Java Beans will be of different complex types. Dozer supports simple property mapping, complex type mapping, bi-directional mapping, implicit-explicit mapping, as well as recursive mapping. This includes mapping collection attributes that also need mapping at the element level.

Comments Off more...

Use Embedded Tomcat in Eclipse for a Webapp

Einen wirklich interessanten “Tips and Tricks” Artikel hat Riyad Kalla auf EclipseZone veröffentlicht. Er beschreibt wie man den internen Tomcat von Eclipse, der z.B. für die Eclipse Help-Pages verwendet wird, für eigenen WebApps nutzen kann.

eclipse help page

Comments Off more...

Performancevergleich Servlet/JSP/JSTL

In der iX 10/2005 gab’s einen mehr oder weniger interessanten Artikel mit einigen Erkenntnissen:

Der Servlet-Zugriff erfolgte in Vorversuchen in einer Variante direkt über Tomcat, in einer anderen über das Apache-Modul mod_jk. Letzteres stellte sich als rund 30 Prozent langsamer heraus, …

Im Vergleich zum statischen Zugriff auf das 1000-Zeilen-Dokument benötigt die JSP/JSTL Lösung rund 30-mal so lange.

Mit der Velocity gab es zudem generell Probleme bezüglich Stabilität bei hoher Last.

Der Test hat aber deutlich gezeigt, dass sich die Java-Lösungen durchaus sehen lassen können. Sie sind nicht nur performanter als das in [1] mit 39 beziehungsweise 20 Prozent gemessene Perl, das aus anderen Gründen für das Projekt nicht in Betracht kam, sondern auch schneller als FastCGI.

iX Artikel 10/2005 S.124: Auslieferungsmethoden im Performancevergleich

Comments Off more...

Werbung



Locations of visitors to this page
Copyright © 1996-2010 agilesWissen. All rights reserved.
iDream theme by Templates Next | Powered by WordPress
By using this site, you agree to use of cookies. More Info | Close