2

Please help to get started with Eclipse 4 RCP.
Set task is to create simple application with imbedded browser (using SWT Browser widget)

This Lars Vogel's Eclipse 4 RCP tutorial is used. Created application is on GitHub. Now I want to add SWT browser widget.

I added class.

Unsurprisingly, now application doesn't start:
Added class seems quite of different nature. Seems I am missing some points about Eclipse 4 and SWT connection.

I have read the basics about Eclipse RCP before.

Here are docs: http://www.eclipse.org/swt/widgets/ and JavaDoc, but they don't explain.

Where should be my next steps to? What to read?

4

1 回答 1

3
  1. ViewPart is only used in Eclipse 3 RCP. Instead your part class should 1) be connected to the application model, as described in Vogella's tutorial; 2) create controls in a method annotated with @PostConstruct, with a signature like public void createControls(Composite parent). His example in Section 17.2 even contains a Browser, but it doesn't matter which SWT widgets you want to use: the process is the same.
  2. You can't expect to find anything about RCP in SWT documentation! Look at the RCP documentation instead.
  3. I have read the basics about Eclipse RCP before.

    Try to forget them, they likely will just confuse you. Eclipse 4 RCP does very many things differently. Of course, SWT and JFace haven't changed, so you can still use what you read about them.

于 2013-03-30T16:39:06.293 回答