mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Fixed a typo.
This commit is contained in:
parent
d0ff1ec5f5
commit
ffe0ce4345
2 changed files with 7 additions and 9 deletions
|
@ -129,7 +129,7 @@ public class PDOMSearchPage extends DialogPage implements ISearchPage {
|
||||||
new Integer(PDOMSearchQuery.FIND_DECLARATIONS),
|
new Integer(PDOMSearchQuery.FIND_DECLARATIONS),
|
||||||
new Integer(PDOMSearchQuery.FIND_DEFINITIONS),
|
new Integer(PDOMSearchQuery.FIND_DEFINITIONS),
|
||||||
new Integer(PDOMSearchQuery.FIND_REFERENCES),
|
new Integer(PDOMSearchQuery.FIND_REFERENCES),
|
||||||
new Integer(PDOMSearchQuery.FIND_ALL_OCCURANCES),
|
new Integer(PDOMSearchQuery.FIND_ALL_OCCURRENCES),
|
||||||
};
|
};
|
||||||
|
|
||||||
// The index of FIND_ALL_OCCURANCES
|
// The index of FIND_ALL_OCCURANCES
|
||||||
|
@ -552,7 +552,7 @@ public class PDOMSearchPage extends DialogPage implements ISearchPage {
|
||||||
|
|
||||||
IDialogSettings settings = getDialogSettings();
|
IDialogSettings settings = getDialogSettings();
|
||||||
|
|
||||||
int searchFlags = PDOMSearchPatternQuery.FIND_ALL_TYPES | PDOMSearchQuery.FIND_ALL_OCCURANCES;
|
int searchFlags = PDOMSearchPatternQuery.FIND_ALL_TYPES | PDOMSearchQuery.FIND_ALL_OCCURRENCES;
|
||||||
try {
|
try {
|
||||||
searchFlags = settings.getInt(STORE_SEARCH_FLAGS);
|
searchFlags = settings.getInt(STORE_SEARCH_FLAGS);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
|
@ -646,7 +646,7 @@ public class PDOMSearchPage extends DialogPage implements ISearchPage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((searchFlags & PDOMSearchQuery.FIND_ALL_OCCURANCES) == PDOMSearchQuery.FIND_ALL_OCCURANCES) {
|
if ((searchFlags & PDOMSearchQuery.FIND_ALL_OCCURRENCES) == PDOMSearchQuery.FIND_ALL_OCCURRENCES) {
|
||||||
limitToButtons[limitToAllButtonIndex].setSelection(true);
|
limitToButtons[limitToAllButtonIndex].setSelection(true);
|
||||||
for (int i = 0; i < limitToButtons.length; ++i) {
|
for (int i = 0; i < limitToButtons.length; ++i) {
|
||||||
if (i != limitToAllButtonIndex) {
|
if (i != limitToAllButtonIndex) {
|
||||||
|
|
|
@ -76,7 +76,7 @@ public abstract class PDOMSearchQuery implements ISearchQuery {
|
||||||
public static final int FIND_DEFINITIONS = IIndex.FIND_DEFINITIONS;
|
public static final int FIND_DEFINITIONS = IIndex.FIND_DEFINITIONS;
|
||||||
public static final int FIND_REFERENCES = IIndex.FIND_REFERENCES;
|
public static final int FIND_REFERENCES = IIndex.FIND_REFERENCES;
|
||||||
public static final int FIND_DECLARATIONS_DEFINITIONS = FIND_DECLARATIONS | FIND_DEFINITIONS;
|
public static final int FIND_DECLARATIONS_DEFINITIONS = FIND_DECLARATIONS | FIND_DEFINITIONS;
|
||||||
public static final int FIND_ALL_OCCURANCES = FIND_DECLARATIONS | FIND_DEFINITIONS | FIND_REFERENCES;
|
public static final int FIND_ALL_OCCURRENCES = FIND_DECLARATIONS | FIND_DEFINITIONS | FIND_REFERENCES;
|
||||||
|
|
||||||
protected final static int LABEL_FLAGS=
|
protected final static int LABEL_FLAGS=
|
||||||
CElementBaseLabels.M_PARAMETER_TYPES |
|
CElementBaseLabels.M_PARAMETER_TYPES |
|
||||||
|
@ -135,7 +135,6 @@ public abstract class PDOMSearchQuery implements ISearchQuery {
|
||||||
return defaultLabel;
|
return defaultLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getLabel() {
|
public String getLabel() {
|
||||||
String type;
|
String type;
|
||||||
if ((flags & FIND_REFERENCES) != 0)
|
if ((flags & FIND_REFERENCES) != 0)
|
||||||
|
@ -152,8 +151,8 @@ public abstract class PDOMSearchQuery implements ISearchQuery {
|
||||||
public String getResultLabel(String pattern, int matchCount) {
|
public String getResultLabel(String pattern, int matchCount) {
|
||||||
// Report pattern and number of matches
|
// Report pattern and number of matches
|
||||||
String label;
|
String label;
|
||||||
final int kindFlags= flags & FIND_ALL_OCCURANCES;
|
final int kindFlags= flags & FIND_ALL_OCCURRENCES;
|
||||||
switch(kindFlags) {
|
switch (kindFlags) {
|
||||||
case FIND_REFERENCES:
|
case FIND_REFERENCES:
|
||||||
label = NLS.bind(CSearchMessages.PDOMSearchQuery_refs_result_label, pattern);
|
label = NLS.bind(CSearchMessages.PDOMSearchQuery_refs_result_label, pattern);
|
||||||
break;
|
break;
|
||||||
|
@ -431,8 +430,7 @@ public abstract class PDOMSearchQuery implements ISearchQuery {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return runWithIndex(index, monitor);
|
return runWithIndex(index, monitor);
|
||||||
}
|
} finally {
|
||||||
finally {
|
|
||||||
index.releaseReadLock();
|
index.releaseReadLock();
|
||||||
}
|
}
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue