Revision 687 org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.impl/src/main/java/org/gvsig/scripting/swing/impl/syntaxhighlight/JRSyntaxTextArea.java
JRSyntaxTextArea.java | ||
---|---|---|
416 | 416 |
"False", |
417 | 417 |
"None", |
418 | 418 |
"self", |
419 |
"break", |
|
419 | 420 |
"__init__", |
420 | 421 |
"__len__", |
421 | 422 |
"__str__", |
... | ... | |
528 | 529 |
}); |
529 | 530 |
words.addAll(Arrays.asList(x)); |
530 | 531 |
for (String word : words) { |
531 |
BasicCompletion completion = new MyBasicCompletion(this, word);
|
|
532 |
BasicCompletion completion = new BasicCompletion(this, word); |
|
532 | 533 |
completion.setIcon(wordIcon); |
533 | 534 |
completion.setRelevance(10); |
534 | 535 |
all.add(completion); |
... | ... | |
540 | 541 |
|
541 | 542 |
} |
542 | 543 |
|
543 |
private static class MyBasicCompletion extends BasicCompletion { |
|
544 |
|
|
545 |
public MyBasicCompletion(CompletionProvider provider, String replacementText) { |
|
546 |
super(provider, replacementText); |
|
547 |
} |
|
548 |
|
|
549 |
public int compareTo(Completion c2) { |
|
550 |
if (c2==this) { |
|
551 |
return 0; |
|
552 |
} |
|
553 |
else if (c2!=null) { |
|
554 |
return toString().compareTo(c2.toString()); |
|
555 |
} |
|
556 |
return -1; |
|
557 |
} |
|
558 |
|
|
559 |
} |
|
560 |
|
|
561 | 544 |
private String normalizeContentType(String s) { |
562 | 545 |
s = s.toLowerCase(); |
563 | 546 |
if (this.contentTypeAlias.containsKey(s)) { |
Also available in: Unified diff