Is there a way to save view, or any part of the ui (like menu, dialog, or form) as a text file (like xml). The xml file should contents only visual elements of the view and layout and the java file should contains only a basic ViewPart frame that loads element at run time.
For example, suppose I'm creating a new view in swtbuilder. In the .java file of the view, I would like to have something like this:
- Code: Select all
package ...
import ...
public class MyView extends ViewPart {
public static final String ID = "myview"; //$NON-NLS-1$
private MyActionSet myActionSet = null;
public void createPartControl(Composite parent) {
LoadPartControl(parent, "filename.xml", "partControl1")
//
createActions();
initializeToolBar();
initializeMenu();
}
private void createActions() {
myActionSet = CreateMyActionSet();
}
private void initializeToolBar() {
LoadToolbar("filename.xml", "toolbar1", myActionSet)
}
private void initializeMenu() {
LoadMenu("filename.xml", "menu1", myActionSet)
}
}
This feature could help me to generate user interface without having to recompile my application.
Thanks
Vincent