1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug Fixing

This commit is contained in:
Hoda Amer 2004-07-08 19:35:12 +00:00
parent 18c40f7d32
commit 6200706de4
3 changed files with 32 additions and 0 deletions

View file

@ -1,3 +1,6 @@
2004-07-08 Hoda Amer
Partial fix for PR 69439: content assist confusion
2004-07-08 Bogdan Gheorghe
Fix for 64177: [Search] Clean up Selection Search UI
Fix for 57121: [Search] Searching when all of the "Search For" checkboxes are unchecked causes an exception

View file

@ -649,5 +649,29 @@ public class CCompletionProposal implements ICCompletionProposal, ICompletionPro
public void updateReplacementLength(int length) {
setReplacementLength(length);
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
return fDisplayString.hashCode()
+ fReplacementString.hashCode()
+ ((fContextInformation == null) ? 0 : fContextInformation.hashCode());
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals(Object other) {
if(!(other instanceof CCompletionProposal))
return false;
if(!(fDisplayString.equals(((CCompletionProposal)other).fDisplayString)))
return false;
if(!(fReplacementString.equals(((CCompletionProposal)other).fReplacementString)))
return false;
if((fContextInformation != null) && (((CCompletionProposal)other).fContextInformation != null) && (!(fContextInformation.equals(((CCompletionProposal)other).fContextInformation))))
return false;
return true;
}
}

View file

@ -774,6 +774,11 @@ public class CompletionEngine implements RelevanceConstants {
return null;
}
if(completionNode.getCompletionKind() == CompletionKind.NO_SUCH_KIND){
log("Invalid Completion Kind Error"); //$NON-NLS-1$
return null;
}
// set the completionStart and the completionLength
completionOrigin = completionOffset;
completionStart = completionOffset - completionNode.getCompletionPrefix().length();