mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix for bug#44507
This commit is contained in:
parent
de85b5fbaa
commit
7cfb47c220
5 changed files with 24 additions and 11 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-10-20 Hoda Amer
|
||||
Fixed bug#44507 outline flickers with CDT1.2 RC0
|
||||
Returned a boolean from IWorkingCopy.reconcile() indicating
|
||||
if there was a real change.
|
||||
|
||||
2003-10-20 David Inglis
|
||||
fixed junit breakage - testGetSoname()
|
||||
* utils/org/eclipse/cdt/utils/elf/parser/BinaryShared.java
|
||||
|
|
|
@ -118,7 +118,7 @@ public interface IWorkingCopy extends ITranslationUnit{
|
|||
* The boolean argument allows to force problem detection even if the
|
||||
* working copy is already consistent.
|
||||
*/
|
||||
void reconcile(boolean forceProblemDetection, IProgressMonitor monitor) throws CModelException;
|
||||
boolean reconcile(boolean forceProblemDetection, IProgressMonitor monitor) throws CModelException;
|
||||
/**
|
||||
* Restores the contents of this working copy to the current contents of
|
||||
* this working copy's original element. Has no effect if this element
|
||||
|
|
|
@ -291,13 +291,15 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
|||
/**
|
||||
* @see org.eclipse.cdt.internal.core.model.IWorkingCopy#reconcile(boolean, org.eclipse.core.runtime.IProgressMonitor)
|
||||
*/
|
||||
public void reconcile(boolean forceProblemDetection, IProgressMonitor monitor)
|
||||
public boolean reconcile(boolean forceProblemDetection, IProgressMonitor monitor)
|
||||
throws CModelException {
|
||||
|
||||
boolean somethingChanged = false;
|
||||
|
||||
if (this.useCount == 0) throw newNotPresentException(); //was destroyed
|
||||
|
||||
if (monitor != null){
|
||||
if (monitor.isCanceled()) return;
|
||||
if (monitor.isCanceled()) return somethingChanged;
|
||||
monitor.beginTask("element.reconciling", 10); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
@ -312,14 +314,14 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
|||
// update the element infos with the content of the working copy
|
||||
this.makeConsistent(monitor);
|
||||
deltaBuilder.buildDeltas();
|
||||
|
||||
somethingChanged = true;
|
||||
}
|
||||
|
||||
if (monitor != null) monitor.worked(2);
|
||||
|
||||
// force problem detection? - if structure was consistent
|
||||
if (forceProblemDetection && wasConsistent){
|
||||
if (monitor != null && monitor.isCanceled()) return;
|
||||
if (monitor != null && monitor.isCanceled()) return somethingChanged;
|
||||
|
||||
//IProblemRequestor problemRequestor = this.getProblemRequestor();
|
||||
//if (problemRequestor != null && problemRequestor.isActive()){
|
||||
|
@ -338,7 +340,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
|||
} finally {
|
||||
if (monitor != null) monitor.done();
|
||||
}
|
||||
|
||||
return somethingChanged;
|
||||
}
|
||||
/**
|
||||
* @see org.eclipse.cdt.internal.core.model.IWorkingCopy#restore()
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2003-10-20 Hoda Amer
|
||||
Fixed bug#44507 outline flickers with CDT1.2 RC0
|
||||
In CReconcilingStrategy, the outliner is asked to redraw only
|
||||
if there was a real change.
|
||||
|
||||
2003-10-18 Alain Magloire
|
||||
|
||||
New Binary Parser tab page for Cygwin PE Parser.
|
||||
|
|
|
@ -64,22 +64,23 @@ public class CReconcilingStrategy implements IReconcilingStrategy {
|
|||
* @see IReconcilingStrategy#reconcile(dirtyRegion, region)
|
||||
*/
|
||||
public void reconcile(DirtyRegion dirtyRegion, IRegion region) {
|
||||
// FIXME: This seems to generate to much flashing in
|
||||
// the contentouline viewer.
|
||||
//reconcile();
|
||||
reconcile();
|
||||
}
|
||||
|
||||
private void reconcile() {
|
||||
boolean doUpdate = false;
|
||||
try {
|
||||
ITranslationUnit tu = fManager.getWorkingCopy(fEditor.getEditorInput());
|
||||
if (tu != null && tu.isWorkingCopy()) {
|
||||
IWorkingCopy workingCopy = (IWorkingCopy)tu;
|
||||
// reconcile
|
||||
synchronized (workingCopy) {
|
||||
workingCopy.reconcile(true, fProgressMonitor);
|
||||
doUpdate = workingCopy.reconcile(true, fProgressMonitor);
|
||||
}
|
||||
}
|
||||
fOutliner.contentUpdated();
|
||||
if(doUpdate){
|
||||
fOutliner.contentUpdated();
|
||||
}
|
||||
} catch(CModelException e) {
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue