To develop a standalone desktop GUI application by using eclipse RCP, exporting it to be a product is necessary. This tutorial is about how to use the Eclipse Product export wizard to generate executable stand-alone desktop application.

This article assumes that you know how to build a plug-in project by using eclipse RCP wizard. Here is a post about how to do it and how each part plays a role.

Steps:

1. Right click on the project
New -> Product Configuration
Let product name to be: myFirstProductName (In this way we can easily track where this name will go in the xml file)

2. Now you have a product configuration and the overview page shows up.

At the bottom, there are tabs like Overview, Dependencies, Configuration, Launching, Splash, Branding, Licensing. Each of them will be explained individually below.

3. Overview
In “Product Definition” section”, click the “new” button and fill up the popup window:

4. Dependencies
Under dependencies tab, first add “RCPView” which is the plug-in created, and then click “Add Required Plug-ins”.

5. Test what so far
Under Overview tab, click the link “Eclipse Product export wizard” under “Exporting section”.

Possible Problem:
This the generated exe file does not run correctly, one possible reason is that execution environment may not be correct. Go to next step.

6. Launching
Click “Environment” button, and find the best match of your development. The problem at step 5 above should be gone.

The 6 separate BMP images or a single ICO file is for the logo of the executable file that is finally generated.

7. Splash

The splash screen appears when the product launches. If its location is not specified, the ‘splash.bmp’ file is assumed to be in the product’s defining plug-in.

Notice that splash.bmp should be under root directory like the following:

It will be loaded automatically when application is started.

8. Branding
Images for application window are configured in this section. These images must be in GIF format. The 16×16 image appears in the upper-left corner of the window and task bar and the 32×32 image appears in the Alt+Tab application switcher.

9. Licensing

Troubshooting
1. If running generated executable does not have splash screen, then go to plugin.xml -> Binary Build -> check all required resources.

Eclipse RCP is a good platform to develop GUI desktop application. It is always a bottleneck for new programmers to build a rich client application. I am very curious about the most efficient steps to do so. This may be considered as a software engineering problem. The problem is how SE techniques can help with this bottleneck.

To figure out the problem, I started a GUI app from the very beginning. And the first day, I summarize the following steps involved in making an RCP application.

1. By using wizard to create a sample application.

1) It is straightforward to create a GUI app with a simple view by using the wizard.
2) Knowing that the necessary callback method to implement is createPartControl(Composite parent), we can take a look at what others have done for their projects.
3) By using koders.com (previously use Google Code Search until it was shut down) to search this method.

2. Use appropriate layout and add necessary widgets.

Here need a reference about what are available to add to a GUI app.

3. Creatively improve the interface, and make it more like a commercial product.

E.g. logos, production information, status bar, etc.

4. Optimization on others, such as thoughts, ideas, usability, accessibility, etc.

Here are all I/O related concepts.

Blocking I/O: process is blocked until all bytes are ready.

Non-blocking I/O: the OS only reads or writes as many bytes as is possible without blocking the process.

Asynchronous I/O: similar to non-blocking I/O. The I/O call returns immediately, without waiting for the operation to complete. I/O subsystem signals the process when I/O is done. Same advantages and disadvantages of non-blocking I/O.

Difference between non-blocking and asynchronous I/O: a non-blocking read() returns immediately with whatever data available; an asynchronous read() requests a transfer that will be performed in its entirety, but that will complete at some future time

Buffered I/O: allows the kernel to make a copy of the data and adjust to different device speeds.

Double buffered I/O: decouple producer of data from customer, thus relaxing timing requirement between them.

Programmed I/O: General-purpose processor watch status bits and feed data into a controller register one byte at a time. Each byte is transferred via processor in/out or load/store.
Pro: simple hardware, easy to program
Con: consumes process cycles proportional to data size

DMA: Offloading transferring work to a special-purpose processor called DMA controller. Give controller access to memory bus. Ask it to transfer to/from memory directly.

System call is programming interface to the services provided by the OS. It is typically written in a high-level language such as C or C++.

The steps for making a system call:
1) push parameters on stack
2) invoke the system call
3) put code for system call on register
4) trap to the kernel
5) since a number is associated with each system call, system call interface invokes/dispatch intended system call in OS kernel and return status of the system call and any return value
6) increment stack pointer

Type checking is the activity of ensuring that the operands of an operator are of compatible types. This post is about how object oriented features such as inheritance, overloading and overriding affect type checking.

A type error occurs when an argument of an unexpected type is given to an operation. It can be signalled at compile time or at run time.

Inheritance:
Need to consider shape of class hierarchies.
When the least upper bound of A and B exists, we denote it A ∐ B.

Function overloading:
At compile-time, determine which function is meant by inspecting the types of the arguments.
Report an error if no one function is the best function.

Function overriding:
Determine at run-time based on real object.

In some languages like C++ and Java, it is possible to treat arrays of objects polymorphically.

Note: Static type systems are often incomplete. So the goal is to make the language as expressive as possible while still making the type-checker sound.

The following is the summary of compiler storage allocation.

(I) Static vs Dynamic
Static: Storage can be made by compiler looking only at the text of the program.
One reason for statically allocating as many data objects as possible is that the addresses of these objects can be compiled into target code.

Dynamic: Storage can be made by looking at what the program does when the program is running.

(II)
Static:
Global constants and other data generated by the compiler(e.g. info to support garbage collection) are allocated static storage.
Static variables are bound to memory cells before execution begins and remains bound to the same memory cell throughout execution.
Examples:
C static variables
Advantage: efficiency(direct addressing), history-sensitive subprogram support
Disadvantage: lack of flexibility, no recursion if this is the *only* kind of variable, as was the case in Fortran

Heap:
Data that may outlive the call to the procedure that created it is usually allocated on a heap.
E.g. new to create objects that may be passed from procedure to procedure.
The size of heap can not be determined at compile time.
Referenced only through pointers or references
e.g., dynamic objects in C++, all objects in Java
Advantage: provides for dynamic storage management
Disadvantage: inefficient and unreliable

Stack:
Names local to a procedure are allocated space on a stack.
The size of stack can not be determined at compile time.
Advantages:
allows recursion
conserves storage
Disadvantages:
Overhead of allocation and deallocation
Subprograms cannot be history sensitive
Inefficient references (indirect addressing)

Dear visitors,

Programcreek.com has been down since December 22, 2011. Finally, the domain name error has been fixed, and now everything is back to normal.

In this new year, I will focus my work on eclipse platform and Java Virtual Machine. If time is ok, I will also explore technique of building enterprise web frameworks.

So sorry about this. I hope you’ll have a wonderful 2012.

Programcreek.com

Here is a list of Jibjab’s years in review video collection.

2007

Personalize funny videos and birthday eCards at JibJab!

2008

Personalize funny videos and birthday eCards at JibJab!

2009

Try JibJab Sendables® eCards today!

2010

Personalize funny videos and birthday eCards at JibJab!

2011

Page 1 of 4712345678910...203040...Last »