Commit 887412f2 authored by Adam Knapp's avatar Adam Knapp
Browse files

Improvement of content assistant



Eliminating NullPointerException when putting a dot after a number
Signed-off-by: Adam Knapp's avatarAdam Knapp <adam.knapp@ericsson.com>
parent eb0ae2b4
......@@ -139,8 +139,11 @@ public final class ContentAssistProcessor implements IContentAssistProcessor {
final CompilationTimeStamp timestamp = tempModule.getLastCompilationTimeStamp();
if (ref != null ) {
if (ref != null) {
Assignment assignment = scope.getAssBySRef(timestamp, ref);
if (assignment == null) {
return null;
}
IType type = assignment.getType(timestamp);
if (type != null) {
if (ref.getSubreferences().size() > 1) {
......@@ -299,6 +302,9 @@ public final class ContentAssistProcessor implements IContentAssistProcessor {
final IType fieldType = ct.getFieldType(timestamp, ref, 1, Expected_Value_type.EXPECTED_DYNAMIC_VALUE, null, false);
if (fieldType instanceof Class_Type) {
ct = (Class_Type)fieldType;
if (ct.getClassBody() == null) {
return;
}
for (Map.Entry<String, Definition> entry : ct.getClassBody().getDefinitionMap().entrySet()) {
final Definition d = entry.getValue();
final String memberName = d.getIdentifier().getDisplayName();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment