diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/NodeCommentMapTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/NodeCommentMapTest.java index 443417fb10a..1121f531929 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/NodeCommentMapTest.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/NodeCommentMapTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik + * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -142,8 +142,13 @@ public class NodeCommentMapTest extends TestCase { } //not used public boolean isBlockComment() {return false;} + public IASTNode copy() { return null; } + + public IASTNode copy(CopyStyle style) { + return null; + } } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTASMDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTASMDeclaration.java index 5faeb05d53d..dc8c67af5ab 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTASMDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTASMDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -36,4 +36,9 @@ public interface IASTASMDeclaration extends IASTDeclaration { * @since 5.1 */ public IASTASMDeclaration copy(); + + /** + * @since 5.3 + */ + public IASTASMDeclaration copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTArrayDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTArrayDeclarator.java index 59359260964..8ac4dce295b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTArrayDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTArrayDeclarator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -45,4 +45,9 @@ public interface IASTArrayDeclarator extends IASTDeclarator { */ public IASTArrayDeclarator copy(); + /** + * @since 5.3 + */ + public IASTArrayDeclarator copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTArrayModifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTArrayModifier.java index afb8c43b540..2ac8cc82e6a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTArrayModifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTArrayModifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -50,4 +50,9 @@ public interface IASTArrayModifier extends IASTNode { * @since 5.1 */ public IASTArrayModifier copy(); + + /** + * @since 5.3 + */ + public IASTArrayModifier copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTArraySubscriptExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTArraySubscriptExpression.java index a5fe17ff3f2..8a9043ed081 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTArraySubscriptExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTArraySubscriptExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -29,6 +29,11 @@ public interface IASTArraySubscriptExpression extends IASTExpression { */ IASTArraySubscriptExpression copy(); + /** + * @since 5.3 + */ + IASTArraySubscriptExpression copy(CopyStyle style); + /** * Get the expression that represents the array * diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTBinaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTBinaryExpression.java index 8e30888c24a..7bf1a5595e1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTBinaryExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTBinaryExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -272,4 +272,9 @@ public interface IASTBinaryExpression extends IASTExpression { * @since 5.1 */ public IASTBinaryExpression copy(); + + /** + * @since 5.3 + */ + public IASTBinaryExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTBreakStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTBreakStatement.java index e227605285f..1dc73d44d02 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTBreakStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTBreakStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -22,4 +22,9 @@ public interface IASTBreakStatement extends IASTStatement { * @since 5.1 */ public IASTBreakStatement copy(); + + /** + * @since 5.3 + */ + public IASTBreakStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCaseStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCaseStatement.java index 67261b1898f..52eb6c38d98 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCaseStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCaseStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -45,4 +45,9 @@ public interface IASTCaseStatement extends IASTStatement { * @since 5.1 */ public IASTCaseStatement copy(); + + /** + * @since 5.3 + */ + public IASTCaseStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCastExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCastExpression.java index 706fbef837f..111d29d2b90 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCastExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCastExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -88,4 +88,9 @@ public interface IASTCastExpression extends IASTExpression { * @since 5.1 */ public IASTCastExpression copy(); + + /** + * @since 5.3 + */ + public IASTCastExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCompoundStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCompoundStatement.java index 264e74dd8b0..b2c555cf3d5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCompoundStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCompoundStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -53,4 +53,9 @@ public interface IASTCompoundStatement extends IASTStatement { * @since 5.1 */ public IASTCompoundStatement copy(); + + /** + * @since 5.3 + */ + public IASTCompoundStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTConditionalExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTConditionalExpression.java index 40ff77997b8..2290a205ffd 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTConditionalExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTConditionalExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -93,4 +93,9 @@ public interface IASTConditionalExpression extends IASTExpression { */ public IASTConditionalExpression copy(); + /** + * @since 5.3 + */ + public IASTConditionalExpression copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTContinueStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTContinueStatement.java index 306e2e9120a..2653f336abf 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTContinueStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTContinueStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -22,4 +22,9 @@ public interface IASTContinueStatement extends IASTStatement { * @since 5.1 */ public IASTContinueStatement copy(); + + /** + * @since 5.3 + */ + public IASTContinueStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCopyLocation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCopyLocation.java new file mode 100644 index 00000000000..99255d5baba --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTCopyLocation.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright (c) 2011 Institute for Software, HSR Hochschule fuer Technik + * Rapperswil, University of applied sciences and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Institute for Software (IFS)- initial API and implementation + ******************************************************************************/ +package org.eclipse.cdt.core.dom.ast; + +/** + * @author Emanuel Graf IFS + * @since 5.3 + * + */ +public interface IASTCopyLocation extends IASTNodeLocation { + + public IASTNode getOriginalNode(); + +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclSpecifier.java index a2cc16c7fe5..74c9d07096e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -54,6 +54,11 @@ public interface IASTDeclSpecifier extends IASTNode { */ public IASTDeclSpecifier copy(); + /** + * @since 5.3 + */ + public IASTDeclSpecifier copy(CopyStyle style); + /** * Not allowed on frozen ast. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclaration.java index dae314e0c66..712c3bcb0dc 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -23,4 +23,9 @@ public interface IASTDeclaration extends IASTNode { * @since 5.1 */ public IASTDeclaration copy(); + + /** + * @since 5.3 + */ + public IASTDeclaration copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclarationStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclarationStatement.java index b5fce3a8e0c..cda8805e846 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclarationStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclarationStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -44,4 +44,9 @@ public interface IASTDeclarationStatement extends IASTStatement { */ public IASTDeclarationStatement copy(); + /** + * @since 5.3 + */ + public IASTDeclarationStatement copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclarator.java index 5c068dd5b3f..c8784a3af30 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDeclarator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -113,4 +113,9 @@ public interface IASTDeclarator extends IASTNode, IASTNameOwner { */ public IASTDeclarator copy(); + /** + * @since 5.3 + */ + public IASTDeclarator copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDefaultStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDefaultStatement.java index 064260f74e6..fbcff0fc4c9 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDefaultStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDefaultStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,4 +25,9 @@ public interface IASTDefaultStatement extends IASTStatement { * @since 5.1 */ public IASTDefaultStatement copy(); + + /** + * @since 5.3 + */ + public IASTDefaultStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDoStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDoStatement.java index 3eece49bb4f..9bd63ca8e51 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDoStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTDoStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -68,4 +68,9 @@ public interface IASTDoStatement extends IASTStatement { */ public IASTDoStatement copy(); + /** + * @since 5.3 + */ + public IASTDoStatement copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTEnumerationSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTEnumerationSpecifier.java index 749e741f572..515e126f2cd 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTEnumerationSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTEnumerationSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -77,6 +77,11 @@ public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwn */ public IASTEnumerator copy(); + /** + * @since 5.3 + */ + public IASTEnumerator copy(CopyStyle style); + } /** @@ -125,4 +130,9 @@ public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwn * @since 5.1 */ public IASTEnumerationSpecifier copy(); + + /** + * @since 5.3 + */ + public IASTEnumerationSpecifier copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTExpression.java index 6dd9b1eeacd..9c38baed2cd 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -74,4 +74,9 @@ public interface IASTExpression extends IASTInitializerClause { * @since 5.1 */ public IASTExpression copy(); + + /** + * @since 5.3 + */ + public IASTExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTExpressionList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTExpressionList.java index 9d318fd1c1f..a015ce755d4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTExpressionList.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTExpressionList.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -45,4 +45,9 @@ public interface IASTExpressionList extends IASTExpression { * @since 5.1 */ public IASTExpressionList copy(); + + /** + * @since 5.3 + */ + public IASTExpressionList copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTExpressionStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTExpressionStatement.java index 8899a5d8d20..f745cc2629b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTExpressionStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTExpressionStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -43,4 +43,9 @@ public interface IASTExpressionStatement extends IASTStatement { * @since 5.1 */ public IASTExpressionStatement copy(); + + /** + * @since 5.3 + */ + public IASTExpressionStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldDeclarator.java index 7a1135f989f..c07b1f612e5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldDeclarator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -46,4 +46,9 @@ public interface IASTFieldDeclarator extends IASTDeclarator { * @since 5.1 */ public IASTFieldDeclarator copy(); + + /** + * @since 5.3 + */ + public IASTFieldDeclarator copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldReference.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldReference.java index 7d2f79abcd6..0f380df8d70 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldReference.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFieldReference.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -85,4 +85,9 @@ public interface IASTFieldReference extends IASTExpression, IASTNameOwner { */ public IASTFieldReference copy(); + /** + * @since 5.3 + */ + public IASTFieldReference copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTForStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTForStatement.java index c94d14c7af5..83dcc637943 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTForStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTForStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -117,4 +117,9 @@ public interface IASTForStatement extends IASTStatement { * @since 5.1 */ public IASTForStatement copy(); + + /** + * @since 5.3 + */ + public IASTForStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionCallExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionCallExpression.java index 46a07d33f85..d6f26ef178d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionCallExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionCallExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -45,6 +45,11 @@ public interface IASTFunctionCallExpression extends IASTExpression { */ public IASTFunctionCallExpression copy(); + /** + * @since 5.3 + */ + public IASTFunctionCallExpression copy(CopyStyle style); + /** * Not allowed on frozen ast. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionDeclarator.java index 30bb9b002e1..8b9a687fd28 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionDeclarator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -23,4 +23,9 @@ public interface IASTFunctionDeclarator extends IASTDeclarator { * @since 5.1 */ public IASTFunctionDeclarator copy(); + + /** + * @since 5.3 + */ + public IASTFunctionDeclarator copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionDefinition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionDefinition.java index bb4db0e8870..99ea2f6955e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionDefinition.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTFunctionDefinition.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -104,4 +104,9 @@ public interface IASTFunctionDefinition extends IASTDeclaration { * @since 5.1 */ public IASTFunctionDefinition copy(); + + /** + * @since 5.3 + */ + public IASTFunctionDefinition copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTGotoStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTGotoStatement.java index ca8cf14d63e..6fb715963a6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTGotoStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTGotoStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -40,4 +40,9 @@ public interface IASTGotoStatement extends IASTStatement, IASTNameOwner { */ public IASTGotoStatement copy(); + /** + * @since 5.3 + */ + public IASTGotoStatement copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIdExpression.java index 4906959afd2..afb6f2e5202 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIdExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIdExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -43,4 +43,9 @@ public interface IASTIdExpression extends IASTExpression, IASTNameOwner { * @since 5.1 */ public IASTIdExpression copy(); + + /** + * @since 5.3 + */ + public IASTIdExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIfStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIfStatement.java index 8f95cd1785d..67906826647 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIfStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIfStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -89,4 +89,9 @@ public interface IASTIfStatement extends IASTStatement { * @since 5.1 */ public IASTIfStatement copy(); + + /** + * @since 5.3 + */ + public IASTIfStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializer.java index 46b2c9aad41..3d394b4f132 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -27,4 +27,9 @@ public interface IASTInitializer extends IASTNode { * @since 5.1 */ public IASTInitializer copy(); + + /** + * @since 5.3 + */ + public IASTInitializer copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerClause.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerClause.java index 37448482778..1199ab83241 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerClause.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerClause.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -19,4 +19,9 @@ package org.eclipse.cdt.core.dom.ast; public interface IASTInitializerClause extends IASTNode { IASTInitializerClause copy(); + + /** + * @since 5.3 + */ + IASTInitializerClause copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerExpression.java index 8e49f3a0071..4dc413bdf9a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -45,4 +45,9 @@ public interface IASTInitializerExpression extends IASTEqualsInitializer { * @since 5.1 */ public IASTInitializerExpression copy(); + + /** + * @since 5.3 + */ + public IASTInitializerExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerList.java index b3a094e441b..a4fdb2b84a3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerList.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTInitializerList.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -51,6 +51,11 @@ public interface IASTInitializerList extends IASTInitializer, IASTInitializerCla */ public IASTInitializerList copy(); + /** + * @since 5.3 + */ + public IASTInitializerList copy(CopyStyle style); + /** * @deprecated Replaced by {@link #getClauses()}. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLabelStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLabelStatement.java index 5889eda27d3..68290dea2b1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLabelStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLabelStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -48,4 +48,9 @@ public interface IASTLabelStatement extends IASTStatement, IASTNameOwner { */ public IASTLabelStatement copy(); + /** + * @since 5.3 + */ + public IASTLabelStatement copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLiteralExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLiteralExpression.java index 3d40d9391d6..bbce9799508 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLiteralExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTLiteralExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -98,7 +98,12 @@ public interface IASTLiteralExpression extends IASTExpression { public IASTLiteralExpression copy(); /** - * @deprecated Replaced by {@link #setValue(char[])}. + * @since 5.3 + */ + public IASTLiteralExpression copy(CopyStyle style); + + /** + * @deprecated Replaced by {@link #setValue(char[])}. */ @Deprecated public void setValue(String value); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTName.java index 03b3a2b7b63..73726cdb10b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTName.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTName.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -103,6 +103,11 @@ public interface IASTName extends IASTNode, IName { */ public IASTName copy(); + /** + * @since 5.3 + */ + public IASTName copy(CopyStyle style); + /** * Set the semantic object for this name to be the given binding * @noreference This method is not intended to be referenced by clients. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTNode.java index d3b096af97d..8862536f4ff 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTNode.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTNode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -21,6 +21,23 @@ import org.eclipse.cdt.core.parser.IToken; * @noextend This interface is not intended to be extended by clients. */ public interface IASTNode { + + /** + * @since 5.3 + */ + public enum CopyStyle { + /** + * Copy without location, this copy is independed of the index an can be shared. + */ + withoutLocations, + /** + * The copied node has a {@link IASTCopyLocation} linking the copy to the origianl node. If the index + * was supplied creating the original AST, the caller has to hold a read lock on it. The returned copy + * is valid only while the read lock is being held and should not be accessed after releasing the + * lock. + */ + withLocations + } public static final IASTNode[] EMPTY_NODE_ARRAY = new IASTNode[0]; @@ -215,8 +232,7 @@ public interface IASTNode { public boolean isActive(); /** - * Returns a mutable copy of the tree rooted at this node. - * The following postconditions hold: + * Returns a mutable copy of the tree rooted at this node. The following postconditions hold: * * * copy.getParent() == null @@ -226,11 +242,35 @@ public interface IASTNode { * * Preprocessor nodes do not currently support being copied. * - * Implicit name nodes are not copied, instead they can be regenerated - * if required. + * Implicit name nodes are not copied, instead they can be regenerated if required. + * + * Calling this method is equivalent * * @since 5.1 - * @throws UnsupportedOperationException if this node or one of its descendants does not support copying + * @throws UnsupportedOperationException + * if this node or one of its descendants does not support copying */ public IASTNode copy(); + + /** + * Returns a mutable copy of the tree rooted at this node. The following postconditions hold: + * + * + * copy.getParent() == null + * copy.getPropertyInParent() == null + * copy.isFrozen() == false + * + * + * Preprocessor nodes do not currently support being copied. + * + * Implicit name nodes are not copied, instead they can be regenerated if required. + * + * @param style + * {@link CopyStyle} create a copy with or without locations. Please see {@link CopyStyle} for + * restrictions on copies with Locations. + * @since 5.3 + * @throws UnsupportedOperationException + * if this node or one of its descendants does not support copying + */ + public IASTNode copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTNullStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTNullStatement.java index 3189401216d..b3e7a8cbccf 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTNullStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTNullStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -22,4 +22,9 @@ public interface IASTNullStatement extends IASTStatement { * @since 5.1 */ public IASTNullStatement copy(); + + /** + * @since 5.3 + */ + public IASTNullStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTParameterDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTParameterDeclaration.java index b687ff8bc41..979c575ab60 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTParameterDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTParameterDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -72,4 +72,9 @@ public interface IASTParameterDeclaration extends IASTNode { * @since 5.1 */ public IASTParameterDeclaration copy(); + + /** + * @since 5.3 + */ + public IASTParameterDeclaration copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTPointer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTPointer.java index ab15838439e..2d702ea676c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTPointer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTPointer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -54,4 +54,9 @@ public interface IASTPointer extends IASTPointerOperator { * @since 5.1 */ public IASTPointer copy(); + + /** + * @since 5.3 + */ + public IASTPointer copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTPointerOperator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTPointerOperator.java index d18dd0b15d9..fe5a585b3ec 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTPointerOperator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTPointerOperator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,4 +25,9 @@ public interface IASTPointerOperator extends IASTNode { * @since 5.1 */ public IASTPointerOperator copy(); + + /** + * @since 5.3 + */ + public IASTPointerOperator copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblem.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblem.java index 3924729d4f0..fcb42f6e0c2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblem.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblem.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -24,4 +24,9 @@ public interface IASTProblem extends IProblem, IASTNode { * @since 5.1 */ public IASTProblem copy(); + + /** + * @since 5.3 + */ + public IASTProblem copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemDeclaration.java index 070d16c3a1c..bd23de9370b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -23,4 +23,9 @@ public interface IASTProblemDeclaration extends IASTDeclaration, IASTProblemHold * @since 5.1 */ public IASTProblemDeclaration copy(); + + /** + * @since 5.3 + */ + public IASTProblemDeclaration copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemExpression.java index a3b7eb580ea..12d679045de 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -23,4 +23,9 @@ public interface IASTProblemExpression extends IASTExpression, IASTProblemHolder * @since 5.1 */ public IASTProblemExpression copy(); + + /** + * @since 5.3 + */ + public IASTProblemExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemStatement.java index 66faa7edb60..b019a9b69c2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -23,4 +23,9 @@ public interface IASTProblemStatement extends IASTStatement, IASTProblemHolder { * @since 5.1 */ public IASTProblemStatement copy(); + + /** + * @since 5.3 + */ + public IASTProblemStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemTypeId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemTypeId.java index 789e6a42f99..c87b4e2ad8b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemTypeId.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTProblemTypeId.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -23,4 +23,9 @@ public interface IASTProblemTypeId extends IASTTypeId, IASTProblemHolder { * @since 5.1 */ public IASTProblemTypeId copy(); + + /** + * @since 5.3 + */ + public IASTProblemTypeId copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTReturnStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTReturnStatement.java index c84bc91ede2..2f015c3b106 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTReturnStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTReturnStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -49,4 +49,9 @@ public interface IASTReturnStatement extends IASTStatement { * @since 5.1 */ public IASTReturnStatement copy(); + + /** + * @since 5.3 + */ + public IASTReturnStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTSimpleDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTSimpleDeclaration.java index d8eb0122bce..c306d561790 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTSimpleDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTSimpleDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -70,4 +70,9 @@ public interface IASTSimpleDeclaration extends IASTDeclaration { * @since 5.1 */ public IASTSimpleDeclaration copy(); + + /** + * @since 5.3 + */ + public IASTSimpleDeclaration copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTStandardFunctionDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTStandardFunctionDeclarator.java index 2206991932e..0984c720893 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTStandardFunctionDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTStandardFunctionDeclarator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -68,4 +68,9 @@ public interface IASTStandardFunctionDeclarator extends IASTFunctionDeclarator { * @since 5.1 */ public IASTStandardFunctionDeclarator copy(); + + /** + * @since 5.3 + */ + public IASTStandardFunctionDeclarator copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTStatement.java index 1d587418da7..8340c43605d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -27,4 +27,9 @@ public interface IASTStatement extends IASTNode { */ public IASTStatement copy(); + /** + * @since 5.3 + */ + public IASTStatement copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTSwitchStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTSwitchStatement.java index 4263ce23a98..c515d50c74f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTSwitchStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTSwitchStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -69,4 +69,9 @@ public interface IASTSwitchStatement extends IASTStatement { * @since 5.1 */ public IASTSwitchStatement copy(); + + /** + * @since 5.3 + */ + public IASTSwitchStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTranslationUnit.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTranslationUnit.java index 5ca387226c9..0769b2ab85a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTranslationUnit.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTranslationUnit.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -319,4 +319,14 @@ public interface IASTTranslationUnit extends IASTDeclarationListOwner, IAdaptabl * @since 5.1 */ public IASTTranslationUnit copy(); + + /** + * Returns a copy of the AST, however the ILocationResolver and the preprocessor nodes are not copied. + * + * @see IASTNode#copy() + * + * @noreference This method is not intended to be referenced by clients. + * @since 5.3 + */ + public IASTTranslationUnit copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTypeId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTypeId.java index b325aca609e..5f297e428d7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTypeId.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTypeId.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -64,4 +64,9 @@ public interface IASTTypeId extends IASTNode { * @since 5.1 */ public IASTTypeId copy(); + + /** + * @since 5.3 + */ + public IASTTypeId copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTypeIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTypeIdExpression.java index be5a116fe40..e744800ab9b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTypeIdExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTypeIdExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -80,4 +80,9 @@ public interface IASTTypeIdExpression extends IASTExpression { * @since 5.1 */ public IASTTypeIdExpression copy(); + + /** + * @since 5.3 + */ + public IASTTypeIdExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTUnaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTUnaryExpression.java index fac3bc109d1..1677d06e0a1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTUnaryExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTUnaryExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -163,4 +163,9 @@ public interface IASTUnaryExpression extends IASTExpression { * @since 5.1 */ public IASTUnaryExpression copy(); + + /** + * @since 5.3 + */ + public IASTUnaryExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTWhileStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTWhileStatement.java index 8a8fd6d71c3..ba64a78776b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTWhileStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTWhileStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -63,4 +63,9 @@ public interface IASTWhileStatement extends IASTStatement { * @since 5.1 */ public IASTWhileStatement copy(); + + /** + * @since 5.3 + */ + public IASTWhileStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTArrayDesignator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTArrayDesignator.java index ff307dc4068..63ca49b1a92 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTArrayDesignator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTArrayDesignator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -48,4 +48,9 @@ public interface ICASTArrayDesignator extends ICASTDesignator { * @since 5.1 */ public ICASTArrayDesignator copy(); + + /** + * @since 5.3 + */ + public ICASTArrayDesignator copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTArrayModifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTArrayModifier.java index ca7505dfa86..386bbdd8a39 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTArrayModifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTArrayModifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -100,4 +100,9 @@ public interface ICASTArrayModifier extends IASTArrayModifier { * @since 5.1 */ public ICASTArrayModifier copy(); + + /** + * @since 5.3 + */ + public ICASTArrayModifier copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTCompositeTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTCompositeTypeSpecifier.java index 3cbacccc7e5..2bd039803e0 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTCompositeTypeSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTCompositeTypeSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -24,4 +24,9 @@ public interface ICASTCompositeTypeSpecifier extends IASTCompositeTypeSpecifier, * @since 5.1 */ public ICASTCompositeTypeSpecifier copy(); + + /** + * @since 5.3 + */ + public ICASTCompositeTypeSpecifier copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTDesignatedInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTDesignatedInitializer.java index cbdb4256f24..7f6fbc3c315 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTDesignatedInitializer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTDesignatedInitializer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -59,6 +59,11 @@ public interface ICASTDesignatedInitializer extends IASTInitializer, IASTInitial */ public ICASTDesignatedInitializer copy(); + /** + * @since 5.3 + */ + public ICASTDesignatedInitializer copy(CopyStyle style); + /** * @deprecated Replaced by {@link #getOperand()}; */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTDesignator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTDesignator.java index 6947e9c0248..567b4d3fbfd 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTDesignator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTDesignator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -24,4 +24,9 @@ public interface ICASTDesignator extends IASTNode { * @since 5.1 */ public ICASTDesignator copy(); + + /** + * @since 5.3 + */ + public ICASTDesignator copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTElaboratedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTElaboratedTypeSpecifier.java index ba3e353ec86..6638e61c18a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTElaboratedTypeSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTElaboratedTypeSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -26,4 +26,9 @@ public interface ICASTElaboratedTypeSpecifier extends * @since 5.1 */ public ICASTElaboratedTypeSpecifier copy(); + + /** + * @since 5.3 + */ + public ICASTElaboratedTypeSpecifier copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTEnumerationSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTEnumerationSpecifier.java index c516347f2f3..8ffd70a56db 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTEnumerationSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTEnumerationSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,4 +25,9 @@ public interface ICASTEnumerationSpecifier extends ICASTDeclSpecifier, * @since 5.1 */ public ICASTEnumerationSpecifier copy(); + + /** + * @since 5.3 + */ + public ICASTEnumerationSpecifier copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTFieldDesignator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTFieldDesignator.java index e1fe92b899f..3b0c8b3ff1d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTFieldDesignator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTFieldDesignator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -47,4 +47,9 @@ public interface ICASTFieldDesignator extends ICASTDesignator { * @since 5.1 */ public ICASTFieldDesignator copy(); + + /** + * @since 5.3 + */ + public ICASTFieldDesignator copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTPointer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTPointer.java index d2a9588bb49..03d0314ad83 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTPointer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTPointer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,4 +25,9 @@ public interface ICASTPointer extends IASTPointer { * @since 5.1 */ public ICASTPointer copy(); + + /** + * @since 5.3 + */ + public ICASTPointer copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTSimpleDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTSimpleDeclSpecifier.java index 85ebdc65114..8bfbc7a65af 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTSimpleDeclSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTSimpleDeclSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -26,6 +26,11 @@ public interface ICASTSimpleDeclSpecifier extends IASTSimpleDeclSpecifier, ICAST */ public ICASTSimpleDeclSpecifier copy(); + /** + * @since 5.3 + */ + public ICASTSimpleDeclSpecifier copy(CopyStyle style); + /** * @deprecated Replaced by {@link IASTSimpleDeclSpecifier#t_bool}. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTTypeIdInitializerExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTTypeIdInitializerExpression.java index acfa8e829e9..6f31a0f8eeb 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTTypeIdInitializerExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTTypeIdInitializerExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -28,4 +28,9 @@ public interface ICASTTypeIdInitializerExpression extends IASTTypeIdInitializerE * @since 5.1 */ public ICASTTypeIdInitializerExpression copy(); + + /** + * @since 5.3 + */ + public ICASTTypeIdInitializerExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTTypedefNameSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTTypedefNameSpecifier.java index 325ed88234c..3206ef68694 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTTypedefNameSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/ICASTTypedefNameSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,4 +25,9 @@ public interface ICASTTypedefNameSpecifier extends IASTNamedTypeSpecifier, ICAST * @since 5.1 */ public ICASTTypedefNameSpecifier copy(); + + /** + * @since 5.3 + */ + public ICASTTypedefNameSpecifier copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTArraySubscriptExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTArraySubscriptExpression.java index 8111a899a9a..285e4547c02 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTArraySubscriptExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTArraySubscriptExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 IBM Corporation and others. + * Copyright (c) 2009, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -22,4 +22,9 @@ import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner; public interface ICPPASTArraySubscriptExpression extends IASTArraySubscriptExpression, IASTImplicitNameOwner { public ICPPASTArraySubscriptExpression copy(); + + /** + * @since 5.3 + */ + public ICPPASTArraySubscriptExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTBinaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTBinaryExpression.java index 275fabc57a9..12f58a73c92 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTBinaryExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTBinaryExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -43,4 +43,9 @@ public interface ICPPASTBinaryExpression extends IASTBinaryExpression, IASTImpli * @since 5.1 */ public ICPPASTBinaryExpression copy(); + + /** + * @since 5.3 + */ + public ICPPASTBinaryExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCapture.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCapture.java index 741685f8adb..e579e3c6d11 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCapture.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCapture.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2010, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -26,6 +26,8 @@ public interface ICPPASTCapture extends IASTNode, ICPPASTPackExpandable { ICPPASTCapture copy(); + ICPPASTCapture copy(CopyStyle style); + /** * Returns whether the capture uses a leading ampersand. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCatchHandler.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCatchHandler.java index 636d2307c9d..8ace8e3ecad 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCatchHandler.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCatchHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -79,4 +79,9 @@ public interface ICPPASTCatchHandler extends IASTStatement { * @since 5.1 */ public ICPPASTCatchHandler copy(); + + /** + * @since 5.3 + */ + public ICPPASTCatchHandler copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCompositeTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCompositeTypeSpecifier.java index b9a80e70823..b41944e68f5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCompositeTypeSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTCompositeTypeSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -86,6 +86,11 @@ public interface ICPPASTCompositeTypeSpecifier extends IASTCompositeTypeSpecifie */ public ICPPASTBaseSpecifier copy(); + /** + * @since 5.3 + */ + public ICPPASTBaseSpecifier copy(CopyStyle style); + /** * Sets the name for this specifier, not allowed on frozen AST. */ @@ -126,4 +131,9 @@ public interface ICPPASTCompositeTypeSpecifier extends IASTCompositeTypeSpecifie * @since 5.1 */ public ICPPASTCompositeTypeSpecifier copy(); + + /** + * @since 5.3 + */ + public ICPPASTCompositeTypeSpecifier copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorChainInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorChainInitializer.java index 9928c292003..890501281d0 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorChainInitializer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorChainInitializer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -54,6 +54,11 @@ public interface ICPPASTConstructorChainInitializer extends IASTInitializer, ICP */ public ICPPASTConstructorChainInitializer copy(); + /** + * @since 5.3 + */ + public ICPPASTConstructorChainInitializer copy(CopyStyle style); + /** * Not allowed on frozen ast. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorInitializer.java index 7b63a37fc2b..02308e5f3a8 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorInitializer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConstructorInitializer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -13,8 +13,8 @@ package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.IASTExpression; -import org.eclipse.cdt.core.dom.ast.IASTInitializerClause; import org.eclipse.cdt.core.dom.ast.IASTInitializer; +import org.eclipse.cdt.core.dom.ast.IASTInitializerClause; import org.eclipse.cdt.core.dom.ast.IASTInitializerList; /** @@ -44,6 +44,11 @@ public interface ICPPASTConstructorInitializer extends IASTInitializer { */ public ICPPASTConstructorInitializer copy(); + /** + * @since 5.3 + */ + public ICPPASTConstructorInitializer copy(CopyStyle style); + /** * Not allowed on frozen ast. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConversionName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConversionName.java index 3d7c04b454d..0af83088fdf 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConversionName.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTConversionName.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -43,4 +43,9 @@ public interface ICPPASTConversionName extends IASTName { * @since 5.1 */ public ICPPASTConversionName copy(); + + /** + * @since 5.3 + */ + public ICPPASTConversionName copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeclSpecifier.java index 24d9a75dbed..c3f9584e2be 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeclSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeclSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -72,6 +72,11 @@ public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier { */ public ICPPASTDeclSpecifier copy(); + /** + * @since 5.3 + */ + public ICPPASTDeclSpecifier copy(CopyStyle style); + /** * @deprecated All constants must be defined in {@link IASTDeclSpecifier} */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeleteExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeleteExpression.java index 1cafaa5543e..55fc3fdb996 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeleteExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTDeleteExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -78,4 +78,9 @@ public interface ICPPASTDeleteExpression extends IASTExpression, IASTImplicitNam */ public ICPPASTDeleteExpression copy(); + /** + * @since 5.3 + */ + public ICPPASTDeleteExpression copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTElaboratedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTElaboratedTypeSpecifier.java index c730e7183b4..fc965e02b71 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTElaboratedTypeSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTElaboratedTypeSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -36,4 +36,9 @@ public interface ICPPASTElaboratedTypeSpecifier extends */ public ICPPASTElaboratedTypeSpecifier copy(); + /** + * @since 5.3 + */ + public ICPPASTElaboratedTypeSpecifier copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTEnumerationSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTEnumerationSpecifier.java index 78678e5240f..d4744fda95a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTEnumerationSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTEnumerationSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2010, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -27,6 +27,11 @@ public interface ICPPASTEnumerationSpecifier extends IASTEnumerationSpecifier, I public ICPPASTEnumerationSpecifier copy(); + /** + * @since 5.3 + */ + public ICPPASTEnumerationSpecifier copy(CopyStyle style); + /** * Not allowed on frozen ast. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExplicitTemplateInstantiation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExplicitTemplateInstantiation.java index 530b999c1b6..3adecb972ea 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExplicitTemplateInstantiation.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExplicitTemplateInstantiation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -65,8 +65,14 @@ public interface ICPPASTExplicitTemplateInstantiation extends IASTDeclaration { */ public ICPPASTExplicitTemplateInstantiation copy(); + /** + * @since 5.3 + */ + public ICPPASTExplicitTemplateInstantiation copy(CopyStyle style); + /** * Returns {@link #STATIC}, {@link #INLINE}, {@link #EXTERN}, or 0. + * * @since 5.2 */ public int getModifier(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExpressionList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExpressionList.java index 7e40a64f1f1..0393e524063 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExpressionList.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTExpressionList.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 IBM Corporation and others. + * Copyright (c) 2009, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -22,4 +22,9 @@ import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner; public interface ICPPASTExpressionList extends IASTExpressionList, IASTImplicitNameOwner { public ICPPASTExpressionList copy(); + + /** + * @since 5.3 + */ + public ICPPASTExpressionList copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFieldReference.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFieldReference.java index 5b669ea7ed0..4282cda9e2a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFieldReference.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFieldReference.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -40,4 +40,9 @@ public interface ICPPASTFieldReference extends IASTFieldReference, IASTImplicitN * @since 5.1 */ public ICPPASTFieldReference copy(); + + /** + * @since 5.3 + */ + public ICPPASTFieldReference copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTForStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTForStatement.java index c906a21283f..fb5281dd524 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTForStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTForStatement.java @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -29,4 +29,9 @@ public interface ICPPASTForStatement extends IASTForStatement { * @since 5.1 */ public ICPPASTForStatement copy(); + + /** + * @since 5.3 + */ + public ICPPASTForStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionCallExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionCallExpression.java index 065b5661927..985dfe12840 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionCallExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionCallExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 IBM Corporation and others. + * Copyright (c) 2009, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -22,4 +22,9 @@ import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner; public interface ICPPASTFunctionCallExpression extends IASTFunctionCallExpression, IASTImplicitNameOwner { ICPPASTFunctionCallExpression copy(); + + /** + * @since 5.3 + */ + ICPPASTFunctionCallExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionDeclarator.java index d6e35734e17..2bf8d6104d5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionDeclarator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -137,4 +137,9 @@ public interface ICPPASTFunctionDeclarator extends IASTStandardFunctionDeclarato * @since 5.1 */ public ICPPASTFunctionDeclarator copy(); + + /** + * @since 5.3 + */ + public ICPPASTFunctionDeclarator copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionDefinition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionDefinition.java index 1afaa54a538..bb77771f525 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionDefinition.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTFunctionDefinition.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2008, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -44,6 +44,11 @@ public interface ICPPASTFunctionDefinition extends IASTFunctionDefinition { */ public ICPPASTFunctionDefinition copy(); + /** + * @since 5.3 + */ + public ICPPASTFunctionDefinition copy(CopyStyle style); + /** * Make this a defaulted function definition, e.g.: C::C() = default; * @since 5.3 diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTIfStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTIfStatement.java index c98a097bec8..7beba63747a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTIfStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTIfStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -35,4 +35,9 @@ public interface ICPPASTIfStatement extends IASTIfStatement { * @since 5.1 */ public ICPPASTIfStatement copy(); + + /** + * @since 5.3 + */ + public ICPPASTIfStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTInitializerList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTInitializerList.java index 487cffbc224..141fbfca63e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTInitializerList.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTInitializerList.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2009, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -22,4 +22,9 @@ import org.eclipse.cdt.core.dom.ast.IASTInitializerList; public interface ICPPASTInitializerList extends IASTInitializerList, ICPPASTPackExpandable { ICPPASTInitializerList copy(); + + /** + * @since 5.3 + */ + ICPPASTInitializerList copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLinkageSpecification.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLinkageSpecification.java index 3a9a25a46e4..d1e6aab720c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLinkageSpecification.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLinkageSpecification.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -63,4 +63,9 @@ public interface ICPPASTLinkageSpecification extends IASTDeclaration, IASTDeclar * @since 5.1 */ public ICPPASTLinkageSpecification copy(); + + /** + * @since 5.3 + */ + public ICPPASTLinkageSpecification copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLiteralExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLiteralExpression.java index 01684e6a950..f1f8f8856ac 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLiteralExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTLiteralExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -46,4 +46,9 @@ public interface ICPPASTLiteralExpression extends IASTLiteralExpression { * @since 5.1 */ public ICPPASTLiteralExpression copy(); + + /** + * @since 5.3 + */ + public ICPPASTLiteralExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamedTypeSpecifier.java index 894e806a6bc..92b0bac98b1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamedTypeSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamedTypeSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -42,4 +42,9 @@ public interface ICPPASTNamedTypeSpecifier extends IASTNamedTypeSpecifier, */ public ICPPASTNamedTypeSpecifier copy(); + /** + * @since 5.3 + */ + public ICPPASTNamedTypeSpecifier copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceAlias.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceAlias.java index 5b3811d6f74..a01bf8c6c53 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceAlias.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceAlias.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -74,4 +74,9 @@ public interface ICPPASTNamespaceAlias extends IASTDeclaration, IASTNameOwner { */ public ICPPASTNamespaceAlias copy(); + /** + * @since 5.3 + */ + public ICPPASTNamespaceAlias copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceDefinition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceDefinition.java index de671f9ede4..722c8049af4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceDefinition.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNamespaceDefinition.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -93,4 +93,9 @@ public interface ICPPASTNamespaceDefinition extends IASTDeclaration, IASTNameOwn * @since 5.1 */ public ICPPASTNamespaceDefinition copy(); + + /** + * @since 5.3 + */ + public ICPPASTNamespaceDefinition copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNewExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNewExpression.java index ff165ab158b..af0d7b76706 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNewExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTNewExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -76,6 +76,11 @@ public interface ICPPASTNewExpression extends IASTExpression, IASTImplicitNameOw */ public ICPPASTNewExpression copy(); + /** + * @since 5.3 + */ + public ICPPASTNewExpression copy(CopyStyle style); + /** * Not allowed on frozen ast. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTOperatorName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTOperatorName.java index 0543b1efe71..403a4bd6094 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTOperatorName.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTOperatorName.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005 - 2009 IBM Corporation and others. + * Copyright (c) 2005 - 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -24,4 +24,9 @@ public interface ICPPASTOperatorName extends IASTName { * @since 5.1 */ public ICPPASTOperatorName copy(); + + /** + * @since 5.3 + */ + public ICPPASTOperatorName copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTParameterDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTParameterDeclaration.java index 52851caddc8..e302b4e2e19 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTParameterDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTParameterDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -29,6 +29,11 @@ public interface ICPPASTParameterDeclaration extends ICPPASTTemplateParameter, I */ public ICPPASTParameterDeclaration copy(); + /** + * @since 5.3 + */ + public ICPPASTParameterDeclaration copy(CopyStyle style); + /** * @since 5.2 */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTQualifiedName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTQualifiedName.java index 80bdcf353f5..ea1eae11229 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTQualifiedName.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTQualifiedName.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -75,4 +75,9 @@ public interface ICPPASTQualifiedName extends IASTName, IASTNameOwner { * @since 5.1 */ public ICPPASTQualifiedName copy(); + + /** + * @since 5.3 + */ + public ICPPASTQualifiedName copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTRangeBasedForStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTRangeBasedForStatement.java index f5b6059a751..1168b97c022 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTRangeBasedForStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTRangeBasedForStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2010, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -55,6 +55,8 @@ public interface ICPPASTRangeBasedForStatement extends IASTStatement { public ICPPASTRangeBasedForStatement copy(); + public ICPPASTRangeBasedForStatement copy(CopyStyle style); + /** * Not allowed on frozen AST. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTReferenceOperator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTReferenceOperator.java index 04e1b73eeb3..c0145224e29 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTReferenceOperator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTReferenceOperator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -31,4 +31,9 @@ public interface ICPPASTReferenceOperator extends IASTPointerOperator { * @since 5.1 */ public ICPPASTReferenceOperator copy(); + + /** + * @since 5.3 + */ + public ICPPASTReferenceOperator copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleDeclSpecifier.java index 4721096c9b1..f4de4049c8b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleDeclSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleDeclSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,6 +25,11 @@ public interface ICPPASTSimpleDeclSpecifier extends IASTSimpleDeclSpecifier, ICP */ public ICPPASTSimpleDeclSpecifier copy(); + /** + * @since 5.3 + */ + public ICPPASTSimpleDeclSpecifier copy(CopyStyle style); + /** * @deprecated all constants must be defined in {@link IASTSimpleDeclSpecifier}. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeConstructorExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeConstructorExpression.java index 9d1c2cdc59a..12e1dcbd208 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeConstructorExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeConstructorExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -55,6 +55,11 @@ public interface ICPPASTSimpleTypeConstructorExpression extends IASTExpression { */ public ICPPASTSimpleTypeConstructorExpression copy(); + /** + * @since 5.3 + */ + public ICPPASTSimpleTypeConstructorExpression copy(CopyStyle style); + /** * Not allowed on frozen ast. * @since 5.2 diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeTemplateParameter.java index 17a66bc467a..01ffd316f2d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeTemplateParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSimpleTypeTemplateParameter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -87,4 +87,9 @@ public interface ICPPASTSimpleTypeTemplateParameter extends ICPPASTTemplateParam * @since 5.1 */ public ICPPASTSimpleTypeTemplateParameter copy(); + + /** + * @since 5.3 + */ + public ICPPASTSimpleTypeTemplateParameter copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSwitchStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSwitchStatement.java index e117c2d4718..87753ab4ca0 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSwitchStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTSwitchStatement.java @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -54,4 +54,9 @@ public interface ICPPASTSwitchStatement extends IASTSwitchStatement { * @since 5.1 */ public ICPPASTSwitchStatement copy(); + + /** + * @since 5.3 + */ + public ICPPASTSwitchStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateDeclaration.java index 3d2323390da..af99c09645f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -95,4 +95,9 @@ public interface ICPPASTTemplateDeclaration extends IASTDeclaration { * @since 5.1 */ public ICPPASTTemplateDeclaration copy(); + + /** + * @since 5.3 + */ + public ICPPASTTemplateDeclaration copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateId.java index 38c892e8cda..5f379d33fa5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateId.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateId.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -89,4 +89,9 @@ public interface ICPPASTTemplateId extends IASTName, IASTNameOwner { */ public ICPPASTTemplateId copy(); + /** + * @since 5.3 + */ + public ICPPASTTemplateId copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateParameter.java index 8fb2480b56e..98d731a4204 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateParameter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -32,4 +32,9 @@ public interface ICPPASTTemplateParameter extends IASTNode { * @since 5.1 */ public ICPPASTTemplateParameter copy(); + + /** + * @since 5.3 + */ + public ICPPASTTemplateParameter copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateSpecialization.java index 16c9807d50c..7dae09c69ec 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateSpecialization.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplateSpecialization.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -46,4 +46,9 @@ public interface ICPPASTTemplateSpecialization extends IASTDeclaration { * @since 5.1 */ public ICPPASTTemplateSpecialization copy(); + + /** + * @since 5.3 + */ + public ICPPASTTemplateSpecialization copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplatedTypeTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplatedTypeTemplateParameter.java index b48244143c0..099562a03d6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplatedTypeTemplateParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTemplatedTypeTemplateParameter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -65,6 +65,11 @@ public interface ICPPASTTemplatedTypeTemplateParameter extends ICPPASTTemplatePa */ public ICPPASTTemplatedTypeTemplateParameter copy(); + /** + * @since 5.3 + */ + public ICPPASTTemplatedTypeTemplateParameter copy(CopyStyle style); + /** * Add a nested template parameter. * @since 5.3 diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTranslationUnit.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTranslationUnit.java index a7c501c2faa..ac1d24e5a0d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTranslationUnit.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTranslationUnit.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -31,4 +31,9 @@ public interface ICPPASTTranslationUnit extends IASTTranslationUnit { * @since 5.1 */ public ICPPASTTranslationUnit copy(); + + /** + * @since 5.3 + */ + public ICPPASTTranslationUnit copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTryBlockStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTryBlockStatement.java index 39e58854e5d..5cba5dac7c1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTryBlockStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTryBlockStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -69,4 +69,9 @@ public interface ICPPASTTryBlockStatement extends IASTStatement { */ public ICPPASTTryBlockStatement copy(); + /** + * @since 5.3 + */ + public ICPPASTTryBlockStatement copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTypeIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTypeIdExpression.java index 4e8240060ab..985f77caf75 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTypeIdExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTTypeIdExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -32,4 +32,9 @@ public interface ICPPASTTypeIdExpression extends IASTTypeIdExpression { * @since 5.1 */ public ICPPASTTypeIdExpression copy(); + + /** + * @since 5.3 + */ + public ICPPASTTypeIdExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUnaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUnaryExpression.java index 010c7c08f08..d6ef6b705a5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUnaryExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUnaryExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,8 +11,8 @@ *******************************************************************************/ package org.eclipse.cdt.core.dom.ast.cpp; -import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression; import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner; +import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression; /** * @noextend This interface is not intended to be extended by clients. @@ -40,4 +40,9 @@ public interface ICPPASTUnaryExpression extends IASTUnaryExpression, IASTImplici * @since 5.1 */ public ICPPASTUnaryExpression copy(); + + /** + * @since 5.3 + */ + public ICPPASTUnaryExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDeclaration.java index 3673e0f7550..cb5dfc9e57d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -62,4 +62,9 @@ public interface ICPPASTUsingDeclaration extends IASTDeclaration, IASTNameOwner * @since 5.1 */ public ICPPASTUsingDeclaration copy(); + + /** + * @since 5.3 + */ + public ICPPASTUsingDeclaration copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDirective.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDirective.java index fb3752c3b24..6591412b6e3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDirective.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTUsingDirective.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -54,4 +54,9 @@ public interface ICPPASTUsingDirective extends IASTDeclaration, IASTNameOwner { */ public ICPPASTUsingDirective copy(); + /** + * @since 5.3 + */ + public ICPPASTUsingDirective copy(CopyStyle style); + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTVisibilityLabel.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTVisibilityLabel.java index 0887a8cd1c1..6e4ece7cb26 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTVisibilityLabel.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTVisibilityLabel.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -56,4 +56,9 @@ public interface ICPPASTVisibilityLabel extends IASTDeclaration { * @since 5.1 */ public ICPPASTVisibilityLabel copy(); + + /** + * @since 5.3 + */ + public ICPPASTVisibilityLabel copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTWhileStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTWhileStatement.java index 17f6c48beed..d73108b7d51 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTWhileStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTWhileStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -55,4 +55,9 @@ public interface ICPPASTWhileStatement extends IASTWhileStatement { * @since 5.1 */ public ICPPASTWhileStatement copy(); + + /** + * @since 5.3 + */ + public ICPPASTWhileStatement copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/IGNUASTCompoundStatementExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/IGNUASTCompoundStatementExpression.java index 6fa59b268b6..6990d2188b3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/IGNUASTCompoundStatementExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/IGNUASTCompoundStatementExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -50,4 +50,9 @@ public interface IGNUASTCompoundStatementExpression extends IASTExpression { * @since 5.1 */ public IGNUASTCompoundStatementExpression copy(); + + /** + * @since 5.3 + */ + public IGNUASTCompoundStatementExpression copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/c/ICASTKnRFunctionDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/c/ICASTKnRFunctionDeclarator.java index 92433abd0e5..7bc8b0fde85 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/c/ICASTKnRFunctionDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/c/ICASTKnRFunctionDeclarator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -79,4 +79,9 @@ public interface ICASTKnRFunctionDeclarator extends IASTFunctionDeclarator { * @since 5.1 */ public ICASTKnRFunctionDeclarator copy(); + + /** + * @since 5.3 + */ + public ICASTKnRFunctionDeclarator copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/c/IGCCASTArrayRangeDesignator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/c/IGCCASTArrayRangeDesignator.java index 8a33136809e..31750550de2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/c/IGCCASTArrayRangeDesignator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/c/IGCCASTArrayRangeDesignator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -73,4 +73,9 @@ public interface IGCCASTArrayRangeDesignator extends ICASTDesignator { * @since 5.1 */ public IGCCASTArrayRangeDesignator copy(); + + /** + * @since 5.3 + */ + public IGCCASTArrayRangeDesignator copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/c/IGCCASTSimpleDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/c/IGCCASTSimpleDeclSpecifier.java index 0391f619b36..9c4b5b1717e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/c/IGCCASTSimpleDeclSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/gnu/c/IGCCASTSimpleDeclSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -58,4 +58,9 @@ public interface IGCCASTSimpleDeclSpecifier extends ICASTSimpleDeclSpecifier { * @since 5.1 */ public IGCCASTSimpleDeclSpecifier copy(); + + /** + * @since 5.3 + */ + public IGCCASTSimpleDeclSpecifier copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousBinaryVsCastExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousBinaryVsCastExpression.java index f49f59b8eaa..721950391e1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousBinaryVsCastExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousBinaryVsCastExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2008, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -44,6 +44,10 @@ public abstract class ASTAmbiguousBinaryVsCastExpression extends ASTAmbiguousNod throw new UnsupportedOperationException(); } + public final IASTExpression copy(CopyStyle style) { + throw new UnsupportedOperationException(); + } + public final void addExpression(IASTExpression e) { throw new UnsupportedOperationException(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousCastVsFunctionCallExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousCastVsFunctionCallExpression.java index 8ebef4fc505..dcc060262b2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousCastVsFunctionCallExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTAmbiguousCastVsFunctionCallExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2008, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -53,6 +53,10 @@ public abstract class ASTAmbiguousCastVsFunctionCallExpression extends ASTAmbigu throw new UnsupportedOperationException(); } + public final IASTExpression copy(CopyStyle style) { + throw new UnsupportedOperationException(); + } + public void addExpression(IASTExpression e) { throw new UnsupportedOperationException(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTCopyLocation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTCopyLocation.java new file mode 100644 index 00000000000..0d72769cb64 --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTCopyLocation.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2011 Institute for Software, HSR Hochschule fuer Technik + * Rapperswil, University of applied sciences and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Institute for Software (IFS)- initial API and implementation + ******************************************************************************/ +package org.eclipse.cdt.internal.core.dom.parser; + +import org.eclipse.cdt.core.dom.ast.IASTCopyLocation; +import org.eclipse.cdt.core.dom.ast.IASTFileLocation; +import org.eclipse.cdt.core.dom.ast.IASTNode; + +/** + * @author Emanuel Graf IFS + * + */ +public class ASTCopyLocation implements IASTCopyLocation { + + private IASTNode originalNode; + + + + public ASTCopyLocation(IASTNode originalNode) { + this.originalNode = originalNode; + } + + public int getNodeOffset() { + return 0; + } + + public int getNodeLength() { + return 0; + } + + public IASTFileLocation asFileLocation() { + return null; + } + + public IASTNode getOriginalNode() { + return originalNode; + } + +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTEnumerator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTEnumerator.java index a576299d9a7..a1b601b2878 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTEnumerator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTEnumerator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2009 Wind River Systems, Inc. and others. + * Copyright (c) 2008, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,11 +12,11 @@ package org.eclipse.cdt.internal.core.dom.parser; import org.eclipse.cdt.core.dom.ast.ASTVisitor; import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier; +import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator; import org.eclipse.cdt.core.dom.ast.IASTExpression; import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IValue; -import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator; /** * Base class for c- and c++ enumerators. @@ -35,9 +35,9 @@ public abstract class ASTEnumerator extends ASTNode implements IASTEnumerator, I setValue(value); } - protected void copyAbstractEnumerator(ASTEnumerator copy) { - copy.setName(name == null ? null : name.copy()); - copy.setValue(value == null ? null : value.copy()); + protected void copyAbstractEnumerator(ASTEnumerator copy, CopyStyle style) { + copy.setName(name == null ? null : name.copy(style)); + copy.setValue(value == null ? null : value.copy(style)); copy.setOffsetAndLength(this); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java index 74c5369d96d..c0fecc0a4fb 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -27,8 +27,8 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPFunction; import org.eclipse.cdt.internal.core.parser.scanner.ILexerLog; import org.eclipse.cdt.internal.core.parser.scanner.ILocationResolver; import org.eclipse.cdt.internal.core.parser.scanner.Lexer; -import org.eclipse.cdt.internal.core.parser.scanner.Token; import org.eclipse.cdt.internal.core.parser.scanner.Lexer.LexerOptions; +import org.eclipse.cdt.internal.core.parser.scanner.Token; /** * Base class for all non-preprocessor nodes in the AST. @@ -341,4 +341,9 @@ public abstract class ASTNode implements IASTNode { } return null; } + + protected void setCopyLocation(IASTNode originalNode) { + locations = new IASTNodeLocation[] {new ASTCopyLocation(originalNode)}; + } + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTProblem.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTProblem.java index ecc0f263630..660b320d26c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTProblem.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTProblem.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -51,11 +51,18 @@ public class ASTProblem extends ASTNode implements IASTProblem { } public ASTProblem copy() { - ASTProblem problem = new ASTProblem(id, arg == null ? null : arg.clone(), isError); - problem.setOffsetAndLength(this); - return problem; + return copy(CopyStyle.withoutLocations); } + public ASTProblem copy(CopyStyle style) { + ASTProblem problem = new ASTProblem(id, arg == null ? null : arg.clone(), isError); + problem.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + problem.setCopyLocation(this); + } + return problem; + } + public int getID() { return id; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTranslationUnit.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTranslationUnit.java index d77e8da2e07..fbf4c29b2b1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTranslationUnit.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTranslationUnit.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2008, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -406,7 +406,7 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat */ public abstract void resolveAmbiguities(); - protected void copyAbstractTU(ASTTranslationUnit copy) { + protected void copyAbstractTU(ASTTranslationUnit copy, CopyStyle style) { copy.setIndex(fIndex); copy.setIsHeaderUnit(fIsHeader); copy.setASTNodeFactory(fNodeFactory); @@ -414,7 +414,7 @@ public abstract class ASTTranslationUnit extends ASTNode implements IASTTranslat copy.setIsForContentAssist(fForContentAssist); for (IASTDeclaration declaration : getDeclarations()) - copy.addDeclaration(declaration == null ? null : declaration.copy()); + copy.addDeclaration(declaration == null ? null : declaration.copy(style)); copy.setOffsetAndLength(this); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTypeIdInitializerExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTypeIdInitializerExpression.java index 2041d33ab61..fcdac6f06b7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTypeIdInitializerExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTypeIdInitializerExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -32,10 +32,13 @@ public abstract class ASTTypeIdInitializerExpression extends ASTNode implements setInitializer(i); } - protected void initializeCopy(ASTTypeIdInitializerExpression copy) { - copy.setTypeId(typeId == null ? null : typeId.copy()); - copy.setInitializer(initializer == null ? null : initializer.copy()); + protected void initializeCopy(ASTTypeIdInitializerExpression copy, CopyStyle style) { + copy.setTypeId(typeId == null ? null : typeId.copy(style)); + copy.setInitializer(initializer == null ? null : initializer.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } } public IASTTypeId getTypeId() { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java index bba0e40222a..8b28d716893 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -1168,6 +1168,10 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { throw new UnsupportedOperationException(); } + public IASTExpression copy(CopyStyle style) { + throw new UnsupportedOperationException(); + } + public IType getExpressionType() { throw new UnsupportedOperationException(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalEnumerationSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalEnumerationSpecifier.java index 5024bdd2094..8a7bcfc5dd1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalEnumerationSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/IASTInternalEnumerationSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2008, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -26,4 +26,9 @@ public interface IASTInternalEnumerationSpecifier extends IASTEnumerationSpecifi * @since 5.1 */ public IASTInternalEnumerationSpecifier copy(); + + /** + * @since 5.3 + */ + public IASTInternalEnumerationSpecifier copy(CopyStyle style); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTASMDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTASMDeclaration.java index 4201b859b18..ad142186219 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTASMDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTASMDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -30,12 +30,19 @@ public class CASTASMDeclaration extends ASTNode implements IASTASMDeclaration { } public CASTASMDeclaration copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTASMDeclaration copy(CopyStyle style) { CASTASMDeclaration copy = new CASTASMDeclaration(); copy.assembly = assembly == null ? null : assembly.clone(); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } - + public String getAssembly() { if( assembly == null ) return ""; //$NON-NLS-1$ return new String( assembly ); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousDeclarator.java index 63de5712bea..5bccbb1cd58 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousDeclarator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2009 IBM Wind River Systems, Inc. and others. + * Copyright (c) 2008, 2011 IBM Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -113,4 +113,8 @@ public class CASTAmbiguousDeclarator extends ASTAmbiguousNode implements IASTAmb public IASTDeclarator copy() { throw new UnsupportedOperationException(); } + + public IASTDeclarator copy(CopyStyle style) { + throw new UnsupportedOperationException(); + } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousExpression.java index ec8a2491b0d..7e4b98eadbd 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -51,4 +51,7 @@ public class CASTAmbiguousExpression extends ASTAmbiguousNode implements IASTAmb throw new UnsupportedOperationException(); } + public IASTExpression copy(CopyStyle style) { + throw new UnsupportedOperationException(); + } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousParameterDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousParameterDeclaration.java index 870e1097c4e..9c457577c21 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousParameterDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousParameterDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2009 IBM Wind River Systems, Inc. and others. + * Copyright (c) 2008, 2011 IBM Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -88,4 +88,7 @@ public class CASTAmbiguousParameterDeclaration extends ASTAmbiguousNode implemen throw new UnsupportedOperationException(); } + public IASTParameterDeclaration copy(CopyStyle style) { + throw new UnsupportedOperationException(); + } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousSimpleDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousSimpleDeclaration.java index 27057b59b06..27e7424a91c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousSimpleDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousSimpleDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2009 IBM Wind River Systems, Inc. and others. + * Copyright (c) 2008, 2011 IBM Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -60,6 +60,10 @@ public class CASTAmbiguousSimpleDeclaration extends ASTAmbiguousNode implements throw new UnsupportedOperationException(); } + public IASTSimpleDeclaration copy(CopyStyle style) { + throw new UnsupportedOperationException(); + } + public void addDeclarator(IASTDeclarator declarator) { fSimpleDecl.addDeclarator(declarator); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousStatement.java index a524f13f910..0a62bc6d06b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTAmbiguousStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -62,5 +62,8 @@ public class CASTAmbiguousStatement extends ASTAmbiguousNode implements IASTAmbi throw new UnsupportedOperationException(); } + public IASTStatement copy(CopyStyle style) { + throw new UnsupportedOperationException(); + } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDeclarator.java index c5cce07557d..3efa82c283c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDeclarator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -39,10 +39,18 @@ public class CASTArrayDeclarator extends CASTDeclarator implements IASTArrayDecl @Override public CASTArrayDeclarator copy() { + return copy(CopyStyle.withoutLocations); + } + + @Override + public CASTArrayDeclarator copy(CopyStyle style) { CASTArrayDeclarator copy = new CASTArrayDeclarator(); - copyBaseDeclarator(copy); + copyBaseDeclarator(copy, style); for(IASTArrayModifier modifier : getArrayModifiers()) copy.addArrayModifier(modifier == null ? null : modifier.copy()); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDesignator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDesignator.java index 1a86046514c..384181d0d6c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDesignator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayDesignator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -36,8 +36,15 @@ public class CASTArrayDesignator extends ASTNode implements } public CASTArrayDesignator copy() { - CASTArrayDesignator copy = new CASTArrayDesignator(exp == null ? null : exp.copy()); + return copy(CopyStyle.withoutLocations); + } + + public CASTArrayDesignator copy(CopyStyle style) { + CASTArrayDesignator copy = new CASTArrayDesignator(exp == null ? null : exp.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayModifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayModifier.java index 9cf39e3bae6..71879af4e2f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayModifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayModifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -38,13 +38,20 @@ public class CASTArrayModifier extends ASTNode implements ICASTArrayModifier, IA } public CASTArrayModifier copy() { - CASTArrayModifier copy = new CASTArrayModifier(exp == null ? null : exp.copy()); + return copy(CopyStyle.withoutLocations); + } + + public CASTArrayModifier copy(CopyStyle style) { + CASTArrayModifier copy = new CASTArrayModifier(exp == null ? null : exp.copy(style)); copy.setOffsetAndLength(this); copy.isVolatile = isVolatile; copy.isRestrict = isRestrict; copy.isStatic = isStatic; copy.isConst = isConst; copy.isVarSized = isVarSized; + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayRangeDesignator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayRangeDesignator.java index 6df3fb1806a..84cf3d16635 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayRangeDesignator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArrayRangeDesignator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -36,10 +36,17 @@ public class CASTArrayRangeDesignator extends ASTNode implements } public CASTArrayRangeDesignator copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTArrayRangeDesignator copy(CopyStyle style) { CASTArrayRangeDesignator copy = new CASTArrayRangeDesignator(); - copy.setRangeFloor(floor == null ? null : floor.copy()); - copy.setRangeCeiling(ceiling == null ? null : ceiling.copy()); + copy.setRangeFloor(floor == null ? null : floor.copy(style)); + copy.setRangeCeiling(ceiling == null ? null : ceiling.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArraySubscriptExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArraySubscriptExpression.java index 9939349053a..adbeef10a4b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArraySubscriptExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTArraySubscriptExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -41,13 +41,20 @@ public class CASTArraySubscriptExpression extends ASTNode implements } public CASTArraySubscriptExpression copy() { - CASTArraySubscriptExpression copy = new CASTArraySubscriptExpression(); - copy.setArrayExpression(array == null ? null : array.copy()); - copy.setSubscriptExpression(subscript == null ? null : subscript.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CASTArraySubscriptExpression copy(CopyStyle style) { + CASTArraySubscriptExpression copy = new CASTArraySubscriptExpression(); + copy.setArrayExpression(array == null ? null : array.copy(style)); + copy.setSubscriptExpression(subscript == null ? null : subscript.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public IASTExpression getArrayExpression() { return array; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBinaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBinaryExpression.java index 6fb31b32818..dd4519af63c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBinaryExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBinaryExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -45,11 +45,18 @@ public class CASTBinaryExpression extends ASTNode implements } public CASTBinaryExpression copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTBinaryExpression copy(CopyStyle style) { CASTBinaryExpression copy = new CASTBinaryExpression(); copy.op = op; - copy.setOperand1(operand1 == null ? null : operand1.copy()); - copy.setOperand2(operand2 == null ? null : operand2.copy()); + copy.setOperand1(operand1 == null ? null : operand1.copy(style)); + copy.setOperand2(operand2 == null ? null : operand2.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBreakStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBreakStatement.java index 6e677e60cdb..d3a88bab4c4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBreakStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTBreakStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -42,8 +42,15 @@ public class CASTBreakStatement extends ASTNode implements IASTBreakStatement { } public CASTBreakStatement copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTBreakStatement copy(CopyStyle style) { CASTBreakStatement copy = new CASTBreakStatement(); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCaseStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCaseStatement.java index c0cd0b572f0..98ed38a8545 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCaseStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCaseStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -34,8 +34,15 @@ public class CASTCaseStatement extends ASTNode implements IASTCaseStatement, IAS } public CASTCaseStatement copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTCaseStatement copy(CopyStyle style) { CASTCaseStatement copy = new CASTCaseStatement(expression == null ? null : expression.copy()); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCastExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCastExpression.java index fcdc01835a4..69b7e6e32b7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCastExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCastExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -40,11 +40,18 @@ public class CASTCastExpression extends ASTNode implements IASTCastExpression, I } public CASTCastExpression copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTCastExpression copy(CopyStyle style) { CASTCastExpression copy = new CASTCastExpression(); - copy.setTypeId(typeId == null ? null : typeId.copy()); + copy.setTypeId(typeId == null ? null : typeId.copy(style)); IASTExpression operand = getOperand(); - copy.setOperand(operand == null ? null : operand.copy()); + copy.setOperand(operand == null ? null : operand.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompositeTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompositeTypeSpecifier.java index 2c9e70a1a5e..158a3edfe78 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompositeTypeSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompositeTypeSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -44,17 +44,24 @@ public class CASTCompositeTypeSpecifier extends CASTBaseDeclSpecifier implements } public CASTCompositeTypeSpecifier copy() { - CASTCompositeTypeSpecifier copy = new CASTCompositeTypeSpecifier(); - copyCompositeTypeSpecifier(copy); - return copy; + return copy(CopyStyle.withoutLocations); } - protected void copyCompositeTypeSpecifier(CASTCompositeTypeSpecifier copy) { + public CASTCompositeTypeSpecifier copy(CopyStyle style) { + CASTCompositeTypeSpecifier copy = new CASTCompositeTypeSpecifier(); + copyCompositeTypeSpecifier(copy, style); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + + protected void copyCompositeTypeSpecifier(CASTCompositeTypeSpecifier copy, CopyStyle style) { copyBaseDeclSpec(copy); copy.setKey(fKey); - copy.setName(fName == null ? null : fName.copy()); + copy.setName(fName == null ? null : fName.copy(style)); for(IASTDeclaration member : getMembers()) - copy.addMemberDeclaration(member == null ? null : member.copy()); + copy.addMemberDeclaration(member == null ? null : member.copy(style)); } public int getKey() { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatement.java index 8bcff86ccfb..446625861d9 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -29,13 +29,20 @@ public class CASTCompoundStatement extends ASTNode implements IASTCompoundStatem private IScope scope = null; public CASTCompoundStatement copy() { - CASTCompoundStatement copy = new CASTCompoundStatement(); - for (IASTStatement statement : getStatements()) - copy.addStatement(statement == null ? null : statement.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CASTCompoundStatement copy(CopyStyle style) { + CASTCompoundStatement copy = new CASTCompoundStatement(); + for (IASTStatement statement : getStatements()) + copy.addStatement(statement == null ? null : statement.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public IASTStatement[] getStatements() { if (statements == null) return IASTStatement.EMPTY_STATEMENT_ARRAY; return (IASTStatement[]) ArrayUtil.trim(IASTStatement.class, statements); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatementExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatementExpression.java index 0b14d22960c..43008679d9c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatementExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTCompoundStatementExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -37,9 +37,16 @@ public class CASTCompoundStatementExpression extends ASTNode implements IGNUASTC } public CASTCompoundStatementExpression copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTCompoundStatementExpression copy(CopyStyle style) { CASTCompoundStatementExpression copy = new CASTCompoundStatementExpression(); - copy.setCompoundStatement(statement == null ? null : statement.copy()); + copy.setCompoundStatement(statement == null ? null : statement.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTConditionalExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTConditionalExpression.java index 46e03e13739..69774aed6f8 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTConditionalExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTConditionalExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -42,11 +42,18 @@ public class CASTConditionalExpression extends ASTNode implements } public CASTConditionalExpression copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTConditionalExpression copy(CopyStyle style) { CASTConditionalExpression copy = new CASTConditionalExpression(); - copy.setLogicalConditionExpression(condition == null ? null : condition.copy()); - copy.setPositiveResultExpression(positive == null ? null : positive.copy()); - copy.setNegativeResultExpression(negative == null ? null : negative.copy()); + copy.setLogicalConditionExpression(condition == null ? null : condition.copy(style)); + copy.setPositiveResultExpression(positive == null ? null : positive.copy(style)); + copy.setNegativeResultExpression(negative == null ? null : negative.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTContinueStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTContinueStatement.java index 017cd079e58..0edff204ad1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTContinueStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTContinueStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -40,8 +40,15 @@ public class CASTContinueStatement extends ASTNode implements IASTContinueStatem } public CASTContinueStatement copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTContinueStatement copy(CopyStyle style) { CASTContinueStatement copy = new CASTContinueStatement(); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDeclarationStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDeclarationStatement.java index ee1942a5596..2c1055f195c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDeclarationStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDeclarationStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -36,12 +36,19 @@ public class CASTDeclarationStatement extends ASTNode implements IASTDeclaration public CASTDeclarationStatement copy() { - CASTDeclarationStatement copy = new CASTDeclarationStatement(); - copy.setDeclaration(declaration == null ? null : declaration.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CASTDeclarationStatement copy(CopyStyle style) { + CASTDeclarationStatement copy = new CASTDeclarationStatement(); + copy.setDeclaration(declaration == null ? null : declaration.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public IASTDeclaration getDeclaration() { return declaration; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDeclarator.java index 8e85922cdb8..ed669b53a32 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDeclarator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -52,17 +52,24 @@ public class CASTDeclarator extends ASTNode implements IASTDeclarator, IASTAmbig } public CASTDeclarator copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTDeclarator copy(CopyStyle style) { CASTDeclarator copy = new CASTDeclarator(); - copyBaseDeclarator(copy); + copyBaseDeclarator(copy, style); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } - protected void copyBaseDeclarator(CASTDeclarator copy) { - copy.setName(name == null ? null : name.copy()); - copy.setInitializer(initializer == null ? null : initializer.copy()); - copy.setNestedDeclarator(nestedDeclarator == null ? null : nestedDeclarator.copy()); + protected void copyBaseDeclarator(CASTDeclarator copy, CopyStyle style) { + copy.setName(name == null ? null : name.copy(style)); + copy.setInitializer(initializer == null ? null : initializer.copy(style)); + copy.setNestedDeclarator(nestedDeclarator == null ? null : nestedDeclarator.copy(style)); for(IASTPointerOperator pointer : getPointerOperators()) - copy.addPointerOperator(pointer == null ? null : pointer.copy()); + copy.addPointerOperator(pointer == null ? null : pointer.copy(style)); copy.setOffsetAndLength(this); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDefaultStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDefaultStatement.java index d8655f2fa44..c8f11013496 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDefaultStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDefaultStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -40,8 +40,15 @@ public class CASTDefaultStatement extends ASTNode implements IASTDefaultStatemen } public CASTDefaultStatement copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTDefaultStatement copy(CopyStyle style) { CASTDefaultStatement copy = new CASTDefaultStatement(); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDesignatedInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDesignatedInitializer.java index 14a62cfdb37..6ac163ae905 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDesignatedInitializer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDesignatedInitializer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -41,13 +41,21 @@ public class CASTDesignatedInitializer extends ASTNode implements ICASTDesignate } public CASTDesignatedInitializer copy() { - CASTDesignatedInitializer copy = new CASTDesignatedInitializer(rhs == null ? null : rhs.copy()); - for(ICASTDesignator designator : getDesignators()) - copy.addDesignator(designator == null ? null : designator.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CASTDesignatedInitializer copy(CopyStyle style) { + CASTDesignatedInitializer copy = new CASTDesignatedInitializer(rhs == null ? null + : rhs.copy(style)); + for (ICASTDesignator designator : getDesignators()) + copy.addDesignator(designator == null ? null : designator.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public void addDesignator(ICASTDesignator designator) { assertNotFrozen(); if (designator != null) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDoStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDoStatement.java index f67975a1e74..cf9a4b921fd 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDoStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTDoStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -37,13 +37,20 @@ public class CASTDoStatement extends ASTNode implements IASTDoStatement, IASTAmb } public CASTDoStatement copy() { - CASTDoStatement copy = new CASTDoStatement(); - copy.setBody(body == null ? null : body.copy()); - copy.setCondition(condition == null ? null : condition.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CASTDoStatement copy(CopyStyle style) { + CASTDoStatement copy = new CASTDoStatement(); + copy.setBody(body == null ? null : body.copy(style)); + copy.setCondition(condition == null ? null : condition.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public IASTStatement getBody() { return body; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTElaboratedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTElaboratedTypeSpecifier.java index 85735f522ca..49a78944aec 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTElaboratedTypeSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTElaboratedTypeSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -44,11 +44,19 @@ public class CASTElaboratedTypeSpecifier extends CASTBaseDeclSpecifier implement } public CASTElaboratedTypeSpecifier copy() { - CASTElaboratedTypeSpecifier copy = new CASTElaboratedTypeSpecifier(kind, name == null ? null : name.copy()); - copyBaseDeclSpec(copy); - return copy; + return copy(CopyStyle.withoutLocations); } + public CASTElaboratedTypeSpecifier copy(CopyStyle style) { + CASTElaboratedTypeSpecifier copy = new CASTElaboratedTypeSpecifier(kind, name == null + ? null : name.copy(style)); + copyBaseDeclSpec(copy); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public int getKind() { return kind; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerationSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerationSpecifier.java index bdf034e6679..f608ab7fedf 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerationSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerationSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -36,16 +36,23 @@ public class CASTEnumerationSpecifier extends CASTBaseDeclSpecifier } public CASTEnumerationSpecifier copy() { - CASTEnumerationSpecifier copy = new CASTEnumerationSpecifier(); - copyEnumerationSpecifier(copy); - return copy; + return copy(CopyStyle.withoutLocations); } - protected void copyEnumerationSpecifier(CASTEnumerationSpecifier copy) { + public CASTEnumerationSpecifier copy(CopyStyle style) { + CASTEnumerationSpecifier copy = new CASTEnumerationSpecifier(); + copyEnumerationSpecifier(copy, style); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + + protected void copyEnumerationSpecifier(CASTEnumerationSpecifier copy, CopyStyle style) { copyBaseDeclSpec(copy); - copy.setName(name == null ? null : name.copy()); + copy.setName(name == null ? null : name.copy(style)); for(IASTEnumerator enumerator : getEnumerators()) - copy.addEnumerator(enumerator == null ? null : enumerator.copy()); + copy.addEnumerator(enumerator == null ? null : enumerator.copy(style)); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerator.java index 9ec6dbbd240..ae177dd50df 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEnumerator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -28,8 +28,15 @@ public class CASTEnumerator extends ASTEnumerator { } public CASTEnumerator copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTEnumerator copy(CopyStyle style) { CASTEnumerator copy = new CASTEnumerator(); - copyAbstractEnumerator(copy); + copyAbstractEnumerator(copy, style); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEqualsInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEqualsInitializer.java index 41ec7663860..3adfd1895f3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEqualsInitializer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTEqualsInitializer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -26,9 +26,16 @@ public class CASTEqualsInitializer extends ASTEqualsInitializer { } public CASTEqualsInitializer copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTEqualsInitializer copy(CopyStyle style) { IASTInitializerClause arg = getInitializerClause(); - CASTEqualsInitializer copy = new CASTEqualsInitializer(arg == null ? null : arg.copy()); + CASTEqualsInitializer copy = new CASTEqualsInitializer(arg == null ? null : arg.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionList.java index 3216f5cd223..f9ae206921a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionList.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionList.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -30,10 +30,17 @@ public class CASTExpressionList extends ASTNode implements IASTExpressionList, IASTAmbiguityParent { public CASTExpressionList copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTExpressionList copy(CopyStyle style) { CASTExpressionList copy = new CASTExpressionList(); for(IASTExpression expr : getExpressions()) - copy.addExpression(expr == null ? null : expr.copy()); + copy.addExpression(expr == null ? null : expr.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionStatement.java index 82f50113bea..7518341f860 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTExpressionStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -35,9 +35,16 @@ public class CASTExpressionStatement extends ASTNode implements } public CASTExpressionStatement copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTExpressionStatement copy(CopyStyle style) { CASTExpressionStatement copy = new CASTExpressionStatement(); - copy.setExpression(expression == null ? null : expression.copy()); + copy.setExpression(expression == null ? null : expression.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDeclarator.java index e7bc7f185a6..cca54bc845a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDeclarator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -33,12 +33,20 @@ public class CASTFieldDeclarator extends CASTDeclarator implements IASTFieldDecl @Override public CASTFieldDeclarator copy() { - CASTFieldDeclarator copy = new CASTFieldDeclarator(); - copyBaseDeclarator(copy); - copy.setBitFieldSize(bitFieldSize == null ? null : bitFieldSize.copy()); - return copy; + return copy(CopyStyle.withoutLocations); } + @Override + public CASTFieldDeclarator copy(CopyStyle style) { + CASTFieldDeclarator copy = new CASTFieldDeclarator(); + copyBaseDeclarator(copy, style); + copy.setBitFieldSize(bitFieldSize == null ? null : bitFieldSize.copy(style)); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public IASTExpression getBitFieldSize() { return bitFieldSize; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDesignator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDesignator.java index 2cf4a58a08b..2e74509505f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDesignator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldDesignator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -33,8 +33,15 @@ public class CASTFieldDesignator extends ASTNode implements ICASTFieldDesignator } public CASTFieldDesignator copy() { - CASTFieldDesignator copy = new CASTFieldDesignator(name == null ? null : name.copy()); + return copy(CopyStyle.withoutLocations); + } + + public CASTFieldDesignator copy(CopyStyle style) { + CASTFieldDesignator copy = new CASTFieldDesignator(name == null ? null : name.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldReference.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldReference.java index 9b4139e4828..93f6f5d5dc5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldReference.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFieldReference.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -52,11 +52,18 @@ public class CASTFieldReference extends ASTNode implements IASTFieldReference, I } public CASTFieldReference copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTFieldReference copy(CopyStyle style) { CASTFieldReference copy = new CASTFieldReference(); - copy.setFieldOwner(owner == null ? null : owner.copy()); - copy.setFieldName(name == null ? null : name.copy()); + copy.setFieldOwner(owner == null ? null : owner.copy(style)); + copy.setFieldName(name == null ? null : name.copy(style)); copy.ptr = ptr; copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTForStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTForStatement.java index 30e23d5925e..12ffbeda5ad 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTForStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTForStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -44,16 +44,24 @@ public class CASTForStatement extends ASTNode implements IASTForStatement, IASTA } public CASTForStatement copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTForStatement copy(CopyStyle style) { CASTForStatement copy = new CASTForStatement(); - copyForStatement(copy); + copyForStatement(copy, style); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } - protected void copyForStatement(CASTForStatement copy) { - copy.setInitializerStatement(init == null ? null : init.copy()); - copy.setConditionExpression(condition == null ? null : condition.copy()); - copy.setIterationExpression(iterationExpression == null ? null : iterationExpression.copy()); - copy.setBody(body == null ? null : body.copy()); + protected void copyForStatement(CASTForStatement copy, CopyStyle style) { + copy.setInitializerStatement(init == null ? null : init.copy(style)); + copy.setConditionExpression(condition == null ? null : condition.copy(style)); + copy.setIterationExpression(iterationExpression == null ? null : iterationExpression + .copy(style)); + copy.setBody(body == null ? null : body.copy(style)); copy.setOffsetAndLength(this); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFunctionCallExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFunctionCallExpression.java index 1861552ecf0..efd9268ac22 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFunctionCallExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CASTFunctionCallExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -46,20 +46,27 @@ public class CASTFunctionCallExpression extends ASTNode implements } public CASTFunctionCallExpression copy() { + return copy(CopyStyle.withoutLocations); + } + + public CASTFunctionCallExpression copy(CopyStyle style) { IASTInitializerClause[] args = null; if (fArguments.length > 0) { - args= new IASTInitializerClause[fArguments.length]; - for (int i=0; i 0) { args= new IASTInitializerClause[fArguments.length]; for (int i = 0; i < fArguments.length; i++) { - args[i]= fArguments[i].copy(); + args[i] = fArguments[i].copy(style); } } CPPASTFunctionCallExpression copy = new CPPASTFunctionCallExpression(null, args); - copy.setFunctionNameExpression(functionName == null ? null : functionName.copy()); + copy.setFunctionNameExpression(functionName == null ? null : functionName.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDeclarator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDeclarator.java index 3a78876b859..dd68669d0dc 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDeclarator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDeclarator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -51,20 +51,28 @@ public class CPPASTFunctionDeclarator extends CPPASTDeclarator implements ICPPAS @Override public CPPASTFunctionDeclarator copy() { + return copy(CopyStyle.withoutLocations); + } + + @Override + public CPPASTFunctionDeclarator copy(CopyStyle style) { CPPASTFunctionDeclarator copy = new CPPASTFunctionDeclarator(); - copyBaseDeclarator(copy); + copyBaseDeclarator(copy, style); copy.varArgs = varArgs; copy.pureVirtual = pureVirtual; copy.isVolatile = isVolatile; copy.isConst = isConst; - copy.isMutable= isMutable; - - for(IASTParameterDeclaration param : getParameters()) - copy.addParameterDeclaration(param == null ? null : param.copy()); - for(IASTTypeId typeId : getExceptionSpecification()) - copy.addExceptionSpecificationTypeId(typeId == null ? null : typeId.copy()); + copy.isMutable = isMutable; + + for (IASTParameterDeclaration param : getParameters()) + copy.addParameterDeclaration(param == null ? null : param.copy(style)); + for (IASTTypeId typeId : getExceptionSpecification()) + copy.addExceptionSpecificationTypeId(typeId == null ? null : typeId.copy(style)); if (trailingReturnType != null) { - copy.setTrailingReturnType(trailingReturnType.copy()); + copy.setTrailingReturnType(trailingReturnType.copy(style)); + } + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDefinition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDefinition.java index c97f0d506dc..dab0f96ed7b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDefinition.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionDefinition.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -51,23 +51,31 @@ public class CPPASTFunctionDefinition extends ASTNode } public CPPASTFunctionDefinition copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTFunctionDefinition copy(CopyStyle style) { CPPASTFunctionDefinition copy = new CPPASTFunctionDefinition(); - copy.setDeclSpecifier(declSpecifier == null ? null : declSpecifier.copy()); - + copy.setDeclSpecifier(declSpecifier == null ? null : declSpecifier.copy(style)); + if (declarator != null) { IASTDeclarator outer = ASTQueries.findOutermostDeclarator(declarator); - outer = outer.copy(); - copy.setDeclarator((IASTFunctionDeclarator)ASTQueries.findTypeRelevantDeclarator(outer)); - } - - copy.setBody(bodyStatement == null ? null : bodyStatement.copy()); - + outer = outer.copy(style); + copy.setDeclarator((IASTFunctionDeclarator) ASTQueries + .findTypeRelevantDeclarator(outer)); + } + + copy.setBody(bodyStatement == null ? null : bodyStatement.copy(style)); + for (ICPPASTConstructorChainInitializer initializer : getMemberInitializers()) - copy.addMemberInitializer(initializer == null ? null : initializer.copy()); - - copy.fDefaulted= fDefaulted; - copy.fDeleted= fDeleted; + copy.addMemberInitializer(initializer == null ? null : initializer.copy(style)); + + copy.fDefaulted = fDefaulted; + copy.fDeleted = fDeleted; copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java index 46fef1fd2a8..9300b41cf31 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionWithTryBlock.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 Wind River Systems, Inc. and others. + * Copyright (c) 2008, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -35,21 +35,29 @@ public class CPPASTFunctionWithTryBlock extends CPPASTFunctionDefinition impleme @Override public CPPASTFunctionWithTryBlock copy() { + return copy(CopyStyle.withoutLocations); + } + + @Override + public CPPASTFunctionWithTryBlock copy(CopyStyle style) { IASTDeclSpecifier declSpecifier = getDeclSpecifier(); - IASTFunctionDeclarator declarator = getDeclarator(); - IASTStatement bodyStatement = getBody(); - + IASTFunctionDeclarator declarator = getDeclarator(); + IASTStatement bodyStatement = getBody(); + CPPASTFunctionWithTryBlock copy = new CPPASTFunctionWithTryBlock(); - copy.setDeclSpecifier(declSpecifier == null ? null : declSpecifier.copy()); - copy.setDeclarator(declarator == null ? null : declarator.copy()); - copy.setBody(bodyStatement == null ? null : bodyStatement.copy()); - - for(ICPPASTConstructorChainInitializer initializer : getMemberInitializers()) - copy.addMemberInitializer(initializer == null ? null : initializer.copy()); - for(ICPPASTCatchHandler handler : getCatchHandlers()) - copy.addCatchHandler(handler == null ? null : handler.copy()); - + copy.setDeclSpecifier(declSpecifier == null ? null : declSpecifier.copy(style)); + copy.setDeclarator(declarator == null ? null : declarator.copy(style)); + copy.setBody(bodyStatement == null ? null : bodyStatement.copy(style)); + + for (ICPPASTConstructorChainInitializer initializer : getMemberInitializers()) + copy.addMemberInitializer(initializer == null ? null : initializer.copy(style)); + for (ICPPASTCatchHandler handler : getCatchHandlers()) + copy.addCatchHandler(handler == null ? null : handler.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTGotoStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTGotoStatement.java index 87d05d570b4..c94ba46e218 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTGotoStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTGotoStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -31,11 +31,18 @@ public class CPPASTGotoStatement extends ASTNode implements IASTGotoStatement { } public CPPASTGotoStatement copy() { - CPPASTGotoStatement copy = new CPPASTGotoStatement(name == null ? null : name.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTGotoStatement copy(CopyStyle style) { + CPPASTGotoStatement copy = new CPPASTGotoStatement(name == null ? null : name.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public IASTName getName() { return this.name; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIdExpression.java index 7cfa6145335..d4245b9903c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIdExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIdExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -64,8 +64,15 @@ public class CPPASTIdExpression extends ASTNode implements IASTIdExpression, ICP } public CPPASTIdExpression copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTIdExpression copy(CopyStyle style) { CPPASTIdExpression copy = new CPPASTIdExpression(name == null ? null : name.copy()); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIfStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIfStatement.java index c7940c8138b..bc4a0e3adb6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIfStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTIfStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -50,15 +50,21 @@ public class CPPASTIfStatement extends ASTNode implements ICPPASTIfStatement, IA } public CPPASTIfStatement copy() { - CPPASTIfStatement copy = new CPPASTIfStatement(); - copy.setConditionDeclaration(condDecl == null ? null : condDecl.copy()); - copy.setConditionExpression(condition == null ? null : condition.copy()); - copy.setThenClause(thenClause == null ? null : thenClause.copy()); - copy.setElseClause(elseClause == null ? null : elseClause.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTIfStatement copy(CopyStyle style) { + CPPASTIfStatement copy = new CPPASTIfStatement(); + copy.setConditionDeclaration(condDecl == null ? null : condDecl.copy(style)); + copy.setConditionExpression(condition == null ? null : condition.copy(style)); + copy.setThenClause(thenClause == null ? null : thenClause.copy(style)); + copy.setElseClause(elseClause == null ? null : elseClause.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } public IASTExpression getConditionExpression() { return condition; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTImplicitName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTImplicitName.java index c3b5d23df4e..691e88ba554 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTImplicitName.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTImplicitName.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 IBM Corporation and others. + * Copyright (c) 2009, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -43,6 +43,11 @@ public class CPPASTImplicitName extends CPPASTName implements IASTImplicitName { throw new UnsupportedOperationException(); } + @Override + public CPPASTImplicitName copy(CopyStyle style) { + throw new UnsupportedOperationException(); + } + public boolean isAlternate() { return alternate; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerExpression.java index 716501b041a..04c94361966 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -27,10 +27,18 @@ public class CPPASTInitializerExpression extends CPPASTEqualsInitializer impleme @Override public CPPASTInitializerExpression copy() { - CPPASTInitializerExpression copy= new CPPASTInitializerExpression(); - IASTInitializerClause init= getInitializerClause(); - copy.setInitializerClause(init == null ? null : init.copy()); + return copy(CopyStyle.withoutLocations); + } + + @Override + public CPPASTInitializerExpression copy(CopyStyle style) { + CPPASTInitializerExpression copy = new CPPASTInitializerExpression(); + IASTInitializerClause init = getInitializerClause(); + copy.setInitializerClause(init == null ? null : init.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java index 39d86f66c81..52b420d917d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTInitializerList.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -33,15 +33,22 @@ public class CPPASTInitializerList extends ASTNode implements ICPPASTInitializer private boolean fIsPackExpansion; public CPPASTInitializerList copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTInitializerList copy(CopyStyle style) { CPPASTInitializerList copy = new CPPASTInitializerList(); for (IASTInitializerClause initializer : getClauses()) - copy.addClause(initializer == null ? null : initializer.copy()); + copy.addClause(initializer == null ? null : initializer.copy(style)); copy.setOffsetAndLength(this); copy.actualSize = getSize(); copy.fIsPackExpansion = fIsPackExpansion; + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } - + public int getSize() { return actualSize; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java index f5b9a22b03b..8a520b62496 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLabelStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -37,10 +37,17 @@ public class CPPASTLabelStatement extends ASTNode implements } public CPPASTLabelStatement copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTLabelStatement copy(CopyStyle style) { CPPASTLabelStatement copy = new CPPASTLabelStatement(); - copy.setName(name == null ? null : name.copy()); - copy.setNestedStatement(nestedStatement == null ? null : nestedStatement.copy()); + copy.setName(name == null ? null : name.copy(style)); + copy.setNestedStatement(nestedStatement == null ? null : nestedStatement.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLambdaExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLambdaExpression.java index 8146049ed45..5da8b25b7b5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLambdaExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLambdaExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2010, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -17,7 +17,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCapture; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLambdaExpression; import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction; - import org.eclipse.cdt.core.parser.util.ArrayUtil; import org.eclipse.cdt.internal.core.dom.parser.ASTNode; @@ -45,23 +44,30 @@ public class CPPASTLambdaExpression extends ASTNode implements ICPPASTLambdaExpr * @see org.eclipse.cdt.core.dom.ast.IASTExpression#copy() */ public CPPASTLambdaExpression copy() { - CPPASTLambdaExpression result= new CPPASTLambdaExpression(); - result.fCaptureDefault= fCaptureDefault; + return copy(CopyStyle.withoutLocations); + } + + public CPPASTLambdaExpression copy(CopyStyle style) { + CPPASTLambdaExpression result = new CPPASTLambdaExpression(); + result.fCaptureDefault = fCaptureDefault; if (fCaptures != null) { for (ICPPASTCapture capture : fCaptures) { if (capture != null) { - result.addCapture(capture.copy()); + result.addCapture(capture.copy(style)); } } } if (fDeclarator != null) { - result.setDeclarator(fDeclarator.copy()); + result.setDeclarator(fDeclarator.copy(style)); } if (fBody != null) { - result.setBody(fBody.copy()); + result.setBody(fBody.copy(style)); } - + result.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + result.setCopyLocation(this); + } return result; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLinkageSpecification.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLinkageSpecification.java index 4a7bab61d52..6ec8a895c92 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLinkageSpecification.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLinkageSpecification.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -38,13 +38,19 @@ public class CPPASTLinkageSpecification extends ASTNode implements } public CPPASTLinkageSpecification copy() { - CPPASTLinkageSpecification copy = new CPPASTLinkageSpecification(fLiteral); - for(IASTDeclaration declaration : getDeclarations()) - copy.addDeclaration(declaration == null ? null : declaration.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTLinkageSpecification copy(CopyStyle style) { + CPPASTLinkageSpecification copy = new CPPASTLinkageSpecification(fLiteral); + for (IASTDeclaration declaration : getDeclarations()) + copy.addDeclaration(declaration == null ? null : declaration.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } public String getLiteral() { return fLiteral; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java index bcc05fa633f..c496bb8a71a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTLiteralExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -45,11 +45,19 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx } public CPPASTLiteralExpression copy() { - CPPASTLiteralExpression copy = new CPPASTLiteralExpression(kind, value == null ? null : value.clone()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTLiteralExpression copy(CopyStyle style) { + CPPASTLiteralExpression copy = new CPPASTLiteralExpression(kind, value == null ? null + : value.clone()); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public int getKind() { return kind; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTName.java index 75474bfcb35..9a4d26cb47e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTName.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTName.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -46,8 +46,15 @@ public class CPPASTName extends CPPASTNameBase implements ICPPASTCompletionConte } public CPPASTName copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTName copy(CopyStyle style) { CPPASTName copy = new CPPASTName(name == null ? null : name.clone()); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java index d7714baec74..deeaa049047 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamedTypeSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -41,9 +41,17 @@ public class CPPASTNamedTypeSpecifier extends CPPASTBaseDeclSpecifier implements } public CPPASTNamedTypeSpecifier copy() { - CPPASTNamedTypeSpecifier copy = new CPPASTNamedTypeSpecifier(name == null ? null : name.copy()); + return copy(CopyStyle.withoutLocations); + } + + public CPPASTNamedTypeSpecifier copy(CopyStyle style) { + CPPASTNamedTypeSpecifier copy = new CPPASTNamedTypeSpecifier(name == null ? null + : name.copy(style)); copyBaseDeclSpec(copy); copy.typename = typename; + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceAlias.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceAlias.java index a83375723e7..f4d3511452f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceAlias.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceAlias.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -34,10 +34,17 @@ public class CPPASTNamespaceAlias extends ASTNode implements ICPPASTNamespaceAli } public CPPASTNamespaceAlias copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTNamespaceAlias copy(CopyStyle style) { CPPASTNamespaceAlias copy = new CPPASTNamespaceAlias(); - copy.setAlias(alias == null ? null : alias.copy()); - copy.setMappingName(qualifiedName == null ? null : qualifiedName.copy()); + copy.setAlias(alias == null ? null : alias.copy(style)); + copy.setMappingName(qualifiedName == null ? null : qualifiedName.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceDefinition.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceDefinition.java index a59343dc62e..af185a8ea65 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceDefinition.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNamespaceDefinition.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -43,14 +43,22 @@ public class CPPASTNamespaceDefinition extends ASTNode implements } public CPPASTNamespaceDefinition copy() { - CPPASTNamespaceDefinition copy = new CPPASTNamespaceDefinition(fName == null ? null : fName.copy()); - copy.fIsInline= fIsInline; - for(IASTDeclaration declaration : getDeclarations()) - copy.addDeclaration(declaration == null ? null : declaration.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTNamespaceDefinition copy(CopyStyle style) { + CPPASTNamespaceDefinition copy = new CPPASTNamespaceDefinition(fName == null ? null + : fName.copy(style)); + copy.fIsInline = fIsInline; + for (IASTDeclaration declaration : getDeclarations()) + copy.addDeclaration(declaration == null ? null : declaration.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public IASTName getName() { return fName; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNewExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNewExpression.java index 6002248ed02..2e143721520 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNewExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNewExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -60,19 +60,26 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression } public CPPASTNewExpression copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTNewExpression copy(CopyStyle style) { CPPASTNewExpression copy = new CPPASTNewExpression(); copy.setIsGlobal(isGlobal); copy.setIsNewTypeId(isNewTypeId); if (placement != null) { IASTInitializerClause[] plcmt = new IASTInitializerClause[placement.length]; - for (int i= 0; i < placement.length; i++) { - plcmt[i]= placement[i].copy(); + for (int i = 0; i < placement.length; i++) { + plcmt[i] = placement[i].copy(style); } copy.setPlacementArguments(plcmt); } - copy.setTypeId(typeId == null ? null : typeId.copy()); - copy.setInitializer(initializer == null ? null : initializer.copy()); + copy.setTypeId(typeId == null ? null : typeId.copy(style)); + copy.setInitializer(initializer == null ? null : initializer.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNullStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNullStatement.java index fb8ca54c012..d22cb9f72cb 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNullStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTNullStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -39,8 +39,15 @@ public class CPPASTNullStatement extends ASTNode implements IASTNullStatement { } public CPPASTNullStatement copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTNullStatement copy(CopyStyle style) { CPPASTNullStatement copy = new CPPASTNullStatement(); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTOperatorName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTOperatorName.java index aa0b5757a57..0c59adb83fd 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTOperatorName.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTOperatorName.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -30,9 +30,17 @@ public class CPPASTOperatorName extends CPPASTName implements ICPPASTOperatorNam @Override public CPPASTOperatorName copy() { + return copy(CopyStyle.withoutLocations); + } + + @Override + public CPPASTOperatorName copy(CopyStyle style) { char[] name = toCharArray(); CPPASTOperatorName copy = new CPPASTOperatorName(name == null ? null : name.clone()); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPackExpansionExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPackExpansionExpression.java index cadd07aec6c..3907dd7ccd4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPackExpansionExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPackExpansionExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2009, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -46,8 +46,15 @@ public class CPPASTPackExpansionExpression extends ASTNode implements ICPPASTPac } public CPPASTPackExpansionExpression copy() { - CPPASTPackExpansionExpression copy = new CPPASTPackExpansionExpression(fPattern.copy()); + return copy(CopyStyle.withoutLocations); + } + + public CPPASTPackExpansionExpression copy(CopyStyle style) { + CPPASTPackExpansionExpression copy = new CPPASTPackExpansionExpression(fPattern.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTParameterDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTParameterDeclaration.java index a1fb49a3ae8..7fa03b047a4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTParameterDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTParameterDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -42,10 +42,17 @@ public class CPPASTParameterDeclaration extends ASTNode implements ICPPASTParame } public CPPASTParameterDeclaration copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTParameterDeclaration copy(CopyStyle style) { CPPASTParameterDeclaration copy = new CPPASTParameterDeclaration(); - copy.setDeclSpecifier(fDeclSpec == null ? null : fDeclSpec.copy()); - copy.setDeclarator(fDeclarator == null ? null : fDeclarator.copy()); + copy.setDeclSpecifier(fDeclSpec == null ? null : fDeclSpec.copy(style)); + copy.setDeclarator(fDeclarator == null ? null : fDeclarator.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointer.java index 7b3ed009b83..ffd5f7d806e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -28,14 +28,21 @@ public class CPPASTPointer extends ASTNode implements IASTPointer { } public CPPASTPointer copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTPointer copy(CopyStyle style) { CPPASTPointer copy = new CPPASTPointer(); copy.isConst = isConst; copy.isVolatile = isVolatile; copy.isRestrict = isRestrict; copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } - + public boolean isConst() { return isConst; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointerToMember.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointerToMember.java index 8b4b82e0258..adbd9bc2d7e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointerToMember.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTPointerToMember.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -28,14 +28,22 @@ public class CPPASTPointerToMember extends CPPASTPointer implements ICPPASTPoint @Override public CPPASTPointerToMember copy() { - CPPASTPointerToMember copy = new CPPASTPointerToMember(n == null ? null : n.copy()); + return copy(CopyStyle.withoutLocations); + } + + @Override + public CPPASTPointerToMember copy(CopyStyle style) { + CPPASTPointerToMember copy = new CPPASTPointerToMember(n == null ? null : n.copy(style)); copy.setConst(isConst()); copy.setVolatile(isVolatile()); copy.setRestrict(isRestrict()); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } - + public void setName(IASTName name) { assertNotFrozen(); n = name; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblem.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblem.java index eb0b39db11e..7852ed3aec5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblem.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblem.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -26,9 +26,17 @@ public class CPPASTProblem extends ASTProblem { @Override public CPPASTProblem copy() { + return copy(CopyStyle.withoutLocations); + } + + @Override + public CPPASTProblem copy(CopyStyle style) { char[] arg = getArgument(); CPPASTProblem problem = new CPPASTProblem(getID(), arg == null ? null : arg.clone(), isError()); problem.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + problem.setCopyLocation(this); + } return problem; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemDeclaration.java index 9390052613f..827d0254a6f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -29,11 +29,17 @@ public class CPPASTProblemDeclaration extends CPPASTProblemOwner implements IAST } public CPPASTProblemDeclaration copy() { - CPPASTProblemDeclaration copy = new CPPASTProblemDeclaration(); - copyBaseProblem(copy); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTProblemDeclaration copy(CopyStyle style) { + CPPASTProblemDeclaration copy = new CPPASTProblemDeclaration(); + copyBaseProblem(copy, style); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } @Override public boolean accept( ASTVisitor action ){ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemExpression.java index 441beb859f0..ed15e0d26aa 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -29,11 +29,18 @@ public class CPPASTProblemExpression extends CPPASTProblemOwner implements IASTP } public CPPASTProblemExpression copy() { - CPPASTProblemExpression copy = new CPPASTProblemExpression(); - copyBaseProblem(copy); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTProblemExpression copy(CopyStyle style) { + CPPASTProblemExpression copy = new CPPASTProblemExpression(); + copyBaseProblem(copy, style); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + @Override public boolean accept( ASTVisitor action ){ if( action.shouldVisitExpressions ){ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemOwner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemOwner.java index 76254c51c96..40ceefd5ee1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemOwner.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemOwner.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -31,8 +31,8 @@ abstract class CPPASTProblemOwner extends ASTNode implements IASTProblemHolder { setProblem(problem); } - protected void copyBaseProblem(CPPASTProblemOwner copy) { - copy.setProblem(problem == null ? null : problem.copy()); + protected void copyBaseProblem(CPPASTProblemOwner copy, CopyStyle style) { + copy.setProblem(problem == null ? null : problem.copy(style)); copy.setOffsetAndLength(this); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemStatement.java index 718de9bbe44..aa3f432a038 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -29,8 +29,15 @@ public class CPPASTProblemStatement extends CPPASTProblemOwner implements IASTPr } public CPPASTProblemStatement copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTProblemStatement copy(CopyStyle style) { CPPASTProblemStatement copy = new CPPASTProblemStatement(); - copyBaseProblem(copy); + copyBaseProblem(copy, style); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemTypeId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemTypeId.java index 4b03a299175..1d4f2dd61b3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemTypeId.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTProblemTypeId.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -29,11 +29,18 @@ public class CPPASTProblemTypeId extends CPPASTProblemOwner implements IASTProbl } public CPPASTProblemTypeId copy() { - CPPASTProblemTypeId copy = new CPPASTProblemTypeId(); - copyBaseProblem(copy); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTProblemTypeId copy(CopyStyle style) { + CPPASTProblemTypeId copy = new CPPASTProblemTypeId(); + copyBaseProblem(copy, style); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + @Override public final boolean accept (ASTVisitor action) { if (action.shouldVisitTypeIds) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java index 01c44a1b427..b47c9ed587d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTQualifiedName.java @@ -64,14 +64,21 @@ public class CPPASTQualifiedName extends CPPASTNameBase } public CPPASTQualifiedName copy() { - CPPASTQualifiedName copy = new CPPASTQualifiedName(); - for(IASTName name : getNames()) - copy.addName(name == null ? null : name.copy()); - copy.setFullyQualified(isFullyQualified); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTQualifiedName copy(CopyStyle style) { + CPPASTQualifiedName copy = new CPPASTQualifiedName(); + for (IASTName name : getNames()) + copy.addName(name == null ? null : name.copy(style)); + copy.setFullyQualified(isFullyQualified); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + @Override public final IBinding resolvePreBinding() { // The full qualified name resolves to the same thing as the last name diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTRangeBasedForStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTRangeBasedForStatement.java index cbfc8850406..49c84b0bbfa 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTRangeBasedForStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTRangeBasedForStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2010, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -33,14 +33,21 @@ public class CPPASTRangeBasedForStatement extends ASTNode implements ICPPASTRang } public CPPASTRangeBasedForStatement copy() { - CPPASTRangeBasedForStatement copy = new CPPASTRangeBasedForStatement(); - copy.setDeclaration(fDeclaration == null ? null : fDeclaration.copy()); - copy.setInitializerClause(fInitClause == null ? null : fInitClause.copy()); - copy.setBody(fBody == null ? null : fBody.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTRangeBasedForStatement copy(CopyStyle style) { + CPPASTRangeBasedForStatement copy = new CPPASTRangeBasedForStatement(); + copy.setDeclaration(fDeclaration == null ? null : fDeclaration.copy(style)); + copy.setInitializerClause(fInitClause == null ? null : fInitClause.copy(style)); + copy.setBody(fBody == null ? null : fBody.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public IASTDeclaration getDeclaration() { return fDeclaration; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReferenceOperator.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReferenceOperator.java index 3eb09471a76..3820b979e29 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReferenceOperator.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReferenceOperator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -31,11 +31,18 @@ public class CPPASTReferenceOperator extends ASTNode implements ICPPASTReference } public CPPASTReferenceOperator copy() { - CPPASTReferenceOperator copy = new CPPASTReferenceOperator(fIsRValue); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTReferenceOperator copy(CopyStyle style) { + CPPASTReferenceOperator copy = new CPPASTReferenceOperator(fIsRValue); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + @Override public boolean accept(ASTVisitor action) { if (action.shouldVisitPointerOperators) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReturnStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReturnStatement.java index 36bea044360..2e959841e14 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReturnStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTReturnStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -31,11 +31,19 @@ public class CPPASTReturnStatement extends ASTNode implements IASTReturnStatemen } public CPPASTReturnStatement copy() { - CPPASTReturnStatement copy = new CPPASTReturnStatement(retValue == null ? null : retValue.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTReturnStatement copy(CopyStyle style) { + CPPASTReturnStatement copy = new CPPASTReturnStatement(retValue == null ? null + : retValue.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public IASTInitializerClause getReturnArgument() { return retValue; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java index 33586a33689..3ceeed83ac9 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -31,12 +31,19 @@ public class CPPASTSimpleDeclSpecifier extends CPPASTBaseDeclSpecifier implement private IASTExpression fDeclTypeExpression; public CPPASTSimpleDeclSpecifier copy() { - CPPASTSimpleDeclSpecifier copy = new CPPASTSimpleDeclSpecifier(); - copySimpleDeclSpec(copy); - return copy; + return copy(CopyStyle.withoutLocations); } - protected void copySimpleDeclSpec(CPPASTSimpleDeclSpecifier other) { + public CPPASTSimpleDeclSpecifier copy(CopyStyle style) { + CPPASTSimpleDeclSpecifier copy = new CPPASTSimpleDeclSpecifier(); + copySimpleDeclSpec(copy, style); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + + protected void copySimpleDeclSpec(CPPASTSimpleDeclSpecifier other, CopyStyle style) { copyBaseDeclSpec(other); other.type = type; other.isSigned = isSigned; @@ -47,7 +54,7 @@ public class CPPASTSimpleDeclSpecifier extends CPPASTBaseDeclSpecifier implement other.isComplex= isComplex; other.isImaginary= isImaginary; if (fDeclTypeExpression != null) { - other.setDeclTypeExpression(fDeclTypeExpression.copy()); + other.setDeclTypeExpression(fDeclTypeExpression.copy(style)); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclaration.java index d8eab881ccb..0c267bf370b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -33,14 +33,21 @@ public class CPPASTSimpleDeclaration extends ASTNode implements IASTSimpleDeclar } public CPPASTSimpleDeclaration copy() { - CPPASTSimpleDeclaration copy = new CPPASTSimpleDeclaration(); - copy.setDeclSpecifier(declSpecifier == null ? null : declSpecifier.copy()); - for (IASTDeclarator declarator : getDeclarators()) - copy.addDeclarator(declarator == null ? null : declarator.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTSimpleDeclaration copy(CopyStyle style) { + CPPASTSimpleDeclaration copy = new CPPASTSimpleDeclaration(); + copy.setDeclSpecifier(declSpecifier == null ? null : declSpecifier.copy(style)); + for (IASTDeclarator declarator : getDeclarators()) + copy.addDeclarator(declarator == null ? null : declarator.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public IASTDeclSpecifier getDeclSpecifier() { return declSpecifier; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeConstructorExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeConstructorExpression.java index 6d0750e5ab3..7b900ae9bea 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeConstructorExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeConstructorExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -23,7 +23,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorInitializer; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTSimpleTypeConstructorExpression; import org.eclipse.cdt.core.dom.ast.cpp.ICPPBasicType; - import org.eclipse.cdt.internal.core.dom.parser.ASTNode; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor; @@ -42,13 +41,20 @@ public class CPPASTSimpleTypeConstructorExpression extends ASTNode implements } public CPPASTSimpleTypeConstructorExpression copy() { - CPPASTSimpleTypeConstructorExpression copy = new CPPASTSimpleTypeConstructorExpression(); - copy.setDeclSpecifier(fDeclSpec == null ? null : fDeclSpec.copy()); - copy.setInitializer(fInitializer == null ? null : fInitializer.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTSimpleTypeConstructorExpression copy(CopyStyle style) { + CPPASTSimpleTypeConstructorExpression copy = new CPPASTSimpleTypeConstructorExpression(); + copy.setDeclSpecifier(fDeclSpec == null ? null : fDeclSpec.copy(style)); + copy.setInitializer(fInitializer == null ? null : fInitializer.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public ICPPASTDeclSpecifier getDeclSpecifier() { return fDeclSpec; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeTemplateParameter.java index 2b8499140da..f500530f862 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeTemplateParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSimpleTypeTemplateParameter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -37,16 +37,22 @@ public class CPPASTSimpleTypeTemplateParameter extends ASTNode implements ICPPAS } public CPPASTSimpleTypeTemplateParameter copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTSimpleTypeTemplateParameter copy(CopyStyle style) { CPPASTSimpleTypeTemplateParameter copy = new CPPASTSimpleTypeTemplateParameter(); copy.fUsesKeywordClass = fUsesKeywordClass; - copy.fIsParameterPack= fIsParameterPack; - copy.setName(fName == null ? null : fName.copy()); - copy.setDefaultType(fTypeId == null ? null : fTypeId.copy()); + copy.fIsParameterPack = fIsParameterPack; + copy.setName(fName == null ? null : fName.copy(style)); + copy.setDefaultType(fTypeId == null ? null : fTypeId.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } - public boolean isParameterPack() { return fIsParameterPack; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTStaticAssertionDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTStaticAssertionDeclaration.java index a49bacda4ef..6f2a8d8f461 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTStaticAssertionDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTStaticAssertionDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009 Wind River Systems, Inc. and others. + * Copyright (c) 2009, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -46,13 +46,21 @@ public class CPPASTStaticAssertionDeclaration extends ASTNode implements ICPPAST public CPPASTStaticAssertionDeclaration copy() { - final IASTExpression condCopy = fCondition == null ? null : fCondition.copy(); - final ICPPASTLiteralExpression msgCopy = fMessage == null ? null : fMessage.copy(); - CPPASTStaticAssertionDeclaration copy = new CPPASTStaticAssertionDeclaration(condCopy, msgCopy); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTStaticAssertionDeclaration copy(CopyStyle style) { + final IASTExpression condCopy = fCondition == null ? null : fCondition.copy(style); + final ICPPASTLiteralExpression msgCopy = fMessage == null ? null : fMessage.copy(style); + CPPASTStaticAssertionDeclaration copy = new CPPASTStaticAssertionDeclaration(condCopy, + msgCopy); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + @Override public boolean accept( ASTVisitor action ){ if (action.shouldVisitDeclarations) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSwitchStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSwitchStatement.java index 3bbc43e61d3..df3cb525348 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSwitchStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTSwitchStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -47,11 +47,20 @@ public class CPPASTSwitchStatement extends ASTNode implements } public CPPASTSwitchStatement copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTSwitchStatement copy(CopyStyle style) { CPPASTSwitchStatement copy = new CPPASTSwitchStatement(); - copy.setControllerDeclaration(controllerDeclaration == null ? null : controllerDeclaration.copy()); - copy.setControllerExpression(controllerExpression == null ? null : controllerExpression.copy()); - copy.setBody(body == null ? null : body.copy()); + copy.setControllerDeclaration(controllerDeclaration == null ? null : controllerDeclaration + .copy(style)); + copy.setControllerExpression(controllerExpression == null ? null : controllerExpression + .copy(style)); + copy.setBody(body == null ? null : body.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateDeclaration.java index a6ac9a21bdf..11915db84f6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -43,15 +43,22 @@ public class CPPASTTemplateDeclaration extends ASTNode implements } public CPPASTTemplateDeclaration copy() { - CPPASTTemplateDeclaration copy = new CPPASTTemplateDeclaration(); - copy.setDeclaration(declaration == null ? null : declaration.copy()); - copy.exported = exported; - for (ICPPASTTemplateParameter param : getTemplateParameters()) - copy.addTemplateParameter(param == null ? null : param.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTTemplateDeclaration copy(CopyStyle style) { + CPPASTTemplateDeclaration copy = new CPPASTTemplateDeclaration(); + copy.setDeclaration(declaration == null ? null : declaration.copy(style)); + copy.exported = exported; + for (ICPPASTTemplateParameter param : getTemplateParameters()) + copy.addTemplateParameter(param == null ? null : param.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public boolean isExported() { return exported; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateId.java index 39a045765fa..a6b05cc27ef 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateId.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateId.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -47,13 +47,21 @@ public class CPPASTTemplateId extends CPPASTNameBase implements ICPPASTTemplateI } public CPPASTTemplateId copy() { - CPPASTTemplateId copy = new CPPASTTemplateId(templateName == null ? null : templateName.copy()); - for(IASTNode arg : getTemplateArguments()) - copy.internalAddTemplateArgument(arg == null ? null : arg.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTTemplateId copy(CopyStyle style) { + CPPASTTemplateId copy = new CPPASTTemplateId(templateName == null ? null + : templateName.copy(style)); + for (IASTNode arg : getTemplateArguments()) + copy.internalAddTemplateArgument(arg == null ? null : arg.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public char[] getSimpleID() { return templateName.getSimpleID(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateSpecialization.java index ee767bca20f..84501177ac4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateSpecialization.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplateSpecialization.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -41,9 +41,16 @@ public class CPPASTTemplateSpecialization extends ASTNode implements } public CPPASTTemplateSpecialization copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTTemplateSpecialization copy(CopyStyle style) { CPPASTTemplateSpecialization copy = new CPPASTTemplateSpecialization(); - copy.setDeclaration(declaration == null ? null : declaration.copy()); + copy.setDeclaration(declaration == null ? null : declaration.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplatedTypeTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplatedTypeTemplateParameter.java index 61108f715b3..d68d7a8cfe5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplatedTypeTemplateParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTemplatedTypeTemplateParameter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -41,13 +41,20 @@ public class CPPASTTemplatedTypeTemplateParameter extends ASTNode implements } public CPPASTTemplatedTypeTemplateParameter copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTTemplatedTypeTemplateParameter copy(CopyStyle style) { CPPASTTemplatedTypeTemplateParameter copy = new CPPASTTemplatedTypeTemplateParameter(); - copy.setName(fName == null ? null : fName.copy()); - copy.setDefaultValue(fDefaultValue == null ? null : fDefaultValue.copy()); - copy.fIsParameterPack= fIsParameterPack; - for(ICPPASTTemplateParameter param : getTemplateParameters()) - copy.addTemplateParameter(param == null ? null : param.copy()); + copy.setName(fName == null ? null : fName.copy(style)); + copy.setDefaultValue(fDefaultValue == null ? null : fDefaultValue.copy(style)); + copy.fIsParameterPack = fIsParameterPack; + for (ICPPASTTemplateParameter param : getTemplateParameters()) + copy.addTemplateParameter(param == null ? null : param.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java index 3476a861bce..dca3ec00c5e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTranslationUnit.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -46,11 +46,18 @@ public class CPPASTTranslationUnit extends ASTTranslationUnit implements ICPPAST } public CPPASTTranslationUnit copy() { - CPPASTTranslationUnit copy = new CPPASTTranslationUnit(); - copyAbstractTU(copy); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTTranslationUnit copy(CopyStyle style) { + CPPASTTranslationUnit copy = new CPPASTTranslationUnit(); + copyAbstractTU(copy, style); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public CPPNamespaceScope getScope() { if (fScope == null) { fScope = new CPPNamespaceScope(this); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTryBlockStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTryBlockStatement.java index 6db67c78c60..b51237f549c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTryBlockStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTryBlockStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -34,13 +34,21 @@ public class CPPASTTryBlockStatement extends ASTNode implements ICPPASTTryBlockS } public CPPASTTryBlockStatement copy() { - CPPASTTryBlockStatement copy = new CPPASTTryBlockStatement(tryBody == null ? null : tryBody.copy()); - for(ICPPASTCatchHandler handler : getCatchHandlers()) - copy.addCatchHandler(handler == null ? null : handler.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTTryBlockStatement copy(CopyStyle style) { + CPPASTTryBlockStatement copy = new CPPASTTryBlockStatement(tryBody == null ? null + : tryBody.copy(style)); + for (ICPPASTCatchHandler handler : getCatchHandlers()) + copy.addCatchHandler(handler == null ? null : handler.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public void addCatchHandler(ICPPASTCatchHandler statement) { assertNotFrozen(); if (statement != null) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeId.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeId.java index 9bd8015d4da..df257e248c2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeId.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeId.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -36,11 +36,18 @@ public class CPPASTTypeId extends ASTNode implements ICPPASTTypeId { } public CPPASTTypeId copy() { + return copy(CopyStyle.withoutLocations); + } + + public CPPASTTypeId copy(CopyStyle style) { CPPASTTypeId copy = new CPPASTTypeId(); - copy.setDeclSpecifier(declSpec == null ? null : declSpec.copy()); - copy.setAbstractDeclarator(absDecl == null ? null : absDecl.copy()); + copy.setDeclSpecifier(declSpec == null ? null : declSpec.copy(style)); + copy.setAbstractDeclarator(absDecl == null ? null : absDecl.copy(style)); copy.setOffsetAndLength(this); - copy.isPackExpansion= isPackExpansion; + copy.isPackExpansion = isPackExpansion; + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdExpression.java index 664461a36a8..051ceebb50b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -35,11 +35,19 @@ public class CPPASTTypeIdExpression extends ASTNode implements ICPPASTTypeIdExpr } public CPPASTTypeIdExpression copy() { - CPPASTTypeIdExpression copy = new CPPASTTypeIdExpression(op, typeId == null ? null : typeId.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTTypeIdExpression copy(CopyStyle style) { + CPPASTTypeIdExpression copy = new CPPASTTypeIdExpression(op, typeId == null ? null + : typeId.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public int getOperator() { return op; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdInitializerExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdInitializerExpression.java index a68ba91ef0b..e54ddbc4b10 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdInitializerExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypeIdInitializerExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2009, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -32,11 +32,15 @@ public class CPPASTTypeIdInitializerExpression extends ASTTypeIdInitializerExpre } public IASTTypeIdInitializerExpression copy() { - CPPASTTypeIdInitializerExpression expr= new CPPASTTypeIdInitializerExpression(); - initializeCopy(expr); - return expr; + return copy(CopyStyle.withoutLocations); } + public IASTTypeIdInitializerExpression copy(CopyStyle style) { + CPPASTTypeIdInitializerExpression expr = new CPPASTTypeIdInitializerExpression(); + initializeCopy(expr, style); + return expr; + } + public IType getExpressionType() { final IASTTypeId typeId = getTypeId(); return prvalueType(CPPVisitor.createType(typeId.getAbstractDeclarator())); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypenameExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypenameExpression.java index 39030d0c3b0..4046ed7eb19 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypenameExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTTypenameExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -32,16 +32,24 @@ public class CPPASTTypenameExpression extends CPPASTSimpleTypeConstructorExpress @Override public CPPASTTypenameExpression copy() { - super.copy(); + return copy(CopyStyle.withoutLocations); + } + + @Override + public CPPASTTypenameExpression copy(CopyStyle style) { + super.copy(style); CPPASTTypenameExpression copy = new CPPASTTypenameExpression(); ICPPASTDeclSpecifier declSpec = getDeclSpecifier(); IASTInitializer init = getInitializer(); - copy.setDeclSpecifier(declSpec == null ? null : declSpec.copy()); - copy.setInitializer(init == null ? null : init.copy()); + copy.setDeclSpecifier(declSpec == null ? null : declSpec.copy(style)); + copy.setInitializer(init == null ? null : init.copy(style)); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } - + public void setName(IASTName name) { CPPASTNamedTypeSpecifier spec= new CPPASTNamedTypeSpecifier(name); spec.setOffsetAndLength(this); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java index 1a70e2925c6..84bec4e2177 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying masterials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -15,7 +15,10 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp; import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.LVALUE; import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.PRVALUE; -import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.*; +import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.glvalueType; +import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.prvalueType; +import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.typeFromFunctionCall; +import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes.valueCategoryFromFunctionCall; import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.CVTYPE; import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.REF; import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.TDEF; @@ -70,11 +73,19 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres } public CPPASTUnaryExpression copy() { - CPPASTUnaryExpression copy = new CPPASTUnaryExpression(op, operand == null ? null : operand.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTUnaryExpression copy(CopyStyle style) { + CPPASTUnaryExpression copy = new CPPASTUnaryExpression(op, operand == null ? null + : operand.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public int getOperator() { return op; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDeclaration.java index ec1a638d73e..8a81878f2b4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDeclaration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -39,12 +39,20 @@ public class CPPASTUsingDeclaration extends ASTNode } public CPPASTUsingDeclaration copy() { - CPPASTUsingDeclaration copy = new CPPASTUsingDeclaration(name == null ? null : name.copy()); - copy.typeName = typeName; - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTUsingDeclaration copy(CopyStyle style) { + CPPASTUsingDeclaration copy = new CPPASTUsingDeclaration(name == null ? null + : name.copy(style)); + copy.typeName = typeName; + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public void setIsTypename(boolean value) { assertNotFrozen(); this.typeName = value; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDirective.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDirective.java index 3335e94cfe7..0ef0d20e50d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDirective.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUsingDirective.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -37,11 +37,18 @@ public class CPPASTUsingDirective extends ASTNode implements } public CPPASTUsingDirective copy() { - CPPASTUsingDirective copy = new CPPASTUsingDirective(name == null ? null : name.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTUsingDirective copy(CopyStyle style) { + CPPASTUsingDirective copy = new CPPASTUsingDirective(name == null ? null : name.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public IASTName getQualifiedName() { return name; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTVisibilityLabel.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTVisibilityLabel.java index 8e09b0ec70d..de7af9f7dbe 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTVisibilityLabel.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTVisibilityLabel.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -30,11 +30,18 @@ public class CPPASTVisibilityLabel extends ASTNode implements ICPPASTVisibilityL } public CPPASTVisibilityLabel copy() { - CPPASTVisibilityLabel copy = new CPPASTVisibilityLabel(visibility); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTVisibilityLabel copy(CopyStyle style) { + CPPASTVisibilityLabel copy = new CPPASTVisibilityLabel(visibility); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public int getVisibility() { return visibility; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTWhileStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTWhileStatement.java index adf4de84109..b28b6fc5169 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTWhileStatement.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTWhileStatement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -45,14 +45,21 @@ public class CPPASTWhileStatement extends ASTNode } public CPPASTWhileStatement copy() { - CPPASTWhileStatement copy = new CPPASTWhileStatement(); - copy.setConditionDeclaration(condition2 == null ? null : condition2.copy()); - copy.setCondition(condition == null ? null : condition.copy()); - copy.setBody(body == null ? null : body.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public CPPASTWhileStatement copy(CopyStyle style) { + CPPASTWhileStatement copy = new CPPASTWhileStatement(); + copy.setConditionDeclaration(condition2 == null ? null : condition2.copy(style)); + copy.setCondition(condition == null ? null : condition.copy(style)); + copy.setBody(body == null ? null : body.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public IASTExpression getCondition() { return condition; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTExplicitTemplateInstantiation.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTExplicitTemplateInstantiation.java index 306defd63b3..b448edc6823 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTExplicitTemplateInstantiation.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTExplicitTemplateInstantiation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -31,11 +31,19 @@ public class GPPASTExplicitTemplateInstantiation extends @Override public GPPASTExplicitTemplateInstantiation copy() { + return copy(CopyStyle.withoutLocations); + } + + @Override + public GPPASTExplicitTemplateInstantiation copy(CopyStyle style) { GPPASTExplicitTemplateInstantiation copy = new GPPASTExplicitTemplateInstantiation(); IASTDeclaration declaration = getDeclaration(); - copy.setDeclaration(declaration == null ? null : declaration.copy()); + copy.setDeclaration(declaration == null ? null : declaration.copy(style)); copy.setModifier(getModifier()); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointer.java index 5da19619047..cedafe070b5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -20,11 +20,19 @@ public class GPPASTPointer extends CPPASTPointer implements IGPPASTPointer { @Override public GPPASTPointer copy() { + return copy(CopyStyle.withoutLocations); + } + + @Override + public GPPASTPointer copy(CopyStyle style) { GPPASTPointer copy = new GPPASTPointer(); copy.setConst(isConst()); copy.setVolatile(isVolatile()); copy.setRestrict(isRestrict()); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointerToMember.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointerToMember.java index c5abacbf81a..3996c644e1d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointerToMember.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTPointerToMember.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -30,12 +30,21 @@ public class GPPASTPointerToMember extends CPPASTPointerToMember implements @Override public GPPASTPointerToMember copy() { + return copy(CopyStyle.withoutLocations); + } + + @Override + public GPPASTPointerToMember copy(CopyStyle style) { IASTName name = getName(); - GPPASTPointerToMember copy = new GPPASTPointerToMember(name == null ? null : name.copy()); + GPPASTPointerToMember copy = new GPPASTPointerToMember(name == null ? null + : name.copy(style)); copy.setConst(isConst()); copy.setVolatile(isVolatile()); copy.setRestrict(isRestrict()); copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } return copy; } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTSimpleDeclSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTSimpleDeclSpecifier.java index 5e458cdfe8e..d37ea4bc93e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTSimpleDeclSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GPPASTSimpleDeclSpecifier.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation and others. + * Copyright (c) 2004, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -31,11 +31,18 @@ public class GPPASTSimpleDeclSpecifier extends CPPASTSimpleDeclSpecifier impleme @Override public GPPASTSimpleDeclSpecifier copy() { - GPPASTSimpleDeclSpecifier copy = new GPPASTSimpleDeclSpecifier(); - copySimpleDeclSpec(copy); - return copy; + return copy(CopyStyle.withoutLocations); } + @Override + public GPPASTSimpleDeclSpecifier copy(CopyStyle style) { + GPPASTSimpleDeclSpecifier copy = new GPPASTSimpleDeclSpecifier(); + copySimpleDeclSpec(copy, style); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } public void setTypeofExpression(IASTExpression typeofExpression) { setDeclTypeExpression(typeofExpression); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/ASTLiteralNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/ASTLiteralNode.java index 8da53a7b733..638108f78a5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/ASTLiteralNode.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/ASTLiteralNode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2009 Wind River Systems, Inc. and others. + * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -104,6 +104,10 @@ public class ASTLiteralNode implements IASTNode { throw new UnsupportedOperationException(); } + public IASTNode copy(CopyStyle style) { + throw new UnsupportedOperationException(); + } + public boolean isActive() { return true; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ContainerNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ContainerNode.java index 39f2dd0a956..a9cfdeee41b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ContainerNode.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/ContainerNode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik + * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -43,13 +43,20 @@ public class ContainerNode extends ASTNode { } public ContainerNode copy() { - ContainerNode copy = new ContainerNode(); - for(IASTNode node : getNodes()) - copy.addNode(node == null ? null : node.copy()); - copy.setOffsetAndLength(this); - return copy; + return copy(CopyStyle.withoutLocations); } + public ContainerNode copy(CopyStyle style) { + ContainerNode copy = new ContainerNode(); + for (IASTNode node : getNodes()) + copy.addNode(node == null ? null : node.copy(style)); + copy.setOffsetAndLength(this); + if (style == CopyStyle.withLocations) { + copy.setCopyLocation(this); + } + return copy; + } + public void addNode(IASTNode node) { nodes.add(node); if(node.getParent() == null) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorName.java index db4a4e4c232..a971cc52a8b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorName.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorName.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others. + * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -91,6 +91,11 @@ class ASTPreprocessorName extends ASTPreprocessorNode implements IASTName { public IASTName copy() { throw new UnsupportedOperationException(); } + + @Override + public IASTName copy(CopyStyle style) { + throw new UnsupportedOperationException(); + } } class ASTPreprocessorDefinition extends ASTPreprocessorName { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java index fc208872c06..985304997a6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -37,10 +37,10 @@ import org.eclipse.cdt.core.dom.ast.IASTPreprocessorPragmaStatement; import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement; import org.eclipse.cdt.core.dom.ast.IASTPreprocessorUndefStatement; import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; -import org.eclipse.cdt.core.dom.ast.IBinding; -import org.eclipse.cdt.core.dom.ast.IMacroBinding; import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit.IDependencyTree; import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit.IDependencyTree.IASTInclusionNode; +import org.eclipse.cdt.core.dom.ast.IBinding; +import org.eclipse.cdt.core.dom.ast.IMacroBinding; import org.eclipse.cdt.core.parser.IToken; import org.eclipse.cdt.core.parser.util.CharArrayUtils; import org.eclipse.cdt.internal.core.dom.parser.ASTNode; @@ -83,6 +83,10 @@ abstract class ASTPreprocessorNode extends ASTNode { throw new UnsupportedOperationException(); } + public IASTNode copy(CopyStyle style) { + throw new UnsupportedOperationException(); + } + @Override public IToken getLeadingSyntax() throws UnsupportedOperationException { throw new UnsupportedOperationException(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMASTAdapter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMASTAdapter.java index 26217f1c1c0..c0ceac30386 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMASTAdapter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMASTAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2010 Wind River Systems, Inc. and others. + * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -224,6 +224,10 @@ public class PDOMASTAdapter { public IASTName copy() { throw new UnsupportedOperationException(); } + + public IASTName copy(CopyStyle style) { + throw new UnsupportedOperationException(); + } } private static class AnonymousEnumeration implements IEnumeration { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/TrailName.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/TrailName.java index 53ee85729c6..26755e55146 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/TrailName.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/TrailName.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2009 Institute for Software, HSR Hochschule fuer Technik + * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -64,4 +64,8 @@ class TrailName extends ASTNode{ public IASTNode copy() { throw new UnsupportedOperationException(); } + + public IASTNode copy(CopyStyle style) { + throw new UnsupportedOperationException(); + } }