mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 18:35:37 +01:00
Sorted completion list
This commit is contained in:
@@ -7,7 +7,7 @@ import java.util.List;
|
||||
import org.eclipse.jdt.core.dom.ASTNode;
|
||||
import org.eclipse.jdt.core.dom.MethodDeclaration;
|
||||
|
||||
public class CompletionCandidate {
|
||||
public class CompletionCandidate implements Comparable<CompletionCandidate>{
|
||||
|
||||
private String definingClass;
|
||||
|
||||
@@ -119,4 +119,12 @@ public class CompletionCandidate {
|
||||
return type;
|
||||
}
|
||||
|
||||
public int compareTo(CompletionCandidate cc) {
|
||||
if(type != cc.getType()){
|
||||
return cc.getType() - type;
|
||||
}
|
||||
|
||||
return (elementName.compareTo(cc.getElementName()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user