0
votes

Short version:

How do I make use of multi-page Eclipse Forms in an Eclipse RCP 4.X Application (Mars 4.5.0) ?

Long version:

In trying to learn how multi-page forms work in an Eclipse RCP, I am finding that the documentation on this topic and the available tutorials are still in 3.x

Official documentation link http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fforms_editors.htm

A good tutorial link https://eclipse.org/articles/Article-Forms/article.html

The eclipse.org tutorial was very good but breaks down when you get to multi-page forms, due to the differences between 3.X and 4.X. I was unable to locate an up-to-date tutorial or information on this.

I just need a trivial example of a 4.X part that is able to display a basic multi-page form and I can work from there. Anyone got the goods?

2
Are you asking about a pure 'e4' style RCP or a 3.x compatibility mode RCP? - greg-449
I am looking for a pure e4 option, as the rest of my application is being developed that way. In fact I have not learned the 3.X style as yet. If the two can coexist and there is no other option, and it would continue to be supported in the future, then compatibility mode could work. - Mark Eastwood

2 Answers

1
votes

There is no support for this in an e4 application. You will have to craft the code for this yourself.

The basic multiple tab editor is just based on a CTabFolder control. The Form editor is based on this but is considerably more complex.

If you want to make use of the existing Eclipse editor support and the workspace file system (IFile and the like) then you need to use a 3.x compatibility RCP. There is some support in this for e4 style parts to be included.

Since 100s of Eclipse plugins are coded using the 3.x style there is no chance of support for this being dropped in the foreseeable future.

0
votes

multi-page Form basically wizards in eclipse where you can have multiple pages in that.

By Default Injection(e4 behavior) is only done on objects that the application model knows about. And currently it is not done on Wizards or Dialogs.

But if you want you can use injection manually. Ex:

IWizard wizard = ContextInjectionFactory.make(YourWizardClass.class, partService);

WizardDialog dialog = new WizardDialog(shell, wizard);