Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 60690111af71da06e27e74bf510932828e3ca886 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
 * 
 */
package org.eclipse.emf.parsley.examples.mail.messageview.views;


import org.eclipse.emf.parsley.examples.mail.MailPackage;
import org.eclipse.emf.parsley.views.OnSelectionFormView;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IWorkbenchPart;

/**
 * @author Lorenzo Bettini
 * 
 */
public class MessageView extends OnSelectionFormView {
	
	public static final String ID = "org.eclipse.emf.parsley.examples.mail.messageview.views.MessageView";

	@Override
	protected void updateOnSelection(IWorkbenchPart sourcepart,
			ISelection selection) {
		// we want to display only Mail elements
		if (!MailPackage.Literals.MAIL
				.isInstance(getFirstSelectedEObject(selection))) {
			resetFormComposite();
			return;
		}

		super.updateOnSelection(sourcepart, selection);
	}
}

Back to the top