Exploring Eclipse RCP

A "Rich" Alternative for System i GUI Development

June 10, 2007

Java data queues 312 -- add a preference page to RCP DtaQ Demo

RCP DtaQ Demo's "preferences" are hard-coded into Me.java. Remember that class from 101? The stuff which varies for each System i -- where the system name or IP address and data queue paths were defined? It would be nice if the user could change that instead of having the programmer modify and compile Me.java. A preference page would look like this:

312%20final%20preference%20page.jpg

Lets do it.

Continue reading "Java data queues 312 -- add a preference page to RCP DtaQ Demo"

Posted by Bill Blalock on June 10, 2007 at 8:30 PM | Comments (0)

June 3, 2007

Regretfully WDSCi 7 cannot be used for RCP development.

You can't use WDSCi 7 (Version 7 of Websphere Development Studio Client for System i) to develop RCP applications -- at least not without making compromises.

Close but no cigar. Maybe next time around.

This information is directly from IBM (the first two points), the result of two PMRs.

1. The javadocs for SWT and JFace are not included to save space.

2. The source for Eclipse is not included for legal reasons.

IBM / Rational doesn't knows what all the effects of leaving out the Eclipse source. For sure without the source the PDE is unable to generate XML code for the extension points. That was one of my PMRs. Anything that plugin development, or Eclipse, tries to build using the Eclipse source as a template is going to fail. There is no list of what is effected by the lack of Eclipse source code.

This is my conjecture

3. I am conjecturing that IBM / Rational does not test the functionality of of the Eclipse as WDSCi is developed. While the prespective "Eclipse Plug-In Development" is maintained, and plugin development is a install option, I don't see how it could have been fully tested and someone not notice the problems leaving the Eclipse source code out causes.

In fairness WDSCi is a huge product. Using WDSCi for Eclipse type development is probably not on the critical path. Perhaps the Eclipse source was left out in the final build and no one realized that would be a problem.

IBM / Rational provides a means to install WDSCi into your Eclipse and I haven't tried that.

My conclusion?

WDSCi is really super but I won't be using it to develop Eclipse RCP applications for the System i.

The Eclipse RCP wizards work and generate sample applications which work. When you to try to build on them the PDE problem comes into play. You can get around it by editing the XML of the plugin directly.

You can get around the lack of SWT and JFace documentation by linking to the Eclipse website.

I'll continue this blog using Eclipse 3.2.2 and borrowing from the iSeries toolbox and JTOpen as needed.

Posted by Bill Blalock on June 3, 2007 at 12:23 PM | Comments (0)

May 31, 2007

Java data queues 311 -- add a logon dialog to RCP DtaQ Demo

Elena Lower wrote an article published this month in System iNEWS, ProVip (May 2007), "5 Tips for Integrating Java with System i Resources". RCP DtaQ Demo project will benefit from the first tip, Connection to the System i. Lets apply it:

logonDialog.jpg

These changes give RCP DtaQ Demo a logon dialog consistent with the graphical appearance of the application and is more functional. The user can cancel the logon without ending the application and later call for the logon dialog through the file menu.

This is how it is done.

Continue reading "Java data queues 311 -- add a logon dialog to RCP DtaQ Demo"

Posted by Bill Blalock on May 31, 2007 at 7:40 PM | Comments (0)

May 13, 2007

Java data queues 302 -- remove console output from RCP DtaQ Demo

Typically a rich client does not have console output. The classes brought over from Java data queue 211 write their output to stdout. They were designed for a Java command line or console application. RCP DtaQ Demo will be modified to eliminate the console output and use the rich client user interface (UI) and log file. When finished the application would look like this:

RCP%20with%203%20messages.jpg

- No console output
- The messages are written to the View (think subfile).
- The status line is used to alert the user (no alerts yet).
- Errors are written to the log file.

Notice the scroll bars at the bottom and the top. Those are automatically generated, they would disappear is the window were just a little larger.

Continue reading "Java data queues 302 -- remove console output from RCP DtaQ Demo"

Posted by Bill Blalock on May 13, 2007 at 11:00 PM | Comments (0)

May 6, 2007

Java data queues 301 -- an RCP application to monitor the System i demonstration model output

This exercise builds an RCP application which monitor's the output data queue of the demonstration model. Eclipse RCP wizards are used to create an RCP application with a view that contains a table, the table shows a String[] with the values "One", "Two" and "Three." This blog entry shows how to run the wizards and modify the code generated by the wizards, and how to use the data queue classes created in Java data queues 211 blog entry.

The RCP application looks like when it first starts and determines the data queue key.

Startup%20and%20key%202.jpg

The console output of the key is a legacy of reusing classes from Java data queues 211. Future refinements will move this output to the user inferface and/or log file.

The is the RCP application after the CL view-controller on the System i puts the
- key "A80008",
- instruction "HELLO" and
- message "Bill Blalock"
in the demo model input data queue, the demo model has processed it and written to the output data queue.

showing%20message%20in%20status%20line%202.jpg

Do you want to give it a try?

Continue reading "Java data queues 301 -- an RCP application to monitor the System i demonstration model output"

Posted by Bill Blalock on May 6, 2007 at 7:00 PM | Comments (0)

April 29, 2007

Java data queues 211 -- refactoring the thread based console application view-controller into parts which can be reused

Now we have a
- demonstration model for MVC running on the System i written in RPGLE
- demonstration view-controller for MVC on the System in written in CL
- demonstration console based view-controllers for MVC written in Java which locks the application while waiting to read the output of the model (DtaQExample1 and 2)
- demonstration console based view-controllers for MVC written in Java where a Thread waits to read the output of the model (DtaQExample 3a, 3b and 3c).

What about Eclipse and Rich Client Platform? Remember, the subject of this blog. Actually we are closer than you might think. In this blog entry DtaQExample3a and DtaQExample3Thread will be refactored into parts which can be re-used. We will take those parts to Eclipse RCP and continue their development.

Continue reading "Java data queues 211 -- refactoring the thread based console application view-controller into parts which can be reused"

Posted by Bill Blalock on April 29, 2007 at 6:00 PM | Comments (1)

April 21, 2007

Java data queues 202 -- the listener side of a thread based console application view-controller for System i demonstration model

A previous blog entry "Java data queues 201 -- the thread side of a thread based console application view-controller for System i demonstration model" solved the problem of the java application being stuck waiting to read a data queue by putting the read data queue part of the program into a separate thread. Each time a data queue read occurs the thread fires a PropertyChangeEvent. The event contains the information read from the data queue.

This blog entry address the rest of the example application. A large part of the main() portion of this application, DtaQExample3#, is the same as Examples 1 and 2 in that they
- get input from the console and
- write it to the model input data queue
(remember that demo model running on the iSeries?). See the early discussion.

The different (new) parts of DtaQExample3# is that
- the model input data queue (read) is started as a thread (DtaQExample3Thread)
- PropertyChangeListener is implemented
Three examples (3a, 3b and 3c) show different ways to implement PropertyChangeListener so you can experiment with the differences.

Continue reading "Java data queues 202 -- the listener side of a thread based console application view-controller for System i demonstration model"

Posted by Bill Blalock on April 21, 2007 at 1:00 PM | Comments (0)

April 15, 2007

Use WDSc 7 for Eclipse RCP Development!

WDSc 7.0 has been available for a month now and it lives up to the expectations. System i Network has articles on the new version and more are on the way.

WDSc 7.0 can be used for Rich Client Platform development! The prior version of WDSc (6.01) did not completely support RCP development because it was based on Eclipse 3.0 and RCP development really needs Eclipse 3.1. WDSc 7.0 is based on Eclipse 3.2.1 ... close enough!

The RCP introductory tutorials which used Eclipse 3.2.x can now be done with WDSc 7. The JT Open toolbox can be used as a plug in instead of an external jar file. That is very neat!

Try these tutorials from earlier in this blog with WDSc 7:
Hands on -- Getting started with Eclipse RCP.
How to modify the Eclipse RCP tutorial (part 1) to connect to a System i.
Continuing to modify Eclipse RC Tutorial (part 1) into a System i client

There are no changes in Ed's tutorial, the first one. In the second tutorial is simplified by using jt400.jar as a dependent plugin (read on). The third tutorial has no changes.

So now you can have it all for a while under WDSc 7. Well at least until Europa rises ... that databinding is something else....

Continue reading "Use WDSc 7 for Eclipse RCP Development!"

Posted by Bill Blalock on April 15, 2007 at 12:00 PM | Comments (0)

April 8, 2007

Java data queues 201 -- the thread side of a thread based console application view-controller for System i demonstration model

The prior blog entry presented a Java console application which performs the same function as the CL view-controller -- write a data queue then read. The examples used the techniques covered in IBM's documentation. That was a starting place -- putting the classes explained in the Java toolbox documentation into a console view-controller.

The write-then-read pattern does not work for GUI clients. The desktop application has to be free to service inputs from the user while waiting for the data queue read to happen. The program can't be locked waiting for model output on the data queue.

The Java console application of the last entry is re-written to place the data queue read portion of the write then read pattern in a separately running thread. The main program spawns a thread which waits for the model output data queue and reads it. After the thread is spawned the main program is free to do whatever … in this case wait for input from the user and write to the model input data queue.

Continue reading "Java data queues 201 -- the thread side of a thread based console application view-controller for System i demonstration model"

Posted by Bill Blalock on April 8, 2007 at 8:00 PM | Comments (0)

April 1, 2007

Java data queues 101 -- a console application view-controller for System i demonstration model

This set of blog entries focuses on using data queues in Java. Data queues, and later message queues, are the foundation for the model <> view-controller interchange between a System i and a Java application (Eclipse RCP or otherwise) developed in this blog series.

The last blog entry implemented an RPG System i demonstration model using data queues. The demonstration model reads an input data queue and writes to an output data queue. As a bonus the entry provided a CL view-controller to test the model. Now focus goes to the Java side, putting data on the input data queue for the model and reading the response from the model on the output data queue.

This blog entry presents two versions of a Java console application which performs the same function as the CL view-controller. The examples use the techniques covered in IBM's documentation. I look at this as a starting place -- putting the classes explained in the Java toolbox documentation into a console view-controller application.

Continue reading "Java data queues 101 -- a console application view-controller for System i demonstration model"

Posted by Bill Blalock on April 1, 2007 at 6:00 PM | Comments (0)

Bill Blalock
January 2009
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Blog Policy

We welcome your comments and opinions and encourage lively debate on the issues. However, Penton Media reserves the right to delete or move any content that it may determine, in its sole discretion, violates or may violate its Terms of Use or is otherwise unacceptable. For more information, see Penton Media's Terms of Use.

ProVIP Sponsors