use of cbit.vcell.client.desktop.VCDocumentDecorator in project vcell by virtualcell.
the class IssueManager method updateIssues0.
/**
* @param immediate update now, skip check of {@link #LAST_DIRTY_MILLISECONDS}
*/
private void updateIssues0(boolean immediate) {
if (vcDocument == null) {
return;
}
if (!immediate) {
if (dirtyTimestamp == 0) {
return;
}
long elapsedTime = System.currentTimeMillis() - dirtyTimestamp;
if (elapsedTime < LAST_DIRTY_MILLISECONDS) {
return;
}
}
try {
VCDocumentDecorator decorator = VCDocumentDecorator.getDecorator(vcDocument);
numErrors = 0;
numWarnings = 0;
ArrayList<Issue> oldIssueList = new ArrayList<Issue>(issueList);
ArrayList<Issue> tempIssueList = new ArrayList<Issue>();
IssueContext issueContext = new ManagerContext();
decorator.gatherIssues(issueContext, tempIssueList);
// vcDocument.gatherIssues(issueContext,tempIssueList);
issueList = new ArrayList<Issue>();
for (Issue issue : tempIssueList) {
if (issue instanceof SimpleBoundsIssue) {
continue;
}
issueList.add(issue);
Severity severity = issue.getSeverity();
if (severity == Issue.Severity.ERROR) {
numErrors++;
} else if (severity == Issue.Severity.WARNING) {
numWarnings++;
}
}
fireIssueEventListener(new IssueEvent(vcDocument, oldIssueList, issueList));
// System.out.println("\n................... update performed .................." + System.currentTimeMillis());
} finally {
dirtyTimestamp = 0;
if (bMoreTime) {
setDirty();
bMoreTime = false;
}
}
}
Aggregations