Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 395536
Collapse All | Expand All

(-)src/org/eclipse/emf/ecp/ui/views/ModelExplorerView.java (-4 / +10 lines)
Lines 51-68 Link Here
51
	public class DoubleClickListener implements IDoubleClickListener {
51
	public class DoubleClickListener implements IDoubleClickListener {
52
52
53
		/**
53
		/**
54
		 * Opens an EObject using the ActionHelper
54
		 * Opens an EObject using the ActionHelper or opens a closed ECPProject.
55
		 */
55
		 */
56
		public void doubleClick(DoubleClickEvent event) {
56
		public void doubleClick(DoubleClickEvent event) {
57
			if (event.getSelection() instanceof IStructuredSelection) {
57
			if (event.getSelection() instanceof IStructuredSelection) {
58
				IStructuredSelection structuredSelection = (IStructuredSelection) event.getSelection();
58
				IStructuredSelection structuredSelection = (IStructuredSelection) event.getSelection();
59
				Object firstElement = structuredSelection.getFirstElement();
59
				Object firstElement = structuredSelection.getFirstElement();
60
				if (firstElement instanceof EObject) {
60
				
61
				if (firstElement instanceof ECPProject) {
62
					ECPProject project = (ECPProject) firstElement;
63
					if (!project.isOpen()) {
64
						project.open();
65
					}
66
				}
67
				else if (firstElement instanceof EObject) {
61
					ECPModelContext context = ECPUtil.getModelContext(contentProvider, structuredSelection.toArray());
68
					ECPModelContext context = ECPUtil.getModelContext(contentProvider, structuredSelection.toArray());
62
					ActionHelper.openModelElement((EObject) firstElement, "modelexplorer", (ECPProject) context);
69
					ActionHelper.openModelElement((EObject) firstElement, "modelexplorer", (ECPProject) context);
63
				}
70
				} 
64
			}
71
			}
65
66
		}
72
		}
67
	}
73
	}
68
74

Return to bug 395536