Author: scabanovich
Date: 2009-10-08 11:26:52 -0400 (Thu, 08 Oct 2009)
New Revision: 17982
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarFolderImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/SimpleWebFileLoader.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4970
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java 2009-10-08
15:25:01 UTC (rev 17981)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java 2009-10-08
15:26:52 UTC (rev 17982)
@@ -210,7 +210,7 @@
boolean isText = XModelObjectLoaderUtil.isTextFile(f, 100);
if(f.length() > 100000 || !isText) entity =
XModelObjectConstants.ENT_FILE_ANY_LONG;
else if(isText) entity = "FileTXT"; //$NON-NLS-1$
- } else if(entity == null) {
+ } else /*if(entity == null)*/ {
body = getBodySource(f).get();
entity = getModel().getEntityRecognizer().getEntityName(ext, body);
}
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarFolderImpl.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarFolderImpl.java 2009-10-08
15:25:01 UTC (rev 17981)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarFolderImpl.java 2009-10-08
15:26:52 UTC (rev 17982)
@@ -88,7 +88,7 @@
if("FileAny".equals(entity)) { //$NON-NLS-1$
if(jar.getSize(cpath) > 100000) entity =
XModelObjectConstants.ENT_FILE_ANY_LONG;
else if(jar.isTextEntry(cpath, 100)) entity = "FileTXT";
//$NON-NLS-1$
- } else if(entity == null) {
+ } else /*if(entity == null)*/ {
body = jar.getContent(cpath);
entity = getModel().getEntityRecognizer().getEntityName(ext, body);
}
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/SimpleWebFileLoader.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/SimpleWebFileLoader.java 2009-10-08
15:25:01 UTC (rev 17981)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/SimpleWebFileLoader.java 2009-10-08
15:26:52 UTC (rev 17982)
@@ -47,7 +47,7 @@
}
public void load(XModelObject object) {
- String body = XModelObjectLoaderUtil.getTempBody(object);
+ String body = XModelObjectLoaderUtil.getTempBody(object);
Document doc = loadDocument(object, body);
if(doc == null) {
XModelObjectLoaderUtil.addRequiredChildren(object);
@@ -82,7 +82,7 @@
int resolution =
EntityXMLRegistration.getInstance().resolve(object.getModelEntity());
if(EntityXMLRegistration.isSystemId(body)) resolution =
EntityXMLRegistration.UNRESOLVED;
String[] errors =
- XMLUtil.getXMLErrors(new StringReader(body), resolution == EntityXMLRegistration.DTD,
resolution == EntityXMLRegistration.SCHEMA);
+ XMLUtil.getXMLErrors(new StringReader(body), resolution == EntityXMLRegistration.DTD
&& isCheckingDTD(), resolution == EntityXMLRegistration.SCHEMA);
if(errors != null && errors.length > 0) {
object.setAttributeValue(XModelObjectConstants.ATTR_NAME_IS_INCORRECT,
XModelObjectConstants.YES);
object.set("correctBody", ""); //$NON-NLS-1$
//$NON-NLS-2$