mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 20:05:35 +02:00
Bug 270013 - Open Include action always displayed in the outline view in the Makefile editor, by Violaine Batthish
This commit is contained in:
parent
fb71de7ec2
commit
5dc7000a12
1 changed files with 6 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2008 QNX Software Systems and others.
|
* Copyright (c) 2002, 2009 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* QNX Software Systems - Initial API and implementation
|
* QNX Software Systems - Initial API and implementation
|
||||||
|
* Violaine Batthish (IBM) - bug 270013
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.make.internal.ui.editor;
|
package org.eclipse.cdt.make.internal.ui.editor;
|
||||||
|
@ -55,6 +56,7 @@ public class OpenIncludeAction extends Action {
|
||||||
*
|
*
|
||||||
* @see org.eclipse.jface.action.IAction#run()
|
* @see org.eclipse.jface.action.IAction#run()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
IInclude[] includes= getIncludeDirective(fSelectionProvider.getSelection());
|
IInclude[] includes= getIncludeDirective(fSelectionProvider.getSelection());
|
||||||
if (includes != null) {
|
if (includes != null) {
|
||||||
|
@ -121,6 +123,7 @@ public class OpenIncludeAction extends Action {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canActionBeAdded(ISelection selection) {
|
public boolean canActionBeAdded(ISelection selection) {
|
||||||
return getIncludeDirective(selection) != null;
|
IInclude[] includes = getIncludeDirective(selection);
|
||||||
|
return includes != null && includes.length != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue