Fix for Bug 9596, allow "Add Include" command to handle C++ methods.
authorstechong
Wed, 12 Aug 2009 21:59:23 -0500
changeset 66 a3c8ab8bcb98
parent 65 025e91738d6a
child 67 ef1589eec61f
child 68 d8439c154fc7
Fix for Bug 9596, allow "Add Include" command to handle C++ methods.
cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AddIncludeOnSelectionAction.java
--- a/cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AddIncludeOnSelectionAction.java	Wed Aug 12 16:32:51 2009 -0500
+++ b/cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AddIncludeOnSelectionAction.java	Wed Aug 12 21:59:23 2009 -0500
@@ -242,8 +242,7 @@
 			// class, struct, union, enum
 			if (indexBinding instanceof ICompositeType || indexBinding instanceof IEnumeration) {
 				definitions= index.findDefinitions(indexBinding);
-			} else if (indexBinding instanceof ITypedef ||
-					(indexBinding instanceof IFunction && !(indexBinding instanceof ICPPMethod))) {
+			} else if (indexBinding instanceof ITypedef || (indexBinding instanceof IFunction)) {
 				definitions= index.findDeclarations(indexBinding);
 			}
 			if (definitions != null) {