Author: scabanovich
Date: 2008-10-21 05:18:30 -0400 (Tue, 21 Oct 2008)
New Revision: 11034
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileAnyImpl.java
Log:
JBIDE-2909
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java 2008-10-21
09:15:01 UTC (rev 11033)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java 2008-10-21
09:18:30 UTC (rev 11034)
@@ -67,11 +67,11 @@
for (int i = 0; i < errors.length; i++) {
String er = errors[i];
int q = er.lastIndexOf(':');
- String pos = er.substring(q + 1);
- er = er.substring(0, q);
+ String pos = (q < 0) ? "" : er.substring(q + 1);
+ if(q >= 0) er = er.substring(0, q);
q = er.lastIndexOf(':');
- String ln = er.substring(q + 1), ln1 = ln;
- er = er.substring(0, q);
+ String ln = (q < 0) ? "" : er.substring(q + 1), ln1 = ln;
+ if(q >= 0) er = er.substring(0, q);
int iln = -1;
try {
if(q >= 0 && ln1.length() > 0) {
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileAnyImpl.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileAnyImpl.java 2008-10-21
09:15:01 UTC (rev 11033)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileAnyImpl.java 2008-10-21
09:18:30 UTC (rev 11034)
@@ -185,6 +185,10 @@
}
public void fileRenamed(String name, String extension) {
+ if(name != null && name.equals(super.get("NAME"))
+ && extension != null &&
extension.equals(super.get("EXTENSION"))) {
+ return;
+ }
super.set("NAME", name);
super.set("EXTENSION", extension);
fireObjectChanged(null);