Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDawid Pakuła2019-12-01 06:51:36 -0500
committerDawid Pakuła2019-12-01 06:51:36 -0500
commit1cbb458a836a3709d705f43f6fed9b0546acc8c0 (patch)
treeb05c0d4514718f8d498747d2b271fd9d1113c05e
parent6de3e4f26e9afda04f14fe9aa2e1f36701e0eb62 (diff)
downloadorg.eclipse.pdt-1cbb458a836a3709d705f43f6fed9b0546acc8c0.tar.gz
org.eclipse.pdt-1cbb458a836a3709d705f43f6fed9b0546acc8c0.tar.xz
org.eclipse.pdt-1cbb458a836a3709d705f43f6fed9b0546acc8c0.zip
Bug 552168 - Duplicated "Show In" on PHP projects in 2019-09
Change-Id: Ie0dcd35d0461c687bde4bc2ddcbe8c7b3d6f755e Signed-off-by: Dawid Pakuła <zulus@w3des.net>
-rw-r--r--plugins/org.eclipse.php.ui/plugin.xml2
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/PHPPerspectiveFactory.java6
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/actions/OpenViewActionGroup.java20
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/navigator/PHPNavigatorActionProvider.java1
4 files changed, 17 insertions, 12 deletions
diff --git a/plugins/org.eclipse.php.ui/plugin.xml b/plugins/org.eclipse.php.ui/plugin.xml
index b586f7591..3dd7e5524 100644
--- a/plugins/org.eclipse.php.ui/plugin.xml
+++ b/plugins/org.eclipse.php.ui/plugin.xml
@@ -85,7 +85,7 @@
<showInPart id="org.eclipse.egit.ui.RepositoriesView"/>
<showInPart id="org.eclipse.team.ui.GenericHistoryView"/>
- <showInPart id="org.eclipse.ui.navigator.ProjectExplorer"/>
+ <!--showInPart id="org.eclipse.ui.navigator.ProjectExplorer"/-->
<actionSet id="org.eclipse.php.ui.text.php.actionSet.presentation"/>
</perspectiveExtension>
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/PHPPerspectiveFactory.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/PHPPerspectiveFactory.java
index 740eff1da..eefc5408e 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/PHPPerspectiveFactory.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/PHPPerspectiveFactory.java
@@ -52,13 +52,11 @@ public class PHPPerspectiveFactory implements IPerspectiveFactory {
layout.addShowViewShortcut(ID_FUNCTIONS);
layout.addShowViewShortcut(ID_PROJECT_OUTLINE);
layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
-
- layout.addShowInPart(IPageLayout.ID_PROJECT_EXPLORER);
}
/*
- * This method add the default views that are part of the perspective and lays
- * them out in relation to each other and the editor area.
+ * This method add the default views that are part of the perspective and
+ * lays them out in relation to each other and the editor area.
*/
protected void addViews(IPageLayout layout) {
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/actions/OpenViewActionGroup.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/actions/OpenViewActionGroup.java
index 637fa5564..83730de57 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/actions/OpenViewActionGroup.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/actions/OpenViewActionGroup.java
@@ -45,6 +45,7 @@ public class OpenViewActionGroup extends ActionGroup {
private ISelectionProvider fSelectionProvider;
private boolean fShowOpenPropertiesAction = true;
+ private boolean fShowInAction = true;
/**
* Creates a new <code>OpenActionGroup</code>. The group requires that the
@@ -73,8 +74,8 @@ public class OpenViewActionGroup extends ActionGroup {
}
/**
- * Note: This constructor is for internal use only. Clients should not call this
- * constructor.
+ * Note: This constructor is for internal use only. Clients should not call
+ * this constructor.
*
* @param part
* the editor part
@@ -152,11 +153,12 @@ public class OpenViewActionGroup extends ActionGroup {
&& selection != null && fOpenPropertiesDialog.isApplicableForSelection(selection)) {
menu.appendToGroup(IContextMenuConstants.GROUP_PROPERTIES, fOpenPropertiesDialog);
}
-
- MenuManager showInSubMenu = new MenuManager(getShowInMenuLabel());
- IWorkbenchWindow workbenchWindow = fSite.getWorkbenchWindow();
- showInSubMenu.add(ContributionItemFactory.VIEWS_SHOW_IN.create(workbenchWindow));
- menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, showInSubMenu);
+ if (fShowInAction) {
+ MenuManager showInSubMenu = new MenuManager(getShowInMenuLabel());
+ IWorkbenchWindow workbenchWindow = fSite.getWorkbenchWindow();
+ showInSubMenu.add(ContributionItemFactory.VIEWS_SHOW_IN.create(workbenchWindow));
+ menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, showInSubMenu);
+ }
}
/*
@@ -213,4 +215,8 @@ public class OpenViewActionGroup extends ActionGroup {
fShowOpenPropertiesAction = enable;
}
+ public void containsShowInAction(boolean enable) {
+ fShowInAction = enable;
+ }
+
}
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/navigator/PHPNavigatorActionProvider.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/navigator/PHPNavigatorActionProvider.java
index a5b103bb0..8838d7529 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/navigator/PHPNavigatorActionProvider.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/navigator/PHPNavigatorActionProvider.java
@@ -55,6 +55,7 @@ public class PHPNavigatorActionProvider extends CommonActionProvider {
fOpenViewGroup = new OpenViewActionGroup(viewPart);
fOpenViewGroup.containsOpenPropertiesAction(false);
+ fOpenViewGroup.containsShowInAction(false);
fInViewPart = true;
}

Back to the top