Problem with Eclipse RCP example

G

G. Ralph Kuntz, MD

I am trying to learn RCP from the book Eclipse Rich Client Platform by
McAffer and Lemieux. I cannot get the example in chapter 5 to run
correctly. The point where it is supposed to show a "Contacts" tab
still shows an empty window.

I installed the examples from the book and they also do not show this
tab.

I reinstall Eclipse (3.2RC1a - I was running 3.1) and still no good. I
reinstalled the RCP SDK. Still no go.

I am running Java 1.5.0_06 on Windows XP.

Any ideas?

Thanks.
 
G

G. Ralph Kuntz, MD

The plot thickens...

I ran with a breakpoint set on the
Perspective.createInitialLayout(IPageLayout layout) method and it is
never called.

The class ApplicationWorkbenchAdvisor lists the PERSPECTIVE_ID as
"org.eclipsercp.hyperbola.perspective", and the Perspective class has
this set as it's id in the extensions window of the plugin manager.

Any thoughts?
 
G

G. Ralph Kuntz, MD

Never mind :).

I had the method

public void initialize(IWorkbenchConfigurer configurer) {
configurer.setSaveAndRestore(true);
}

and had run the program -- it seems to have saved it state -- without
the contacts view.
 
E

egarson

Yep, me too :)

By carefully following the example you will not see the Contacts view.
This is because the first task in beginning of chapter 5 is to call the
setSaveAndRestore() method which causes the Workbench to save settings
on shutdown. On subsequent invocations, the Workbench loads these
settings and bypass the IPerspectiveFactory which is only consulted the
first time the perspective is created.

This definitely belongs in the errata section for this book! There will
be lots of head scratching over this.

Edward
 
Joined
Jul 7, 2006
Messages
2
Reaction score
0
Yeah. That explains why views went missing otherwise newbies like me would scratching our heads for a while. Btw, do you know how to reset workbench setting? Thanks.
 
Joined
Jul 14, 2006
Messages
1
Reaction score
0
What I then tried was using Run->Run... from the menu, select my "Eclipse Application" Workspace Data section to "Clear workspace data before launching" this problem goes away.
 
Joined
Jul 7, 2006
Messages
2
Reaction score
0
garthoid said:
What I then tried was using Run->Run... from the menu, select my "Eclipse Application" Workspace Data section to "Clear workspace data before launching" this problem goes away.

Thanks it works. I was looking around for the solution to exported RCP application. Do anyone has an idea how do I reset the exported RCP apps workspace?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top