|| text.startsWith(qualifier.proposal.toString()))
{
// Derive cursor position
int cursor = text.length();
IContextInformation contextInfo = new ContextInformation(null, text);
// Construct proposal
CompletionProposal proposal = new CompletionProposal(text, documentOffset
- qlen, qlen, cursor, null, text, contextInfo, text
+ "-Event declared in contract");
// and add to result list
propList.add(proposal);
}
}
for (IVariable var : model.getContract().getMonitoredVariables())
{
String text = var.getName();
if (qualifier.proposal.toString().trim().length() == 0
|| text.startsWith(qualifier.proposal.toString()))
{
// Derive cursor position
int cursor = text.length();
IContextInformation contextInfo = new ContextInformation(null, text);
// Construct proposal
CompletionProposal proposal = new CompletionProposal(text, documentOffset
- qlen, qlen, cursor, null, text, contextInfo, text
+ "-Monitored variable declared in contract. "
+ var.getDataType());
// and add to result list
propList.add(proposal);
}
}
for (IVariable var : model.getContract().getControlledVariables())
{
String text = var.getName();
if (qualifier.proposal.toString().trim().length() == 0
|| text.startsWith(qualifier.proposal.toString()))
{
// Derive cursor position
int cursor = text.length();
IContextInformation contextInfo = new ContextInformation(null, text);
// Construct proposal
CompletionProposal proposal = new CompletionProposal(text, documentOffset
- qlen, qlen, cursor, null, text, contextInfo, text
+ "-Monitored variable declared in contract. "
+ var.getDataType());
// and add to result list
propList.add(proposal);
}
}
}
}
if (qualifier.postEqual && !qualifier.dot)
{
for (String text : vdmMetadata.keySet())
{
if (qualifier.proposal.toString().trim().length() == 0
|| text.startsWith(qualifier.proposal.toString()))
{
int cursor = text.length();
IContextInformation contextInfo = new ContextInformation(null, text);
// Construct proposal
CompletionProposal proposal = new CompletionProposal(text, documentOffset
- qlen, qlen, cursor, null, text, contextInfo, text
+ "-instance variable in System");
// and add to result list