Add Include working without a selection? [message #1012152] |
Wed, 20 February 2013 20:20  |
Eclipse User |
|
|
|
I'm confused about whether Add Include will work without anything selected. It appears to do so (details below), but my reading of the code suggests that it shouldn't. So I'm confused.
Here's the code that makes me think it shouldn't do anything if there is no selection:
if (selection.isEmpty() || !(selection instanceof ITextSelection)) {
return;
} from AddIncludeOnSelectionAction.java
And here's how I seem to be able to make it do things:
I have a class implementation file: someClass.cpp, containing an implementation of a single method, and without any #includes. If I run "Add Include" without anything selected, it adds an include for the header file where the class is declared, #include "someClass.h".
What's going on here?
|
|
|
|
Powered by
FUDForum. Page generated in 0.23281 seconds