mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
Project Explorer: Fix duplicate Properties action
This commit is contained in:
parent
203912cf44
commit
f00c9c220e
1 changed files with 3 additions and 3 deletions
|
@ -22,8 +22,6 @@ import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
|
||||||
|
|
||||||
import org.eclipse.cdt.ui.actions.OpenViewActionGroup;
|
import org.eclipse.cdt.ui.actions.OpenViewActionGroup;
|
||||||
|
|
||||||
import org.eclipse.cdt.internal.ui.search.actions.SelectionSearchGroup;
|
|
||||||
|
|
||||||
public class CNavigatorOpenViewActionProvider extends CommonActionProvider {
|
public class CNavigatorOpenViewActionProvider extends CommonActionProvider {
|
||||||
|
|
||||||
private OpenViewActionGroup fOpenViewActionGroup;
|
private OpenViewActionGroup fOpenViewActionGroup;
|
||||||
|
@ -39,6 +37,8 @@ public class CNavigatorOpenViewActionProvider extends CommonActionProvider {
|
||||||
if (workbenchSite != null) {
|
if (workbenchSite != null) {
|
||||||
if (workbenchSite.getPart() != null && workbenchSite.getPart() instanceof IViewPart) {
|
if (workbenchSite.getPart() != null && workbenchSite.getPart() instanceof IViewPart) {
|
||||||
fOpenViewActionGroup= new OpenViewActionGroup(workbenchSite.getPart());
|
fOpenViewActionGroup= new OpenViewActionGroup(workbenchSite.getPart());
|
||||||
|
// properties action is already provided by resource extensions
|
||||||
|
fOpenViewActionGroup.setSuppressProperties(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ public class CNavigatorOpenViewActionProvider extends CommonActionProvider {
|
||||||
public void fillContextMenu(IMenuManager menu) {
|
public void fillContextMenu(IMenuManager menu) {
|
||||||
if (fOpenViewActionGroup != null) {
|
if (fOpenViewActionGroup != null) {
|
||||||
ISelection selection = getContext().getSelection();
|
ISelection selection = getContext().getSelection();
|
||||||
if (SelectionSearchGroup.canActionBeAdded(selection)){
|
if (OpenViewActionGroup.canActionBeAdded(selection)){
|
||||||
fOpenViewActionGroup.fillContextMenu(menu);
|
fOpenViewActionGroup.fillContextMenu(menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue