[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] patch for refactoring bug 103938
|
the patch fixes
https://bugs.eclipse.org/bugs/show_bug.cgi?id=103938
Markus.
Index: TextSearchWrapper.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.refactoring/src/org/eclipse/cdt/internal/refactoring/TextSearchWrapper.java,v
retrieving revision 1.4
diff -u -r1.4 TextSearchWrapper.java
--- TextSearchWrapper.java 2 Jun 2005 18:46:57 -0000 1.4
+++ TextSearchWrapper.java 18 Jul 2005 09:40:53 -0000
@@ -14,6 +14,7 @@
import java.io.*;
import java.util.*;
+import org.eclipse.cdt.core.model.*;
import org.eclipse.cdt.internal.refactoring.scanner.Scanner;
import org.eclipse.cdt.internal.refactoring.scanner.Token;
import org.eclipse.cdt.refactoring.*;
@@ -135,7 +136,11 @@
public void accept(IResourceProxy proxy, int start, int length) {
IResource res= proxy.requestResource();
if (res instanceof IFile) {
- target.add(new CRefactoringMatch((IFile) res, start, length, 0));
+ IFile file= (IFile) res;
+ ICElement elem= CoreModel.getDefault().create(file);
+ if (elem instanceof ITranslationUnit) {
+ target.add(new CRefactoringMatch(file, start, length, 0));
+ }
}
}
};