if (modelElement instanceof SourceModule) {
SourceModule sm = (SourceModule) modelElement;
try {
IField[] fields = sm.getFields();
for (IField iField : fields) {
SourceField f = (SourceField) iField;
int fieldType = RutaParseUtils.getTypeOfIModelElement(f);
if (RutaTypeConstants.RUTA_TYPE_N == type) {
if (fieldType == RutaTypeConstants.RUTA_TYPE_N
|| fieldType == RutaTypeConstants.RUTA_TYPE_I
|| fieldType == RutaTypeConstants.RUTA_TYPE_D
|| fieldType == RutaTypeConstants.RUTA_TYPE_F) {
addProposal(startPart, f.getElementName(), CompletionProposal.LOCAL_VARIABLE_REF);
}
} else if (type == fieldType) {
addProposal(startPart, f.getElementName(), CompletionProposal.LOCAL_VARIABLE_REF);
}
}
} catch (ModelException e) {
}