Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 224364 Details for
Bug 395536
Allow to open project on double click
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch for allowing a closed project to be opened by a double-click
doubleClickProjectOpen.patch (text/plain), 1.32 KB, created by
Tobias Verhoeven
on 2012-12-06 06:32:30 EST
(
hide
)
Description:
patch for allowing a closed project to be opened by a double-click
Filename:
MIME Type:
Creator:
Tobias Verhoeven
Created:
2012-12-06 06:32:30 EST
Size:
1.32 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.emf.ecp.ui.workbench >diff --git src/org/eclipse/emf/ecp/ui/views/ModelExplorerView.java src/org/eclipse/emf/ecp/ui/views/ModelExplorerView.java >index 9387640..e0aa03d 100644 >--- src/org/eclipse/emf/ecp/ui/views/ModelExplorerView.java >+++ src/org/eclipse/emf/ecp/ui/views/ModelExplorerView.java >@@ -51,18 +51,24 @@ > public class DoubleClickListener implements IDoubleClickListener { > > /** >- * Opens an EObject using the ActionHelper >+ * Opens an EObject using the ActionHelper or opens a closed ECPProject. > */ > public void doubleClick(DoubleClickEvent event) { > if (event.getSelection() instanceof IStructuredSelection) { > IStructuredSelection structuredSelection = (IStructuredSelection) event.getSelection(); > Object firstElement = structuredSelection.getFirstElement(); >- if (firstElement instanceof EObject) { >+ >+ if (firstElement instanceof ECPProject) { >+ ECPProject project = (ECPProject) firstElement; >+ if (!project.isOpen()) { >+ project.open(); >+ } >+ } >+ else if (firstElement instanceof EObject) { > ECPModelContext context = ECPUtil.getModelContext(contentProvider, structuredSelection.toArray()); > ActionHelper.openModelElement((EObject) firstElement, "modelexplorer", (ECPProject) context); >- } >+ } > } >- > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
eneufeld
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 395536
: 224364