mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
2005-01-19 Alain Magloire
PR 83151 * src/org/eclipse/cdt/ui/CElementContentProvider.java
This commit is contained in:
parent
f2d65ec383
commit
a53757cca0
2 changed files with 23 additions and 12 deletions
|
@ -1,3 +1,7 @@
|
|||
2005-01-19 Alain Magloire
|
||||
PR 83151
|
||||
* src/org/eclipse/cdt/ui/CElementContentProvider.java
|
||||
|
||||
2005-01-11 David Inglis
|
||||
Further fix to 36837
|
||||
|
||||
|
|
|
@ -175,9 +175,14 @@ public class CElementContentProvider extends BaseCElementContentProvider impleme
|
|||
}
|
||||
|
||||
if (kind == ICElementDelta.CHANGED) {
|
||||
if (element instanceof ITranslationUnit || element instanceof IBinary || element instanceof IArchive) {
|
||||
// Binary/Archive changes is done differently since they
|
||||
// are at two places, they are in the {Binary,Archive}Container
|
||||
// and in the Tree hiearchy
|
||||
if (updateContainer(element)) {
|
||||
Object parent = getParent(element);
|
||||
postRefresh(parent);
|
||||
} else if (element instanceof ITranslationUnit) {
|
||||
postRefresh(element);
|
||||
return;
|
||||
} else if (element instanceof ArchiveContainer || element instanceof BinaryContainer) {
|
||||
postContainerRefresh((IParent) element, element.getCProject());
|
||||
}
|
||||
|
@ -280,12 +285,14 @@ public class CElementContentProvider extends BaseCElementContentProvider impleme
|
|||
// 1GF87WR: ITPUI:ALL - SWTEx + NPE closing a workbench window.
|
||||
Control ctrl= fViewer.getControl();
|
||||
if (ctrl != null && !ctrl.isDisposed()){
|
||||
if(element instanceof IWorkingCopy){
|
||||
if(fViewer.testFindItem(element) != null){
|
||||
if (element instanceof IWorkingCopy){
|
||||
if (fViewer.testFindItem(element) != null){
|
||||
fViewer.refresh(element);
|
||||
}else {
|
||||
} else {
|
||||
fViewer.refresh(((IWorkingCopy)element).getOriginalElement());
|
||||
}
|
||||
} else if (element instanceof IBinary) {
|
||||
fViewer.refresh(element, true);
|
||||
} else {
|
||||
fViewer.refresh(element);
|
||||
}
|
||||
|
@ -302,12 +309,12 @@ public class CElementContentProvider extends BaseCElementContentProvider impleme
|
|||
Control ctrl= fViewer.getControl();
|
||||
if (ctrl != null && !ctrl.isDisposed()){
|
||||
if(parent instanceof IWorkingCopy){
|
||||
if(fViewer.testFindItem(parent) != null){
|
||||
if (fViewer.testFindItem(parent) != null){
|
||||
fViewer.refresh(parent);
|
||||
}else {
|
||||
} else {
|
||||
fViewer.refresh(((IWorkingCopy)parent).getOriginalElement());
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
fViewer.refresh(parent);
|
||||
}
|
||||
}
|
||||
|
@ -323,13 +330,13 @@ public class CElementContentProvider extends BaseCElementContentProvider impleme
|
|||
Control ctrl= fViewer.getControl();
|
||||
if (ctrl != null && !ctrl.isDisposed()) {
|
||||
Object parent = internalGetParent(element);
|
||||
if(parent instanceof IWorkingCopy){
|
||||
if(fViewer.testFindItem(parent) != null){
|
||||
if (parent instanceof IWorkingCopy){
|
||||
if (fViewer.testFindItem(parent) != null){
|
||||
fViewer.refresh(parent);
|
||||
}else {
|
||||
} else {
|
||||
fViewer.refresh(((IWorkingCopy)parent).getOriginalElement());
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
fViewer.refresh(parent);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue