This commit is contained in:
Alexey Kudravtsev
2015-02-13 17:30:47 +03:00
parent 20a2ed9d47
commit 19a9136fed
3 changed files with 8 additions and 5 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -81,13 +81,14 @@ public class XmlAspectChangeSetImpl implements XmlChangeSet {
return myChangedFiles;
}
@Override
public String toString(){
final StringBuilder buffer = new StringBuilder();
final Iterator<XmlChange> iterator = myChanges.iterator();
while (iterator.hasNext()) {
XmlChange xmlChange = iterator.next();
buffer.append("(");
buffer.append(xmlChange.toString());
buffer.append(xmlChange);
buffer.append(")");
if(iterator.hasNext()) buffer.append(", ");
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@ public class XmlTagChildAddImpl implements XmlTagChildAdd {
return myChild;
}
@Override
@SuppressWarnings({"HardCodedStringLiteral"})
public String toString() {
return "child added to " + getTag().getName() + " child: " + myChild.toString();
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ import com.intellij.pom.PomModel;
import com.intellij.pom.event.PomModelEvent;
import com.intellij.pom.impl.PomTransactionBase;
import com.intellij.pom.xml.XmlAspect;
import com.intellij.pom.xml.XmlChangeSet;
import com.intellij.pom.xml.impl.XmlAspectChangeSetImpl;
import com.intellij.pom.xml.impl.events.XmlAttributeSetImpl;
import com.intellij.psi.*;
@@ -316,7 +317,7 @@ public class XmlAttributeImpl extends XmlElementImpl implements XmlAttribute {
@Override
public PomModelEvent runInner() {
final PomModelEvent event = new PomModelEvent(model);
final XmlAspectChangeSetImpl xmlAspectChangeSet = new XmlAspectChangeSetImpl(model, (XmlFile)getContainingFile());
XmlChangeSet xmlAspectChangeSet = new XmlAspectChangeSetImpl(model, (XmlFile)getContainingFile());
xmlAspectChangeSet.add(new XmlAttributeSetImpl(getParent(), oldName, null));
xmlAspectChangeSet.add(new XmlAttributeSetImpl(getParent(), nameText, getValue()));
event.registerChangeSet(model.getModelAspect(XmlAspect.class), xmlAspectChangeSet);