mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
5c8b7da9f4
commit
085f428acb
1 changed files with 28 additions and 24 deletions
|
@ -11,7 +11,6 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.model;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -110,9 +109,11 @@ public class CModel extends Openable implements ICModel {
|
|||
public void copy(ICElement[] elements, ICElement[] containers, ICElement[] siblings,
|
||||
String[] renamings, boolean replace, IProgressMonitor monitor) throws CModelException {
|
||||
if (elements != null && elements[0] != null && elements[0].getElementType() <= ICElement.C_UNIT ) {
|
||||
runOperation(new CopyResourceElementsOperation(elements, containers, replace), elements, siblings, renamings, monitor);
|
||||
runOperation(new CopyResourceElementsOperation(elements, containers, replace), elements,
|
||||
siblings, renamings, monitor);
|
||||
} else {
|
||||
runOperation(new CopyElementsOperation(elements, containers, replace), elements, siblings, renamings, monitor);
|
||||
runOperation(new CopyElementsOperation(elements, containers, replace), elements, siblings,
|
||||
renamings, monitor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -130,9 +131,11 @@ public class CModel extends Openable implements ICModel {
|
|||
public void move(ICElement[] elements, ICElement[] containers, ICElement[] siblings,
|
||||
String[] renamings, boolean replace, IProgressMonitor monitor) throws CModelException {
|
||||
if (elements != null && elements[0] != null && elements[0].getElementType() <= ICElement.C_UNIT) {
|
||||
runOperation(new MoveResourceElementsOperation(elements, containers, replace), elements, siblings, renamings, monitor);
|
||||
runOperation(new MoveResourceElementsOperation(elements, containers, replace), elements,
|
||||
siblings, renamings, monitor);
|
||||
} else {
|
||||
runOperation(new MoveElementsOperation(elements, containers, replace), elements, siblings, renamings, monitor);
|
||||
runOperation(new MoveElementsOperation(elements, containers, replace), elements, siblings,
|
||||
renamings, monitor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -150,7 +153,8 @@ public class CModel extends Openable implements ICModel {
|
|||
/**
|
||||
* Configures and runs the <code>MultiOperation</code>.
|
||||
*/
|
||||
protected void runOperation(MultiOperation op, ICElement[] elements, ICElement[] siblings, String[] renamings, IProgressMonitor monitor) throws CModelException {
|
||||
protected void runOperation(MultiOperation op, ICElement[] elements, ICElement[] siblings,
|
||||
String[] renamings, IProgressMonitor monitor) throws CModelException {
|
||||
op.setRenamings(renamings);
|
||||
if (siblings != null) {
|
||||
for (int i = 0; i < elements.length; i++) {
|
||||
|
@ -184,10 +188,11 @@ public class CModel extends Openable implements ICModel {
|
|||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.Openable#buildStructure(org.eclipse.cdt.internal.core.model.OpenableInfo, org.eclipse.core.runtime.IProgressMonitor, java.util.Map, org.eclipse.core.resources.IResource)
|
||||
* @see Openable#buildStructure(OpenableInfo, IProgressMonitor, Map, IResource)
|
||||
*/
|
||||
@Override
|
||||
protected boolean buildStructure(OpenableInfo info, IProgressMonitor pm, Map<ICElement, CElementInfo> newElements, IResource underlyingResource) throws CModelException {
|
||||
protected boolean buildStructure(OpenableInfo info, IProgressMonitor pm, Map<ICElement,
|
||||
CElementInfo> newElements, IResource underlyingResource) throws CModelException {
|
||||
boolean validInfo = false;
|
||||
try {
|
||||
IResource res = getResource();
|
||||
|
@ -247,5 +252,4 @@ public class CModel extends Openable implements ICModel {
|
|||
Assert.isTrue(false, "Should not be called"); //$NON-NLS-1$
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue