Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JBIDE-21352] server adapter wiz: preselecting project select in proj…
…ect views We now preselect the (1st) project that's selected in (using this order of prescedence) * package explorer * project explorer * resource navigator
- Loading branch information
Showing
5 changed files
with
86 additions
and
35 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
...ft.common.ui/src/org/jboss/tools/openshift/internal/common/ui/utils/OpenShiftUIUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2011 Red Hat, Inc. | ||
* Distributed under license by Red Hat, Inc. All rights reserved. | ||
* This program is made available under the terms of the | ||
* Eclipse Public License v1.0 which accompanies this distribution, | ||
* and is available at http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Red Hat, Inc. - initial API and implementation | ||
******************************************************************************/ | ||
package org.jboss.tools.openshift.internal.common.ui.utils; | ||
|
||
import org.eclipse.swt.widgets.Display; | ||
import org.eclipse.ui.PartInitException; | ||
import org.eclipse.ui.PlatformUI; | ||
import org.jboss.tools.openshift.internal.common.ui.OpenShiftCommonUIActivator; | ||
|
||
/** | ||
* @author André Dietisheim | ||
*/ | ||
public class OpenShiftUIUtils { | ||
|
||
private static final String OPENSHIFT_EXPLORER_VIEW_ID = "org.jboss.tools.openshift.express.ui.explorer.expressConsoleView"; | ||
|
||
public static void showOpenShiftExplorerView() { | ||
Display.getDefault().asyncExec(new Runnable() { | ||
@Override | ||
public void run() { | ||
try { | ||
PlatformUI.getWorkbench() | ||
.getActiveWorkbenchWindow() | ||
.getActivePage() | ||
.showView(OPENSHIFT_EXPLORER_VIEW_ID); | ||
} catch (PartInitException e) { | ||
OpenShiftCommonUIActivator.getDefault().getLogger().logError("Failed to show the OpenShift Explorer view", e); | ||
} | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters