This repository contains shared classes and extension points related to the Eclipse UI presentation such as SWT, JFace, and EMF editors
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
org.nasdanika.presentation.feature
org.nasdanika.presentation.parent
org.nasdanika.presentation.repository
org.nasdanika.presentation
LICENSE
README.md
circle.yml
ftp-upload.xml
pom.xml

README.md

Presentation

This repository contains shared classes and extension points related to the Eclipse UI presentation such as SWT, JFace, and EMF editors.

Master-detail form and viewer

Master detail form and viewer are intended to be used in generated EMF editors to add a form for editing the currently selected object on the right of the model tree. This approach is different from the EMF Forms based editor in the following ways:

  • The model tree is the original tree with all context menus preserved.
  • The details form can contain custom UI, not necessarily rendered by EMF Forms.

Integration

In the generated editor modify createPages() method, "selection tree view" section by replacing the TreeViewer with MasterDetailViewer in ViewerPane.

Example - StoryEditor.java:

// Create a page for the selection tree view.
//
{
	ViewerPane viewerPane =
			new ViewerPane(getSite().getPage(), StoryEditor.this) {
				@Override
				public Viewer createViewer(Composite composite) {
					MasterDetailForm masterDetailForm = new MasterDetailForm(composite, SWT.NONE, editingDomain);
					return new MasterDetailViewer(masterDetailForm);
				}
				@Override
				public void requestActivation() {
					super.requestActivation();
					setCurrentViewerPane(this);
				}
			};
	viewerPane.createControl(getContainer());

	selectionViewer = ((MasterDetailViewer) viewerPane.getViewer()).getTreeViewer();
}

Details rendering

The default behavior is to use EMF Forms. EMF Forms provide rich and highly customizable UI. If, for some reason, the EMF Forms rendered UI is not a good fit, an implementation of org.nasdanika.presentation.EObjectRenderer can be registered with eobject_renderer extension point to customize UI rendering.

Known issues

When editing the form the UI thinks that the focus is in the tree editor and as such Ctrl-C/Ctrl-V do not work properly in the forms. If you need to use the clipboard, leverage the old-good properties view.

Some issues with EMF Forms

  • TransactionalEditingDomain is not fully supported.
  • The view model editor doesn't seem to recognize inherited structural features, at least during an attempt to create TableControl.

API Documentation

P2 Repository

  • http://www.nasdanika.org/products/presentation/repository
  • Archived

How to contribute

As an open source project we use the Fork and Pull Model. You can find more information about collaborative development at GitHub in this article - Collaborating with issues and pull requests.

When you contribute code, please make sure that the changes are clearly identifiable. In particular, avoid making non-functional changes in the code which you do not touch, e.g. auto-formatting of an entire compilation unit.

Resources