itemNewContentTypeDefinition.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
WGContentTypeDefinition cType = _model.createContentTypeDefinition();
_treeViewer.expandToLevel(cType, 1);
_treeViewer.setSelection(new SingleStructuredSelection(cType));
}
public void widgetDefaultSelected(SelectionEvent e) {
}
});
MenuItem itemNewAreaDefinition = new MenuItem(menu, SWT.PUSH);
itemNewAreaDefinition.setText("Area Definition");
itemNewAreaDefinition.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
WGAreaDefinition area = _model.createAreaDefinition();
_treeViewer.expandToLevel(area, 1);
_treeViewer.setSelection(new SingleStructuredSelection(area));
}
public void widgetDefaultSelected(SelectionEvent e) {
}
});
MenuItem itemNewLanguageDefinition = new MenuItem(menu, SWT.PUSH);
itemNewLanguageDefinition.setText("Language Definition");
itemNewLanguageDefinition.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
WGLanguageDefinition lang = _model.createLanguageDefinition();
_treeViewer.expandToLevel(lang, 1);
_treeViewer.setSelection(new SingleStructuredSelection(lang));
}
public void widgetDefaultSelected(SelectionEvent e) {
}
});