mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
31a39c55c8
commit
ad3552fcce
2 changed files with 5 additions and 10 deletions
|
@ -10,8 +10,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.core.model;
|
package org.eclipse.cdt.core.model;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||||
import org.eclipse.core.resources.IMarker;
|
import org.eclipse.core.resources.IMarker;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
|
@ -67,6 +65,7 @@ public interface IWorkingCopy extends ITranslationUnit{
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
void commit(boolean force, IProgressMonitor monitor) throws CModelException;
|
void commit(boolean force, IProgressMonitor monitor) throws CModelException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroys this working copy, closing its buffer and discarding
|
* Destroys this working copy, closing its buffer and discarding
|
||||||
* its structure. Subsequent attempts to access non-handle information
|
* its structure. Subsequent attempts to access non-handle information
|
||||||
|
|
|
@ -195,7 +195,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
element = element.getParent();
|
element = element.getParent();
|
||||||
}
|
}
|
||||||
ICElement current = tu;
|
ICElement current = tu;
|
||||||
for (int i = children.size()-1; i >= 0; i--) {
|
for (int i = children.size(); --i >= 0;) {
|
||||||
ICElement child = children.get(i);
|
ICElement child = children.get(i);
|
||||||
if (current instanceof IParent) {
|
if (current instanceof IParent) {
|
||||||
try {
|
try {
|
||||||
|
@ -218,7 +218,6 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IWorkingCopy#getOriginalElement()
|
* @see org.eclipse.cdt.core.model.IWorkingCopy#getOriginalElement()
|
||||||
*/
|
*/
|
||||||
|
@ -237,6 +236,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
public IWorkingCopy getSharedWorkingCopy(IProgressMonitor monitor, IProblemRequestor requestor) {
|
public IWorkingCopy getSharedWorkingCopy(IProgressMonitor monitor, IProblemRequestor requestor) {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.ITranslationUnit#getWorkingCopy()
|
* @see org.eclipse.cdt.core.model.ITranslationUnit#getWorkingCopy()
|
||||||
*/
|
*/
|
||||||
|
@ -306,7 +306,6 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected IBuffer openBuffer(IProgressMonitor pm) throws CModelException {
|
protected IBuffer openBuffer(IProgressMonitor pm) throws CModelException {
|
||||||
|
|
||||||
if (this.useCount == 0) throw newNotPresentException();
|
if (this.useCount == 0) throw newNotPresentException();
|
||||||
|
|
||||||
// create buffer - working copies may use custom buffer factory
|
// create buffer - working copies may use custom buffer factory
|
||||||
|
@ -346,7 +345,6 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IWorkingCopy#reconcile()
|
* @see org.eclipse.cdt.core.model.IWorkingCopy#reconcile()
|
||||||
*/
|
*/
|
||||||
|
@ -407,12 +405,10 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
*/
|
*/
|
||||||
public IASTTranslationUnit reconcile(boolean computeAST, boolean forceProblemDetection, IProgressMonitor monitor)
|
public IASTTranslationUnit reconcile(boolean computeAST, boolean forceProblemDetection, IProgressMonitor monitor)
|
||||||
throws CModelException {
|
throws CModelException {
|
||||||
|
|
||||||
if (this.useCount == 0) throw newNotPresentException(); // was destroyed
|
if (this.useCount == 0) throw newNotPresentException(); // was destroyed
|
||||||
|
|
||||||
ReconcileWorkingCopyOperation op = new ReconcileWorkingCopyOperation(this, computeAST, forceProblemDetection);
|
ReconcileWorkingCopyOperation op = new ReconcileWorkingCopyOperation(this, computeAST, forceProblemDetection);
|
||||||
op.runOperation(monitor);
|
op.runOperation(monitor);
|
||||||
return op.fAST;
|
return op.fAST;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue