Support for Eclipse 4 Parts planned? [message #786628] |
Mon, 30 January 2012 16:55 |
|
I updated my Eclipse 4 Tutorial .
Using WindowBuilder for Eclipse 4 Parts is relatively simple, I just have to wrap the whole content of @PostConstruct into a composite and work with WindowBuilder on this composite.
Is it planned to have direct support for Parts in WindowBuilder? I have no idea about the internal structure of WindowBuilder but I think you could treat @PostConstruct similar to the createPartControl() method of ViewPart.
|
|
|
|
Re: Support for Eclipse 4 Parts planned? [message #787165 is a reply to message #787017] |
Tue, 31 January 2012 08:29 |
|
The following would be a simple Part definition without any controls. The names of the methods are flexible with Eclipse 4, I like the existing ones, except that I added a "s" to the old createPartControl method.
package com.example.e4.rcp.todo.parts;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import org.eclipse.swt.widgets.Composite;
public class TodoDetailsPart {
@PostConstruct
public void createControls(Composite parent) {
}
@PreDestroy
public void dispose() {
}
@Focus
public void setFocus() {
// TODO Set Focus to control
}
}
[EDIT: Focus is mandatory, got confirmation from Remy Suen via IRC, changed method name to createControls()]
[Updated on: Wed, 01 February 2012 21:13] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04446 seconds