[579590] Add a view shortcut for the Terminal to the Java EE perspective
diff --git a/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF index 69dfb4e..b35663f 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name.0 Bundle-SymbolicName: org.eclipse.jst.j2ee.ui; singleton:=true -Bundle-Version: 1.1.1000.qualifier +Bundle-Version: 1.1.1100.qualifier Bundle-Activator: org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin Bundle-Vendor: %Bundle-Vendor.0 Bundle-Localization: plugin @@ -37,7 +37,7 @@ org.eclipse.jst.j2ee.jca;bundle-version="[1.1.0,1.2.0)", org.eclipse.jst.j2ee.web;bundle-version="[1.2.0,2.0.0)", org.eclipse.emf.edit.ui;bundle-version="[2.2.0,3.0.0)", - org.eclipse.jdt.ui;bundle-version="[3.2.0,4.0.0)", + org.eclipse.jdt.ui;bundle-version="[3.26.0,4.0.0)", org.eclipse.wst.validation;bundle-version="[1.2.0,2.0.0)", org.eclipse.jst.j2ee.core;bundle-version="[1.1.0,2.0.0)", org.eclipse.wst.common.emfworkbench.integration;bundle-version="[1.2.0,2.0.0)",
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/perspective/J2EEPerspective.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/perspective/J2EEPerspective.java index 646b96b..cb236b5 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/perspective/J2EEPerspective.java +++ b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/perspective/J2EEPerspective.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. + * Copyright (c) 2005, 2021 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -36,6 +36,7 @@ public static final String ID_CONSOLE_VIEW= "org.eclipse.ui.console.ConsoleView"; //$NON-NLS-1$ public static final String ID_MARKERS_VIEW= "org.eclipse.ui.views.AllMarkersView"; //$NON-NLS-1$ public static final String ID_TASKLIST_VIEW= "org.eclipse.mylyn.tasks.ui.views.tasks"; //$NON-NLS-1$ + private static final String ID_TERMINAL_VIEW = "org.eclipse.tm.terminal.view.ui.TerminalsView"; //$NON-NLS-1$ public J2EEPerspective() { super(); @@ -86,7 +87,9 @@ layout.addShowViewShortcut(IPageLayout.ID_RES_NAV); layout.addShowViewShortcut(ID_WST_SNIPPETS_VIEW); layout.addShowViewShortcut(ID_MARKERS_VIEW); + layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); layout.addShowViewShortcut(ID_TASKLIST_VIEW); + layout.addShowViewShortcut(ID_TERMINAL_VIEW); // views - search layout.addShowViewShortcut(ID_SEARCH_VIEW); @@ -121,24 +124,25 @@ bottomRight.addPlaceholder(IPageLayout.ID_BOOKMARKS); bottomRight.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID); bottomRight.addPlaceholder(ID_SEARCH_VIEW); + addViewIfPresent(bottomRight, ID_TERMINAL_VIEW); // Top right. IFolderLayout topRight = layout.createFolder("topRight", IPageLayout.RIGHT, 0.7f, editorArea);//$NON-NLS-1$ topRight.addView(IPageLayout.ID_OUTLINE); - addTLViewIfPresent(layout, topRight); } - private void addDBViewIfPresent(IPageLayout page,IFolderLayout bottomRight) { + private void addDBViewIfPresent(IPageLayout page, IFolderLayout bottomRight) { IViewDescriptor dbView = PlatformUI.getWorkbench().getViewRegistry().find(ID_DATA_VIEW); if (dbView != null) bottomRight.addView(ID_DATA_VIEW); } - private void addTLViewIfPresent(IPageLayout page,IFolderLayout topRight) { - IViewDescriptor tlView = PlatformUI.getWorkbench().getViewRegistry().find(ID_TASKLIST_VIEW); - if (tlView != null) - topRight.addView(ID_TASKLIST_VIEW); - } -} + private void addViewIfPresent(IFolderLayout layout, String viewID) { + IViewDescriptor descriptor = PlatformUI.getWorkbench().getViewRegistry().find(viewID); + if (descriptor != null) { + layout.addView(viewID); + } + } +}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/pom.xml b/plugins/org.eclipse.jst.j2ee.ui/pom.xml index 175445a..1eebfb1 100644 --- a/plugins/org.eclipse.jst.j2ee.ui/pom.xml +++ b/plugins/org.eclipse.jst.j2ee.ui/pom.xml
@@ -21,6 +21,6 @@ <groupId>org.eclipse.webtools.javaee</groupId> <artifactId>org.eclipse.jst.j2ee.ui</artifactId> - <version>1.1.1000-SNAPSHOT</version> + <version>1.1.1100-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project>