Bug 269027 Create and example that modifies the model
An example of walking the model and modifying it in the running eclipse. PW
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/SWTPartFactory.java
final MHandledItem handledItem) {
		int style = SWT.PUSH;
		if (handledItem instanceof MMenuItem) {
			if (((MMenuItem) handledItem).isSeparator()) {
				style = SWT.SEPARATOR;
			} else if (((MMenuItem) handledItem).getMenu() != null) {
				style = SWT.CASCADE;
			}
		}
		final MenuItem newMenuItem = new MenuItem(parentMenu, style);
		if (style != SWT.SEPARATOR) {
			newMenuItem.setText(handledItem.getName());
			newMenuItem.setImage(getImage(handledItem));
			newMenuItem.setEnabled(true);
		}
		if (handledItem.getMenu() != null) {
			createMenu(part, newMenuItem, handledItem.getMenu());
		}
		final IEclipseContext localContext = getContext(part);
		if (handledItem.getCommand() != null) {
			newMenuItem.addListener(SWT.Selection, new Listener() {
				public void handleEvent(Event event) {
					Object result = canExecuteItem(localContext, newMenuItem
							.getDisplay(), handledItem);
					if (Boolean.TRUE.equals(result)) {
						executeItem(localContext, newMenuItem.getDisplay(),
								handledItem);
					}
				}
			});