Eclipse RCP: Relation between Window, Perspective, View, etc.

This Diagram is from Addison Wesley’s “Eclipse Rich Client Platform 2nd Edition”. It demonstrates the relations between window, menu, perspective, views, etc. In brief, window is the whole application view and it has one page. The page has its own editor and view instances, and uses the perspective to determine its layout. A view is … Read more

The Most Widely Used Java Libraries

Update on 2020/10/07: This list was created nearly 10 years ago. The new list is available here. This article summarizes the most popular and widely used Java libraries for a variety of different applications. 1. Core Apache Commons Lang – Apache’s library that provides a host of helper utilities for the java.lang API, such as … Read more

Trace Source Code in Eclipse: Attaching source to a JAR file

The API document only list the description of class, interface, and methods. If you want to trace back to the original implementation code by clicking “F3” button in Eclipse, then source file need to be attached. The source file under window is here: C:Program FilesJavajdk1.6.0_24src.zip http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/org.eclipse.jdt.doc.user/tasks/tasks-115.htm

Yet Another “Java Passes By Reference or By Value”?

This is a classic interview question which confuses novice Java developers. In this post I will use an example and some diagram to demonstrate that: Java is pass-by-value. 1. Some Definitions Pass by value: make a copy in memory of the actual parameter’s value that is passed in. Pass by reference: pass a copy of … Read more

What is Aspect-Oriented Programming?

What is Aspect-Oriented Programming(AOP)? By using the diagram below, the concept can be understood in a few seconds. The cross-cutting concerns problem First take a took at the diagram below, and think about what could be the problem. In the diagram above, it is easy to see that log related actions are everywhere. It causes … Read more

Lucene vs. Database Search

Full-text search mechanism

Lucene’s API interface design is relatively generic, which looks like the structure of the database: tables -> record -> field. Many traditional applications, files, and databases can be easily mapped to the storage structure of Lucene / interface. Overall you can see Lucene as a database system to support full-text index.

Read more