1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Removed an unused method.

This commit is contained in:
Sergey Prigogin 2014-10-06 20:12:33 -07:00
parent d537ab066a
commit 9fc84c15c8
3 changed files with 2 additions and 13 deletions

View file

@ -75,7 +75,6 @@ public final class CSearchMessages extends NLS {
public static String SelectionParseAction_IncludeNotFound_format; public static String SelectionParseAction_IncludeNotFound_format;
public static String OccurrencesFinder_no_element; public static String OccurrencesFinder_no_element;
public static String OccurrencesFinder_no_binding; public static String OccurrencesFinder_no_binding;
public static String OccurrencesFinder_searchfor;
public static String OccurrencesFinder_label_singular; public static String OccurrencesFinder_label_singular;
public static String OccurrencesFinder_label_plural; public static String OccurrencesFinder_label_plural;
public static String OccurrencesFinder_occurrence_description; public static String OccurrencesFinder_occurrence_description;

View file

@ -107,7 +107,6 @@ SelectionParseAction_IncludeNotFound_format=Could not find include file ''{0}''
# Occurrences # Occurrences
OccurrencesFinder_no_element= Cannot search for the current selection. Please select a valid C/C++ element name. OccurrencesFinder_no_element= Cannot search for the current selection. Please select a valid C/C++ element name.
OccurrencesFinder_no_binding= Selected C/C++ element is unknown. OccurrencesFinder_no_binding= Selected C/C++ element is unknown.
OccurrencesFinder_searchfor=Search for Occurrences in File
# The first argument will be replaced by the element name and the second one by the file name # The first argument will be replaced by the element name and the second one by the file name
OccurrencesFinder_label_singular=''{0}'' - 1 occurrence in ''{1}'' OccurrencesFinder_label_singular=''{0}'' - 1 occurrence in ''{1}''
# The first argument will be replaced by the element name, the second by the count and the last by the file name # The first argument will be replaced by the element name, the second by the count and the last by the file name

View file

@ -30,7 +30,6 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
import org.eclipse.cdt.internal.ui.util.Messages; import org.eclipse.cdt.internal.ui.util.Messages;
public class OccurrencesFinder implements IOccurrencesFinder { public class OccurrencesFinder implements IOccurrencesFinder {
public static final String ID= "OccurrencesFinder"; //$NON-NLS-1$ public static final String ID= "OccurrencesFinder"; //$NON-NLS-1$
/** /**
@ -79,7 +78,7 @@ public class OccurrencesFinder implements IOccurrencesFinder {
private void performSearch() { private void performSearch() {
if (fResult == null) { if (fResult == null) {
fResult= new ArrayList<OccurrenceLocation>(); fResult= new ArrayList<>();
IASTName[] names= fRoot.getDeclarationsInAST(fTarget); IASTName[] names= fRoot.getDeclarationsInAST(fTarget);
for (IASTName candidate : names) { for (IASTName candidate : names) {
if (candidate.isPartOfTranslationUnitFile()) { if (candidate.isPartOfTranslationUnitFile()) {
@ -137,13 +136,6 @@ public class OccurrencesFinder implements IOccurrencesFinder {
return fRoot; return fRoot;
} }
/*
* @see org.eclipse.cdt.internal.ui.search.IOccurrencesFinder#getJobLabel()
*/
public String getJobLabel() {
return CSearchMessages.OccurrencesFinder_searchfor ;
}
@Override @Override
public String getElementName() { public String getElementName() {
if (fSelectedNode != null) { if (fSelectedNode != null) {
@ -180,8 +172,7 @@ public class OccurrencesFinder implements IOccurrencesFinder {
int flag = isWriteOccurrence ? F_WRITE_OCCURRENCE : F_READ_OCCURRENCE; int flag = isWriteOccurrence ? F_WRITE_OCCURRENCE : F_READ_OCCURRENCE;
String description = isWriteOccurrence ? fWriteDescription : fReadDescription; String description = isWriteOccurrence ? fWriteDescription : fReadDescription;
fResult.add(new OccurrenceLocation(offset, length, flag, description)); fResult.add(new OccurrenceLocation(offset, length, flag, description));
} } else {
else {
fResult.add(new OccurrenceLocation(offset, length, F_READ_OCCURRENCE, fWriteDescription)); fResult.add(new OccurrenceLocation(offset, length, F_READ_OCCURRENCE, fWriteDescription));
} }
} }