mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix for bug#57804 : refactoring.
This commit is contained in:
parent
15cee9ff6a
commit
0d7e3bcbf0
3 changed files with 26 additions and 13 deletions
|
@ -1,3 +1,6 @@
|
|||
2004-04-13 Hoda Amer
|
||||
Fix for bug#57804: [Refactoring] Constructor and Destructor are not refactored when class is defined inside a namespace
|
||||
|
||||
2004-04-13 Hoda Amer
|
||||
From Chris Wiebe
|
||||
This patch makes sure the class wizard works as long as the selection
|
||||
|
|
|
@ -406,9 +406,9 @@ public class RenameElementProcessor extends RenameProcessor implements IReferenc
|
|||
ICSearchConstants.TYPE, ICSearchConstants.REFERENCES, false ));
|
||||
IStructure structure = (IStructure) fCElement;
|
||||
if(structure.getElementType() == ICElement.C_CLASS){
|
||||
orPattern.addPattern(SearchEngine.createSearchPattern( searchPrefix,
|
||||
orPattern.addPattern(SearchEngine.createSearchPattern( searchPrefix + "::" + structure.getElementName(), //$NON-NLS-1$
|
||||
ICSearchConstants.METHOD, ICSearchConstants.ALL_OCCURRENCES, false ));
|
||||
orPattern.addPattern(SearchEngine.createSearchPattern( "~"+ searchPrefix, //$NON-NLS-1$
|
||||
orPattern.addPattern(SearchEngine.createSearchPattern( searchPrefix + "::~" + structure.getElementName(), //$NON-NLS-1$
|
||||
ICSearchConstants.METHOD, ICSearchConstants.ALL_OCCURRENCES, false ));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -253,12 +253,15 @@ public class CElementContentProvider extends BaseCElementContentProvider impleme
|
|||
// 1GF87WR: ITPUI:ALL - SWTEx + NPE closing a workbench window.
|
||||
Control ctrl= fViewer.getControl();
|
||||
if (ctrl != null && !ctrl.isDisposed()){
|
||||
fViewer.refresh(element);
|
||||
if(element instanceof IWorkingCopy){
|
||||
if(fViewer.testFindItem(element) != null){
|
||||
fViewer.refresh(element);
|
||||
}else {
|
||||
fViewer.refresh(((IWorkingCopy)element).getOriginalElement());
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
fViewer.refresh(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -271,11 +274,15 @@ public class CElementContentProvider extends BaseCElementContentProvider impleme
|
|||
// 1GF87WR: ITPUI:ALL - SWTEx + NPE closing a workbench window.
|
||||
Control ctrl= fViewer.getControl();
|
||||
if (ctrl != null && !ctrl.isDisposed()){
|
||||
fViewer.refresh(parent);
|
||||
if(parent instanceof IWorkingCopy){
|
||||
if(fViewer.testFindItem(parent) != null){
|
||||
fViewer.refresh(parent);
|
||||
}else {
|
||||
fViewer.refresh(((IWorkingCopy)parent).getOriginalElement());
|
||||
}
|
||||
|
||||
}else {
|
||||
fViewer.refresh(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -289,13 +296,16 @@ public class CElementContentProvider extends BaseCElementContentProvider impleme
|
|||
Control ctrl= fViewer.getControl();
|
||||
if (ctrl != null && !ctrl.isDisposed()) {
|
||||
Object parent = internalGetParent(element);
|
||||
fViewer.refresh(parent);
|
||||
if(parent instanceof IWorkingCopy){
|
||||
if(fViewer.testFindItem(parent) != null){
|
||||
fViewer.refresh(parent);
|
||||
}else {
|
||||
fViewer.refresh(((IWorkingCopy)parent).getOriginalElement());
|
||||
}
|
||||
|
||||
}else {
|
||||
fViewer.refresh(parent);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue