mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix for 101903: Junit failures for RC1
This commit is contained in:
parent
d30c9cee80
commit
c79f8eb661
2 changed files with 14 additions and 2 deletions
|
@ -337,7 +337,8 @@ public class DOMSearchUtil {
|
|||
|
||||
private static IASTName[] getNames(IASTTranslationUnit tu, IBinding binding, LimitTo limitTo) {
|
||||
IASTName[] names = null;
|
||||
if (limitTo == ICSearchConstants.DECLARATIONS) {
|
||||
if (limitTo == ICSearchConstants.DECLARATIONS ||
|
||||
limitTo == ICSearchConstants.DECLARATIONS_DEFINITIONS) {
|
||||
names = tu.getDeclarations(binding);
|
||||
} else if (limitTo == ICSearchConstants.REFERENCES) {
|
||||
names = tu.getReferences(binding);
|
||||
|
|
|
@ -513,8 +513,19 @@ public class CSearchPage extends DialogPage implements ISearchPage, ICSearchCons
|
|||
String text;
|
||||
try {
|
||||
text= reader.readLine();
|
||||
if (text == null)
|
||||
if (text == null){
|
||||
text= ""; //$NON-NLS-1$
|
||||
} else {
|
||||
//The user has selected something - we don't want to "redo" too much of the selection
|
||||
//but we need to ensure that it has the maximum chance of matching something in the index.
|
||||
//So we need to: i) get rid of any semi-colons if there are any
|
||||
|
||||
int indexSemi = text.indexOf(';');
|
||||
//Check to see if there are any semi-colons in the selected string, if there are select up to the semi colon
|
||||
if (indexSemi != -1){
|
||||
text = text.substring(0, indexSemi);
|
||||
}
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
text= ""; //$NON-NLS-1$
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue