Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Corbat2012-05-30 08:32:17 -0400
committerSergey Prigogin2012-06-26 23:03:56 -0400
commitf8bad556272908811b6cebef4e3076e47a06d08c (patch)
tree0f84265a55730c61c326c5a1e875640095e2ea47 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite
parent3a63a3c793f888c744014b6b5d5d6195e6adeb15 (diff)
downloadorg.eclipse.cdt-f8bad556272908811b6cebef4e3076e47a06d08c.tar.gz
org.eclipse.cdt-f8bad556272908811b6cebef4e3076e47a06d08c.tar.xz
org.eclipse.cdt-f8bad556272908811b6cebef4e3076e47a06d08c.zip
Bug 381032 - NameWriter extended for fully qualified names.
Extended the NameWriter for allowing ASTWriter to write fully qualified names correctly with a leading scope (::). Added one simple test to verify this functionality. Cosmetic fix: Formatting adapted to environment and removed superfluous trailing tabs. Change-Id: I7eec92666d49a93b47a1906a75169dd42ba41eb1 Reviewed-on: https://git.eclipse.org/r/6170 Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/NameWriter.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/NameWriter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/NameWriter.java
index 610f86a6f3..90e0e719ed 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/NameWriter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/astwriter/NameWriter.java
@@ -118,6 +118,9 @@ public class NameWriter extends NodeWriter {
}
private void writeQualifiedName(ICPPASTQualifiedName qname) {
+ if (qname.isFullyQualified()) {
+ scribe.print(COLON_COLON);
+ }
IASTName[] nodes = qname.getNames();
for (int i = 0; i < nodes.length; ++i) {
nodes[i].accept(visitor);

Back to the top