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;
|
||||
|
||||
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.core.resources.IMarker;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
|
@ -49,7 +47,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
|||
* @noextend This interface is not intended to be extended by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IWorkingCopy extends ITranslationUnit{
|
||||
public interface IWorkingCopy extends ITranslationUnit {
|
||||
/**
|
||||
* Commits the contents of this working copy to its original element
|
||||
* and underlying resource, bringing the C model up-to-date with the current
|
||||
|
@ -67,6 +65,7 @@ public interface IWorkingCopy extends ITranslationUnit{
|
|||
* </ul>
|
||||
*/
|
||||
void commit(boolean force, IProgressMonitor monitor) throws CModelException;
|
||||
|
||||
/**
|
||||
* Destroys this working copy, closing its buffer and discarding
|
||||
* its structure. Subsequent attempts to access non-handle information
|
||||
|
|
|
@ -195,7 +195,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
|||
element = element.getParent();
|
||||
}
|
||||
ICElement current = tu;
|
||||
for (int i = children.size()-1; i >= 0; i--) {
|
||||
for (int i = children.size(); --i >= 0;) {
|
||||
ICElement child = children.get(i);
|
||||
if (current instanceof IParent) {
|
||||
try {
|
||||
|
@ -218,7 +218,6 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
|||
return current;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @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) {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.cdt.core.model.ITranslationUnit#getWorkingCopy()
|
||||
*/
|
||||
|
@ -306,7 +306,6 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
|||
*/
|
||||
@Override
|
||||
protected IBuffer openBuffer(IProgressMonitor pm) throws CModelException {
|
||||
|
||||
if (this.useCount == 0) throw newNotPresentException();
|
||||
|
||||
// create buffer - working copies may use custom buffer factory
|
||||
|
@ -346,7 +345,6 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
|||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @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)
|
||||
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);
|
||||
op.runOperation(monitor);
|
||||
return op.fAST;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue