summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
92b414c)
Check monitor cancel status more often in ModelUpdate.
gitlab #35
Change-Id: I90ecfac649c6cea45ce95d9a32a3ee8774d79291
showWarning(result2.second);
comparator2.test(getSession(), monitor);
changes2 = comparator2.getChanges();
showWarning(result2.second);
comparator2.test(getSession(), monitor);
changes2 = comparator2.getChanges();
- if (monitor.isCanceled())
+ if (monitor.isCanceled()) {
+ dispose();
changes2 = getSession().syncRequest(createFilterRead(changes2, filters));
Pair<UpdateTree, UpdateList> chg2 = createChangeObjects(changes2, null);
updateTree2 = chg2.first;
changes2 = getSession().syncRequest(createFilterRead(changes2, filters));
Pair<UpdateTree, UpdateList> chg2 = createChangeObjects(changes2, null);
updateTree2 = chg2.first;
changes3 = comparator3.getChanges();
changes3 = getSession().syncRequest(createFilterRead(changes3, filters));
}
changes3 = comparator3.getChanges();
changes3 = getSession().syncRequest(createFilterRead(changes3, filters));
}
- if (monitor.isCanceled())
+ if (monitor.isCanceled()) {
+ dispose();
Pair<GraphComparator,String> result = getChanges(oldModel,newModel);
GraphComparator comparator = result.first;
Pair<GraphComparator,String> result = getChanges(oldModel,newModel);
GraphComparator comparator = result.first;
- if (monitor.isCanceled())
+ if (monitor.isCanceled()) {
+ dispose();
comparator.test(getSession(), monitor);
monitor.setTaskName("Processing changes...");
monitor.subTask("");
changes = comparator.getChanges();
changes = getSession().syncRequest(createFilterRead(changes, filters));
Pair<UpdateTree, UpdateList> chg = createChangeObjects(changes, monitor);
comparator.test(getSession(), monitor);
monitor.setTaskName("Processing changes...");
monitor.subTask("");
changes = comparator.getChanges();
changes = getSession().syncRequest(createFilterRead(changes, filters));
Pair<UpdateTree, UpdateList> chg = createChangeObjects(changes, monitor);
+ if (chg == null) {
+ dispose();
+ return;
+ }
updateTree = chg.first;
updateList = chg.second;
if (userFilters.size() != 0) {
updateTree = chg.first;
updateList = chg.second;
if (userFilters.size() != 0) {
protected abstract Pair<GraphComparator,String> getChanges(Resource r1, Resource r2) throws DatabaseException;
protected Pair<UpdateTree, UpdateList> createChangeObjects(GraphChanges changes, IProgressMonitor monitor) throws DatabaseException{
protected abstract Pair<GraphComparator,String> getChanges(Resource r1, Resource r2) throws DatabaseException;
protected Pair<UpdateTree, UpdateList> createChangeObjects(GraphChanges changes, IProgressMonitor monitor) throws DatabaseException{
+ if (monitor != null) {
+ if (monitor.isCanceled())
+ return null;
monitor.subTask("Processing structural changes");
monitor.subTask("Processing structural changes");
UpdateTree updateTree = getUpdateTree(changes);
UpdateTree updateTree = getUpdateTree(changes);
+ if (monitor != null) {
+ if (monitor.isCanceled())
+ return null;
monitor.subTask("Processing property changes");
monitor.subTask("Processing property changes");
UpdateList updateList = getUpdateList(changes);
UpdateList updateList = getUpdateList(changes);
+ if (monitor != null) {
+ if (monitor.isCanceled())
+ return null;
monitor.subTask("Postprocessing changes");
monitor.subTask("Postprocessing changes");
postProcess(updateTree, updateList);
return new Pair<UpdateTree, UpdateList>(updateTree, updateList);
}
postProcess(updateTree, updateList);
return new Pair<UpdateTree, UpdateList>(updateTree, updateList);
}
}
public UpdateList getUpdateList3() throws DatabaseException {
if (updateList3 == null && changes3 != null) {
}
public UpdateList getUpdateList3() throws DatabaseException {
if (updateList3 == null && changes3 != null) {
- Pair<UpdateTree, UpdateList> chg3 = createChangeObjects(changes3, null);
- updateTree3 = chg3.first;
- updateList3 = chg3.second;
+ Pair<UpdateTree, UpdateList> chg3 = createChangeObjects(changes3, null);
+ updateTree3 = chg3.first;
+ updateList3 = chg3.second;
updateTree2 = null;
updateTree3 = null;
updateNode3 = null;
updateTree2 = null;
updateTree3 = null;
updateNode3 = null;