Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2010-01-14 04:33:16 +0000
committerAndrew Gvozdev2010-01-14 04:33:16 +0000
commit643d2a7eb75f2a72b26301b423aaf3b2901d7b50 (patch)
tree300f4c0c39f0a89fa29bf2b356bc2ca1c7518ba7
parent9cdd4e1d074f21873cd79a48b8b51ea29b0c485c (diff)
downloadorg.eclipse.cdt-643d2a7eb75f2a72b26301b423aaf3b2901d7b50.tar.gz
org.eclipse.cdt-643d2a7eb75f2a72b26301b423aaf3b2901d7b50.tar.xz
org.eclipse.cdt-643d2a7eb75f2a72b26301b423aaf3b2901d7b50.zip
bug 206369: Double-clicking closed project should open it
Patch from Marc-Andre Laperle
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java
index d801589b2ab..71612ae3245 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java
@@ -14,6 +14,7 @@ package org.eclipse.cdt.internal.ui.cview;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ISourceReference;
import org.eclipse.cdt.core.model.ITranslationUnit;
+import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.internal.ui.actions.SelectionConverter;
import org.eclipse.cdt.internal.ui.util.EditorUtility;
@@ -21,6 +22,7 @@ import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
@@ -28,6 +30,7 @@ import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.actions.CloseUnrelatedProjectsAction;
import org.eclipse.ui.actions.OpenFileAction;
import org.eclipse.ui.actions.OpenInNewWindowAction;
import org.eclipse.ui.actions.OpenWithMenu;
@@ -154,6 +157,13 @@ public class OpenFileGroup extends CViewActionGroup {
openFileAction.selectionChanged(selection);
openFileAction.run();
}
+ else if(element instanceof IProject){
+ try {
+ ((IProject)element).open(null);
+ } catch (CoreException e) {
+ CUIPlugin.log(e);
+ }
+ }
}
}

Back to the top