Changeset 1103
- Timestamp:
- 04/12/08 13:23:27 (9 months ago)
- Files:
-
- trunk/descent.core/src/descent/core/CompletionProposal.java (modified) (1 diff)
- trunk/descent.core/src/descent/core/Signature.java (modified) (2 diffs)
- trunk/descent.core/src/descent/internal/codeassist/CompletionEngine.java (modified) (19 diffs)
- trunk/descent.core/src/descent/internal/codeassist/InternalCompletionProposal.java (modified) (3 diffs)
- trunk/descent.core/src/descent/internal/compiler/lookup/ModuleBuilder.java (modified) (2 diffs)
- trunk/descent.core/src/descent/internal/compiler/lookup/SemanticRest.java (modified) (1 diff)
- trunk/descent.core/src/descent/internal/core/CompilationUnit.java (modified) (1 diff)
- trunk/descent.core/src/descent/internal/core/InternalSignature.java (modified) (1 diff)
- trunk/descent.tests/descent/tests/assist/AbstractCompletionTest.java (modified) (2 diffs)
- trunk/descent.tests/descent/tests/assist/FieldProposal_Test.java (added)
- trunk/descent.tests/descent/tests/mangling/SignatureKind_Test.java (added)
- trunk/descent.ui/src/descent/internal/ui/text/java/AbstractJavaCompletionProposal.java (modified) (1 diff)
- trunk/descent.ui/src/descent/internal/ui/text/java/LazyJavaMethodCompletionProposal.java (modified) (5 diffs)
- trunk/descent.ui/src/descent/ui/text/java/CompletionProposalLabelProvider.java (modified) (1 diff)
- trunk/todos.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/descent.core/src/descent/core/CompletionProposal.java
r1102 r1103 1319 1319 1320 1320 public char[] getTypeSignature() { 1321 return this.type Name;1321 return this.typeSignature; 1322 1322 } 1323 1323 trunk/descent.core/src/descent/core/Signature.java
r1099 r1103 764 764 */ 765 765 public static final String SIG_DCHAR = "w"; 766 767 /** 768 * Kind constant for a primitive type signature. 769 * @see #getTypeSignatureKind(String) 770 * @since 3.0 771 */ 772 public static final int PRIMITIVE_TYPE_SIGNATURE = 1; 773 774 /** 775 * Kind constant for a pointer type signature. 776 * @see #getTypeSignatureKind(String) 777 * @since 3.0 778 */ 779 public static final int POINTER_TYPE_SIGNATURE = 2; 780 781 /** 782 * Kind constant for a dynamic array type signature. 783 * @see #getTypeSignatureKind(String) 784 * @since 3.0 785 */ 786 public static final int DYNAMIC_ARRAY_TYPE_SIGNATURE = 3; 787 788 /** 789 * Kind constant for a static array type signature. 790 * @see #getTypeSignatureKind(String) 791 * @since 3.0 792 */ 793 public static final int STATIC_ARRAY_TYPE_SIGNATURE = 4; 794 795 /** 796 * Kind constant for an associative type signature. 797 * @see #getTypeSignatureKind(String) 798 * @since 3.0 799 */ 800 public static final int ASSOCIATIVE_ARRAY_TYPE_SIGNATURE = 5; 801 802 /** 803 * Kind constant for a typeof type signature. 804 * @see #getTypeSignatureKind(String) 805 * @since 3.0 806 */ 807 public static final int TYPEOF_TYPE_SIGNATURE = 6; 808 809 /** 810 * Kind constant for a slice type signature. 811 * @see #getTypeSignatureKind(String) 812 * @since 3.0 813 */ 814 public static final int SLICE_TYPE_SIGNATURE = 7; 815 816 /** 817 * Kind constant for a module signature. 818 * @see #getTypeSignatureKind(String) 819 * @since 3.0 820 */ 821 public static final int MODULE_SIGNATURE = 8; 822 823 /** 824 * Kind constant for a class type signature. 825 * @see #getTypeSignatureKind(String) 826 * @since 3.0 827 */ 828 public static final int CLASS_TYPE_SIGNATURE = 9; 829 830 /** 831 * Kind constant for a struct type signature. 832 * @see #getTypeSignatureKind(String) 833 * @since 3.0 834 */ 835 public static final int STRUCT_TYPE_SIGNATURE = 10; 836 837 /** 838 * Kind constant for a union type signature. 839 * @see #getTypeSignatureKind(String) 840 * @since 3.0 841 */ 842 public static final int UNION_TYPE_SIGNATURE = 11; 843 844 /** 845 * Kind constant for an interface type signature. 846 * @see #getTypeSignatureKind(String) 847 * @since 3.0 848 */ 849 public static final int INTERFACE_TYPE_SIGNATURE = 12; 850 851 /** 852 * Kind constant for an identifier type signature. 853 * @see #getTypeSignatureKind(String) 854 * @since 3.0 855 */ 856 public static final int IDENTIFIER_TYPE_SIGNATURE = 13; 857 858 /** 859 * Kind constant for a function type signature. 860 * @see #getTypeSignatureKind(String) 861 * @since 3.0 862 */ 863 public static final int FUNCTION_TYPE_SIGNATURE = 14; 864 865 /** 866 * Kind constant for a delegate type signature. 867 * @see #getTypeSignatureKind(String) 868 * @since 3.0 869 */ 870 public static final int DELEGATE_TYPE_SIGNATURE = 15; 871 872 /** 873 * Kind constant for a template type signature. 874 * @see #getTypeSignatureKind(String) 875 * @since 3.0 876 */ 877 public static final int TEMPLATE_TYPE_SIGNATURE = 16; 878 879 /** 880 * Kind constant for a template instance type signature. 881 * @see #getTypeSignatureKind(String) 882 * @since 3.0 883 */ 884 public static final int TEMPLATE_INSTANCE_TYPE_SIGNATURE = 17; 885 886 /** 887 * Kind constant for a function signature. 888 * @see #getTypeSignatureKind(String) 889 * @since 3.0 890 */ 891 public static final int FUNCTION_SIGNATURE = 18; 892 893 /** 894 * Kind constant for a templated class type signature. 895 * @see #getTypeSignatureKind(String) 896 * @since 3.0 897 */ 898 public static final int TEMPLATED_CLASS_TYPE_SIGNATURE = 19; 899 900 /** 901 * Kind constant for a templated struct type signature. 902 * @see #getTypeSignatureKind(String) 903 * @since 3.0 904 */ 905 public static final int TEMPLATED_STRUCT_TYPE_SIGNATURE = 20; 906 907 /** 908 * Kind constant for a templated union type signature. 909 * @see #getTypeSignatureKind(String) 910 * @since 3.0 911 */ 912 public static final int TEMPLATED_UNION_TYPE_SIGNATURE = 21; 913 914 /** 915 * Kind constant for a templated interface type signature. 916 * @see #getTypeSignatureKind(String) 917 * @since 3.0 918 */ 919 public static final int TEMPLATED_INTERFACE_TYPE_SIGNATURE = 22; 920 921 /** 922 * Kind constant for a templated function signature. 923 * @see #getTypeSignatureKind(String) 924 * @since 3.0 925 */ 926 public static final int TEMPLATED_FUNCTION_SIGNATURE = 23; 927 928 766 929 767 930 private Signature() { … … 1847 2010 } 1848 2011 2012 /** 2013 * Returns the kind a given signature. 2014 * @param signature a signature 2015 * @return the kind of type signature 2016 */ 2017 public static int getTypeSignatureKind(String signature) { 2018 final int[] kind = { 0 }; 2019 SignatureProcessor.process(signature, false, new SignatureRequestorAdapter() { 2020 @Override 2021 public void acceptPrimitive(TypeBasic type) { 2022 kind[0] = PRIMITIVE_TYPE_SIGNATURE; 2023 } 2024 @Override 2025 public void acceptPointer(String signature) { 2026 kind[0] = POINTER_TYPE_SIGNATURE; 2027 } 2028 @Override 2029 public void acceptAssociativeArray(String signature) { 2030 kind[0] = ASSOCIATIVE_ARRAY_TYPE_SIGNATURE; 2031 } 2032 @Override 2033 public void acceptDelegate(String signature) { 2034 kind[0] = DELEGATE_TYPE_SIGNATURE; 2035 } 2036 @Override 2037 public void acceptDynamicArray(String signature) { 2038 kind[0] = DYNAMIC_ARRAY_TYPE_SIGNATURE; 2039 } 2040 @Override 2041 public void acceptIdentifier(char[][] compoundName, String signature) { 2042 kind[0] = IDENTIFIER_TYPE_SIGNATURE; 2043 } 2044 @Override 2045 public void acceptModule(char[][] compoundName, String signature) { 2046 kind[0] = MODULE_SIGNATURE; 2047 } 2048 @Override 2049 public void acceptSlice(char[] lwr, char[] upr, String signature) { 2050 kind[0] = SLICE_TYPE_SIGNATURE; 2051 } 2052 @Override 2053 public void acceptStaticArray(char[] dimension, String signature) { 2054 kind[0] = STATIC_ARRAY_TYPE_SIGNATURE; 2055 } 2056 @Override 2057 public void acceptSymbol(char type, char[] name, int startPosition, String signature) { 2058 switch(type) { 2059 case ISignatureConstants.CLASS: 2060 kind[0] = CLASS_TYPE_SIGNATURE; 2061 break; 2062 case ISignatureConstants.STRUCT: 2063 kind[0] = STRUCT_TYPE_SIGNATURE; 2064 break; 2065 case ISignatureConstants.UNION: 2066 kind[0] = UNION_TYPE_SIGNATURE; 2067 break; 2068 case ISignatureConstants.INTERFACE: 2069 kind[0] = INTERFACE_TYPE_SIGNATURE; 2070 break; 2071 case ISignatureConstants.FUNCTION: 2072 kind[0] = FUNCTION_SIGNATURE; 2073 break; 2074 case ISignatureConstants.TEMPLATE: 2075 kind[0] = TEMPLATE_TYPE_SIGNATURE; 2076 break; 2077 case ISignatureConstants.TEMPLATED_CLASS: 2078 kind[0] = TEMPLATED_CLASS_TYPE_SIGNATURE; 2079 break; 2080 case ISignatureConstants.TEMPLATED_STRUCT: 2081 kind[0] = TEMPLATED_STRUCT_TYPE_SIGNATURE; 2082 break; 2083 case ISignatureConstants.TEMPLATED_UNION: 2084 kind[0] = TEMPLATED_UNION_TYPE_SIGNATURE; 2085 break; 2086 case ISignatureConstants.TEMPLATED_INTERFACE: 2087 kind[0] = TEMPLATED_INTERFACE_TYPE_SIGNATURE; 2088 break; 2089 case ISignatureConstants.TEMPLATED_FUNCTION: 2090 kind[0] = TEMPLATED_FUNCTION_SIGNATURE; 2091 break; 2092 } 2093 } 2094 @Override 2095 public void acceptTypeof(char[] expression, String signature) { 2096 kind[0] = TYPEOF_TYPE_SIGNATURE; 2097 } 2098 @Override 2099 public void exitFunctionType(LINK link, char argumentBreak, String signature) { 2100 kind[0] = FUNCTION_TYPE_SIGNATURE; 2101 } 2102 @Override 2103 public void exitTemplateInstance(String signature) { 2104 kind[0] = TEMPLATE_INSTANCE_TYPE_SIGNATURE; 2105 } 2106 }); 2107 return kind[0]; 2108 } 2109 2110 /** 2111 * Returns the kind a given signature. 2112 * @param signature a signature 2113 * @return the kind of signature 2114 */ 2115 public static int getTypeSignatureKind(char[] signature) { 2116 return getTypeSignatureKind(new String(signature)); 2117 } 2118 1849 2119 /* 1850 2120 * Given a string, this method gets it's length, and, seen as a string, trunk/descent.core/src/descent/internal/codeassist/CompletionEngine.java
r1102 r1103 121 121 import descent.internal.core.INamingRequestor; 122 122 import descent.internal.core.InternalNamingConventions; 123 import descent.internal.core.InternalSignature;124 123 import descent.internal.core.SearchableEnvironment; 125 124 import descent.internal.core.util.Util; … … 471 470 return; 472 471 } 472 } else if (isGetter((TypeFunction) type)) { 473 type = ((TypeFunction) type).next; 474 if (type == null) { 475 return; 476 } 473 477 } 474 478 } … … 506 510 return type != null && type.next == Type.tvoid 507 511 && type.parameters != null && type.parameters.size() == 1; 512 } 513 514 private boolean isGetter(TypeFunction type) { 515 return type != null && type.next != Type.tvoid 516 && (type.parameters == null || type.parameters.isEmpty()); 508 517 } 509 518 … … 1368 1377 proposal.setCompletion(CharOperation.concat(currentName, "()".toCharArray())); 1369 1378 proposal.setSignature(signature); 1370 proposal.setType Name(signature);1379 proposal.setTypeSignature(signature); 1371 1380 proposal.setRelevance(relevance); 1372 1381 proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset); … … 1383 1392 1384 1393 if (type.isintegral()) { 1385 suggestIntegralProperties( );1394 suggestIntegralProperties(type.getSignature().toCharArray()); 1386 1395 } 1387 1396 … … 1394 1403 private void suggestAllTypesProperties(Type type) { 1395 1404 suggestProperties( 1405 type.getSignature().toCharArray(), 1396 1406 allTypesProperties, 1397 1407 new Type[] { type, typeInt, typeInt, typeCharArray, typeCharArray }, … … 1400 1410 1401 1411 public final static char[][] integralTypesProperties = { Id.max, Id.min }; 1402 private void suggestIntegralProperties( ) {1412 private void suggestIntegralProperties(char[] declarationSignature) { 1403 1413 suggestProperties( 1414 declarationSignature, 1404 1415 integralTypesProperties, 1405 1416 new Type[] { typeInt, typeInt }, … … 1410 1421 private void suggestFloatingProperties(Type type) { 1411 1422 suggestProperties( 1423 type.getSignature().toCharArray(), 1412 1424 floatingPointTypesProperties, 1413 1425 new Type[] { type, type, typeInt, type, typeInt, typeInt, typeInt, typeInt, typeInt, type, type }, … … 1420 1432 suggestAllTypesProperties(type); 1421 1433 suggestProperties( 1434 type.getSignature().toCharArray(), 1422 1435 staticAndDynamicArrayProperties, 1423 1436 new Type[] { type, type, typeInt, typeInt, type }, … … 1428 1441 suggestAllTypesProperties(type); 1429 1442 suggestProperties( 1443 type.getSignature().toCharArray(), 1430 1444 staticAndDynamicArrayProperties, 1431 1445 new Type[] { type, type, typeInt, typeInt, type }, … … 1437 1451 suggestAllTypesProperties(type); 1438 1452 suggestProperties( 1453 type.getSignature().toCharArray(), 1439 1454 associativeArrayProperties, 1440 1455 new Type[] { typeInt, … … 1512 1527 // If the base type of the enum is integral, also suggest integer properties 1513 1528 if (enumDeclaration.memtype.isintegral()) { 1514 suggestIntegralProperties( );1529 suggestIntegralProperties(enumDeclaration.getSignature().toCharArray()); 1515 1530 } 1516 1531 } … … 1653 1668 proposal.setName(ident); 1654 1669 proposal.setCompletion(ident); 1655 proposal.setType Name(typeName);1670 proposal.setTypeSignature(typeName); 1656 1671 proposal.setSignature(sig); 1672 proposal.setDeclarationSignature(var.parent.getSignature().toCharArray()); 1657 1673 proposal.setFlags(flags | var.getFlags()); 1658 1674 proposal.setRelevance(relevance); … … 1695 1711 boolean isLocal = alias.parent instanceof FuncDeclaration; 1696 1712 1697 CompletionProposal proposal = this.createProposal(isLocal ? CompletionProposal.LOCAL_VARIABLE_REF : CompletionProposal. FIELD_REF, this.actualCompletionPosition, alias);1713 CompletionProposal proposal = this.createProposal(isLocal ? CompletionProposal.LOCAL_VARIABLE_REF : CompletionProposal.TYPE_REF, this.actualCompletionPosition, alias); 1698 1714 proposal.setName(ident); 1699 1715 proposal.setCompletion(ident); … … 1743 1759 relevance += computeRelevanceForExpectedType(type); 1744 1760 1745 proposal.setType Name(sigChars);1761 proposal.setTypeSignature(sigChars); 1746 1762 proposal.setFlags(flags | alias.getFlags() | Flags.AccAlias); 1747 1763 proposal.setRelevance(relevance); … … 1766 1782 boolean isLocal = typedef.parent instanceof FuncDeclaration; 1767 1783 1768 CompletionProposal proposal = this.createProposal(isLocal ? CompletionProposal.LOCAL_VARIABLE_REF : CompletionProposal. FIELD_REF, this.actualCompletionPosition, typedef);1784 CompletionProposal proposal = this.createProposal(isLocal ? CompletionProposal.LOCAL_VARIABLE_REF : CompletionProposal.TYPE_REF, this.actualCompletionPosition, typedef); 1769 1785 proposal.setName(ident); 1770 1786 proposal.setCompletion(ident); 1771 1787 proposal.setSignature(sigChars); 1772 proposal.setType Name(typedef.basetype.getSignature().toCharArray());1788 proposal.setTypeSignature(typedef.basetype.getSignature().toCharArray()); 1773 1789 proposal.setFlags(flags | typedef.getFlags() | Flags.AccTypedef); 1774 1790 proposal.setRelevance(relevance); … … 1915 1931 proposal.setSignature(sig.toCharArray()); 1916 1932 } 1917 proposal.setType Name(type.getSignature().toCharArray());1933 proposal.setTypeSignature(type.getSignature().toCharArray()); 1918 1934 proposal.setFlags(flags | func.getFlags()); 1919 1935 proposal.setRelevance(relevance); … … 2058 2074 } 2059 2075 2060 private void suggestProperties( 2076 private void suggestProperties( 2077 char[] declarationSignature, 2061 2078 char[][] properties, 2062 2079 Type[] types, … … 2077 2094 proposal.setName(property); 2078 2095 proposal.setCompletion(property); 2079 proposal.setTypeName(type.getSignature().toCharArray()); 2096 proposal.setDeclarationSignature(declarationSignature); 2097 proposal.setTypeSignature(type.getSignature().toCharArray()); 2098 proposal.setSignature((new String(declarationSignature) + "/" + property.length + new String(property)).toCharArray()); 2080 2099 proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset); 2081 2100 CompletionEngine.this.requestor.accept(proposal); trunk/descent.core/src/descent/internal/codeassist/InternalCompletionProposal.java
r1102 r1103 41 41 protected char[] declarationTypeName; 42 42 protected char[] packageName; 43 protected char[] type Name;43 protected char[] typeSignature; 44 44 protected char[][] parameterPackageNames; 45 45 protected char[][] parameterTypeNames; … … 158 158 159 159 protected char[] getTypeSignature() { 160 return this.type Name;160 return this.typeSignature; 161 161 } 162 162 … … 182 182 } 183 183 184 protected void setType Name(char[] typeName) {185 this.type Name = typeName;184 protected void setTypeSignature(char[] typeSignature) { 185 this.typeSignature = typeSignature; 186 186 } 187 187 trunk/descent.core/src/descent/internal/compiler/lookup/ModuleBuilder.java
r1100 r1103 83 83 * One ring to rule them all. 84 84 */ 85 private final static boolean LAZY = false;85 private final static boolean LAZY = true; 86 86 87 87 /* … … 204 204 time = System.currentTimeMillis() - time; 205 205 if (time != 0) { 206 //System.out.println("Building module " + module.moduleName + " took: " + time + " milliseconds to complete.");206 System.out.println("Building module " + module.moduleName + " took: " + time + " milliseconds to complete."); 207 207 } 208 208 } catch (JavaModelException e) { trunk/descent.core/src/descent/internal/compiler/lookup/SemanticRest.java
r1100 r1103 20 20 21 21 public void setSemanticContext(Scope scope, SemanticContext context) { 22 if (scope == null) { 23 System.out.println(1); 22 if (scope != null) { 23 this.sc = scope; 24 this.linkage = scope.linkage; 24 25 } 25 26 this.sc = scope;27 this.linkage = scope.linkage;28 26 this.context = context; 29 27 } trunk/descent.core/src/descent/internal/core/CompilationUnit.java
r1087 r1103 998 998 if (buffer == null) return null; 999 999 1000 if (buffer.getOwner() == null) { 1001 buffer = 1002 isWorkingCopy 1003 ? this.owner.createBuffer(this) 1004 : BufferManager.getDefaultBufferManager().createBuffer(this); 1005 } 1006 1000 1007 // set the buffer source 1001 1008 if (buffer.getCharacters() == null) { trunk/descent.core/src/descent/internal/core/InternalSignature.java
r1099 r1103 405 405 // found it 406 406 descent.core.ICompilationUnit unit = pack 407 .getC ompilationUnit(filename);407 .getClassFile(filename); 408 408 if (!unit.exists()) { 409 unit = pack.getC lassFile(filename);409 unit = pack.getCompilationUnit(filename); 410 410 if (!unit.exists()) 411 411 continue; trunk/descent.tests/descent/tests/assist/AbstractCompletionTest.java
r1102 r1103 94 94 assertEquals(end, prop.getReplaceEnd()); 95 95 96 for (int j = 0; j < extras.length; j++, i++) { 97 switch(extras[i]) { 96 for (int j = 0; j < extras.length; j++) { 97 i++; 98 99 switch(extras[j]) { 98 100 case LABEL: 99 101 assertTrue(expectations[i] instanceof String); … … 112 114 break; 113 115 case DECLARATION_SIGNATURE: 114 assertTrue(expectations[i] instanceof String);116 assertTrue(expectations[i] == null || expectations[i] instanceof String); 115 117 String declSignature = (String) expectations[i]; 116 assertEquals(declSignature, new String(prop.getDeclarationSignature())); 118 if (declSignature == null) { 119 assertNull(prop.getDeclarationSignature()); 120 } else { 121 assertEquals(declSignature, new String(prop.getDeclarationSignature())); 122 } 117 123 break; 118 124 } trunk/descent.ui/src/descent/internal/ui/text/java/AbstractJavaCompletionProposal.java
r1041 r1103 285 285 286 286 // fix for PR #5533. Assumes that no eating takes place. 287 if ((getCursorPosition() > 0 && getCursorPosition() <= buffer.length() && buffer.charAt(getCursorPosition() - 1) != trigger)) { 287 if ((getCursorPosition() > 0 && getCursorPosition() <= buffer.length() 288 && buffer.charAt(getCursorPosition() - 1) != trigger 289 && trigger != '=' && trigger != ';')) { 288 290 buffer.insert(getCursorPosition(), trigger); 289 291 setCursorPosition(getCursorPosition() + 1); trunk/descent.ui/src/descent/internal/ui/text/java/LazyJavaMethodCompletionProposal.java
r1102 r1103 54 54 public class LazyJavaMethodCompletionProposal extends LazyJavaCompletionProposal { 55 55 /** Triggers for types. Do not modify. */ 56 protected static final char[] TYPE_TRIGGERS= new char[] { '.', '\t', '[', '(', ' ' };56 protected static final char[] TYPE_TRIGGERS= new char[] { '.', '\t', '[', '(', '=', ';', ' ' }; 57 57 /** Triggers for types in javadoc. Do not modify. */ 58 58 protected static final char[] JDOC_TYPE_TRIGGERS= new char[] { '#', '}', ' ', '.' }; … … 69 69 private boolean fIsGetter; 70 70 private boolean fIsGetterComputed= false; 71 private boolean fWantProperty = false; 71 72 private int[] fArgumentOffsets; 72 73 private int[] fArgumentLengths; … … 277 278 public void apply(IDocument document, char trigger, int offset) { 278 279 try { 279 boolean insertClosingParenthesis= trigger == '(' && autocloseBrackets(); 280 if (insertClosingParenthesis) { 281 updateReplacementWithParentheses(); 282 trigger= '\0'; 283 } 280 this.fWantProperty = trigger == '=' || trigger == ';'; 281 282 // boolean insertClosingParenthesis= trigger == '(' && autocloseBrackets(); 283 // if (insertClosingParenthesis) { 284 // updateReplacementWithParentheses(); 285 // trigger= '\0'; 286 // } 284 287 285 288 super.apply(document, trigger, offset); … … 558 561 559 562 private boolean computeIsSetter() throws IllegalArgumentException { 563 if (!fWantProperty) { 564 return false; 565 } 566 560 567 char[] retType = Signature.getReturnType(fProposal.getTypeSignature()); 561 568 if (retType.length == 1 && retType[0] == 'v') { … … 566 573 567 574 private boolean computeIsGetter() throws IllegalArgumentException { 575 if (!fWantProperty) { 576 return false; 577 } 578 568 579 char[] retType = Signature.getReturnType(fProposal.getTypeSignature()); 569 580 if (retType.length != 1 || retType[0] != 'v') { trunk/descent.ui/src/descent/ui/text/java/CompletionProposalLabelProvider.java
r1102 r1103 493 493 buf.append(proposal.getName()); 494 494 495 char[] type Name = proposal.getTypeSignature();496 if (type Name != null && typeName.length != 0) {495 char[] typeSignature = proposal.getTypeSignature(); 496 if (typeSignature != null && typeSignature.length != 0) { 497 497 buf.append(" "); //$NON-NLS-1$ 498 buf.append(Signature.getSimpleName(Signature.toCharArray(typeName))); 498 buf.append(Signature.getSimpleName(Signature.toCharArray(typeSignature))); 499 } 500 501 char[] declSignature = proposal.getDeclarationSignature(); 502 if (declSignature != null && declSignature.length != 0) { 503 buf.append(JavaElementLabels.CONCAT_STRING); 504 505 int declKind = Signature.getTypeSignatureKind(declSignature); 506 if (declKind == Signature.MODULE_SIGNATURE) { 507 buf.append(Signature.toCharArray(declSignature)); 508 } else { 509 buf.append(Signature.getSimpleName(Signature.toCharArray(declSignature))); 510 } 499 511 } 500 512 trunk/todos.txt
r1097 r1103 2 2 - Test code select and binding for aliased symbols (i.e. alias Foo.Bar myAlias). 3 3 - See why "Box!(int) box = new |" shrinks icons, etc. 4 - Implement ClassFile#buildStructure to use a File to get it's contents.
