mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Bug 133881 - Make refreshing after building optional
Work in progress.
This commit is contained in:
parent
ff9885b6e4
commit
60e7c6cda0
1 changed files with 26 additions and 11 deletions
|
@ -299,7 +299,7 @@ public class RefreshPolicyTab extends AbstractCPropertyTab {
|
||||||
parent.exclusion.removeExclusionInstance(instance);
|
parent.exclusion.removeExclusionInstance(instance);
|
||||||
parent.exclusion_instances.remove(this);
|
parent.exclusion_instances.remove(this);
|
||||||
|
|
||||||
if (parent.exclusion_instances.size() < 1 && parent.exceptions_node == null) {
|
if (parent.exclusion_instances.size() < 1) {
|
||||||
parent.remove();
|
parent.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -406,6 +406,7 @@ public class RefreshPolicyTab extends AbstractCPropertyTab {
|
||||||
});
|
});
|
||||||
|
|
||||||
fTree.setInput(fSrc);
|
fTree.setInput(fSrc);
|
||||||
|
fTree.expandAll();
|
||||||
updateButtons();
|
updateButtons();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -492,6 +493,7 @@ public class RefreshPolicyTab extends AbstractCPropertyTab {
|
||||||
fSrc.add(newResource);
|
fSrc.add(newResource);
|
||||||
}
|
}
|
||||||
fTree.refresh();
|
fTree.refresh();
|
||||||
|
fTree.expandAll();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -507,12 +509,14 @@ public class RefreshPolicyTab extends AbstractCPropertyTab {
|
||||||
}
|
}
|
||||||
if (addExceptionDialog.open() == Window.OK) {
|
if (addExceptionDialog.open() == Window.OK) {
|
||||||
RefreshExclusion newExclusion = addExceptionDialog.getResult();
|
RefreshExclusion newExclusion = addExceptionDialog.getResult();
|
||||||
|
if (newExclusion != null)
|
||||||
//update tree & the working copy of the model elements in this tab
|
//update tree & the working copy of the model elements in this tab
|
||||||
sel.addException(newExclusion);
|
sel.addException(newExclusion);
|
||||||
fTree.refresh();
|
fTree.refresh();
|
||||||
|
fTree.expandAll();
|
||||||
}
|
}
|
||||||
fTree.refresh();
|
fTree.refresh();
|
||||||
|
fTree.expandAll();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDX_EDIT: //can only edit a refresh exclusion
|
case IDX_EDIT: //can only edit a refresh exclusion
|
||||||
|
@ -528,8 +532,10 @@ public class RefreshPolicyTab extends AbstractCPropertyTab {
|
||||||
//update tree
|
//update tree
|
||||||
selectedExclusion.updateException(updatedExclusion);
|
selectedExclusion.updateException(updatedExclusion);
|
||||||
fTree.refresh();
|
fTree.refresh();
|
||||||
|
fTree.expandAll();
|
||||||
}
|
}
|
||||||
fTree.refresh();
|
fTree.refresh();
|
||||||
|
fTree.expandAll();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDX_DELETE:
|
case IDX_DELETE:
|
||||||
|
@ -544,7 +550,6 @@ public class RefreshPolicyTab extends AbstractCPropertyTab {
|
||||||
question = Messages.RefreshPolicyTab_deleteConfirmationDialog_question_exception;
|
question = Messages.RefreshPolicyTab_deleteConfirmationDialog_question_exception;
|
||||||
} else {
|
} else {
|
||||||
question = Messages.RefreshPolicyTab_deleteConfirmationDialog_question_resource;
|
question = Messages.RefreshPolicyTab_deleteConfirmationDialog_question_resource;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (MessageDialog.openQuestion(shell, Messages.RefreshPolicyTab_deleteConfirmationDialog_title, question)) {
|
if (MessageDialog.openQuestion(shell, Messages.RefreshPolicyTab_deleteConfirmationDialog_title, question)) {
|
||||||
remove = true;
|
remove = true;
|
||||||
|
@ -556,15 +561,25 @@ public class RefreshPolicyTab extends AbstractCPropertyTab {
|
||||||
//update tree & the working copy of the model elements in this tab
|
//update tree & the working copy of the model elements in this tab
|
||||||
sel1.remove();
|
sel1.remove();
|
||||||
fTree.refresh();
|
fTree.refresh();
|
||||||
|
fTree.expandAll();
|
||||||
}
|
}
|
||||||
} else { //exclusion instance
|
} else { //exclusion instance
|
||||||
_Exclusion_Instance sel1 = (_Exclusion_Instance) selection.getFirstElement();
|
_Exclusion_Instance sel1 = (_Exclusion_Instance) selection.getFirstElement();
|
||||||
|
boolean remove = false;
|
||||||
//update tree & the working copy of the model elements in this tab
|
if (sel1.parent.exclusion_instances.size() == 1 && sel1.parent.exceptions_node != null) {
|
||||||
sel1.remove();
|
//this is the only exclusion instance for an exclusion and the exclusion has nested exclusions
|
||||||
fTree.refresh();
|
if (MessageDialog.openQuestion(shell, Messages.RefreshPolicyTab_deleteConfirmationDialog_title, Messages.RefreshPolicyTab_deleteConfirmationDialog_question_exception)) {
|
||||||
|
remove = true;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
remove = true;
|
||||||
|
if (remove) {
|
||||||
|
//update tree & the working copy of the model elements in this tab
|
||||||
|
sel1.remove();
|
||||||
|
fTree.refresh();
|
||||||
|
fTree.expandAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Reference in a new issue