Community
Participate
Working Groups
To Reproduce: 1. Open a file in the Makefile editor 2. Right-click on any item that isn't an include directive. The Open include direction action appears. Looking at the code in org.eclipse.cdt.make.internal.ui.editor.OpenIncludeAction, the problem seems to be in canActionBeAdded: public boolean canActionBeAdded(ISelection selection) { return getIncludeDirective(selection) != null; } Since getIncludeDirective will return an empty array in this scenario, the code should also check for array size: public boolean canActionBeAdded(ISelection selection) { IInclude[] includes = getIncludeDirective(selection); return includes!=null && includes.length!=0; }
Of course you are right. I'll apply the suggested fix.
Fixed in 6.0 > 20090326. Thanks for the contribution.