| Summary: | CompilerBindings - method "toTypeName": wrong computation on primitives | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Andreas Kaluza <andreas> |
| Component: | Recommenders | Assignee: | Marcel Bruch <marcel.bruch> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Andreas Kaluza
Problem is in the class IntelligentCompletionContext: the method getExpectedType() returns "Lint" on the primitive "int". If I like to test isPrimitive on the return, the result is false. Added:
if (binding.isArrayType()) {
final int dimensions = binding.dimensions();
final TypeBinding leafComponentType = binding.leafComponentType();
return VmTypeName.get(StringUtils.repeat("[", dimensions) + toTypeName(leafComponentType));
}
String signature = String.valueOf(binding.computeUniqueKey());
if (signature.length() == 1) {
return VmTypeName.get(signature);
}
...
However, this string parsing stuff is somewhat error prone and happens in several different places. we need to get rid of this somehow and put it into one single place... I'll keep an eye on this
Closing this issue. Please give latest dev build (v0.5) a try: http://download.eclipse.org/recommenders/updates/dev/e37/ http://download.eclipse.org/recommenders/updates/dev/e42/ Closing this issue. Please give latest dev build (v0.5) a try: http://download.eclipse.org/recommenders/updates/dev/e37/ http://download.eclipse.org/recommenders/updates/dev/e42/ |