JBoss Tools SVN: r3691 - trunk/vpe/plugins/org.jboss.tools.vpe.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-09-18 12:56:05 -0400 (Tue, 18 Sep 2007)
New Revision: 3691
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
Log:
Extension point="org.eclipse.ui.preferencePages" was replaced from org.jboss.tools.vpe.ui plugin.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2007-09-18 15:35:31 UTC (rev 3690)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/plugin.xml 2007-09-18 16:56:05 UTC (rev 3691)
@@ -44,4 +44,7 @@
<xclass id="org.jboss.tools.vpe.editor.css.VpeAddReferenceSupport"
class="org.jboss.tools.vpe.editor.css.VpeAddReferenceSupport"/>
</extension>
+ <extension point="org.eclipse.ui.preferencePages">
+ <page category="org.jboss.tools.common.xstudio.editors" class="org.jboss.tools.vpe.editor.preferences.VpeEditorPreferencesPage" id="org.jboss.tools.vpe.editor" name="Visual Page Editor"></page>
+ </extension>
</plugin>
17 years, 3 months
JBoss Tools SVN: r3690 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-09-18 11:35:31 -0400 (Tue, 18 Sep 2007)
New Revision: 3690
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-901
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java 2007-09-18 15:32:21 UTC (rev 3689)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java 2007-09-18 15:35:31 UTC (rev 3690)
@@ -68,9 +68,7 @@
VpeCreationData creatorInfo = new VpeCreationData(visualMenu);
VpeChildrenInfo childrenInfo = new VpeChildrenInfo(visualMenuLabel);
-// Node textLabel = null;
-// String ddmLabelFromFacet = getLabelFacet(sourceElement);
- Element facetElement = getLabelFacet1(sourceElement);
+ Element facetElement = getLabelFacet(sourceElement);
if ( facetElement != null) {
childrenInfo.addSourceChild(facetElement);
} else {
@@ -91,39 +89,7 @@
private static final String LABEL_FACET_NAME = "label";
- private String getLabelFacet(Element sourceElement) {
- String labelFacet = null;
- NodeList children = sourceElement.getChildNodes();
-
- int cnt = children != null ? children.getLength() : 0;
- if (cnt > 0) {
- for (int i = 0; i < cnt; i++) {
- Node child = children.item(i);
- if (child.getNodeType() == Node.ELEMENT_NODE &&
- child.getNodeName().endsWith(":facet")) {
- Element facetElement = (Element)child;
- String facetName = facetElement.getAttribute("name");
- if (LABEL_FACET_NAME.equals(facetName)) {
- NodeList facetChildren = facetElement.getChildNodes();
- int facetCnt = facetChildren != null ? facetChildren.getLength() : 0;
- if (facetCnt > 0) {
- for (int j = 0; j < facetCnt; j++) {
- Node facetChild = facetChildren.item(i);
- if (facetChild.getNodeType() == Node.ELEMENT_NODE &&
- facetChild.getNodeName().endsWith(":verbatim")) {
- labelFacet = getElementTextContent((Element)facetChild);
- break;
- }
- }
- }
- }
- }
- }
- }
- return labelFacet;
- }
-
- private Element getLabelFacet1(Element sourceElement) {
+ private Element getLabelFacet(Element sourceElement) {
if (sourceElement == null) {
return null;
}
17 years, 3 months
JBoss Tools SVN: r3689 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-09-18 11:32:21 -0400 (Tue, 18 Sep 2007)
New Revision: 3689
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-901
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java 2007-09-18 15:32:17 UTC (rev 3688)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDropDownMenuTemplate.java 2007-09-18 15:32:21 UTC (rev 3689)
@@ -52,8 +52,6 @@
STYLE_ATTR_NAME,
HtmlComponentUtil.HTML_STYLE_ATTR, null, null);
- Attr ddmLabelFromAttribute = sourceElement.getAttributeNode("value");
-
Element visualMenuLabel = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
visualMenuLabel.setAttribute("class", "dr-label-text-decor rich-label-text-decor");
correctAttribute(sourceElement, visualMenuLabel,
@@ -68,21 +66,23 @@
visualMenu.appendChild(visualMenuLabel);
- String ddmLabelFromFacet = getLabelFacet(sourceElement);
- Map visualNodeMap = pageContext.getDomMapping().getVisualMap();
-
VpeCreationData creatorInfo = new VpeCreationData(visualMenu);
VpeChildrenInfo childrenInfo = new VpeChildrenInfo(visualMenuLabel);
- Node textLabel = null;
- if (ddmLabelFromFacet != null) {
- textLabel = visualDocument.createTextNode(ddmLabelFromFacet);
+// Node textLabel = null;
+// String ddmLabelFromFacet = getLabelFacet(sourceElement);
+ Element facetElement = getLabelFacet1(sourceElement);
+ if ( facetElement != null) {
+ childrenInfo.addSourceChild(facetElement);
} else {
- textLabel = visualDocument.createTextNode(ddmLabelFromAttribute.getValue());
+ Attr ddmLabelFromAttribute = sourceElement.getAttributeNode("value");
+ String textLabel = ddmLabelFromAttribute != null && ddmLabelFromAttribute.getValue() != null
+ ? ddmLabelFromAttribute.getValue()
+ : "";
+ Node textLabelNode = visualDocument.createTextNode(textLabel);
+ visualMenuLabel.appendChild(textLabelNode);
}
- if (textLabel != null) {
- visualMenuLabel.appendChild(textLabel);
- creatorInfo.addChildrenInfo(childrenInfo);
- }
+
+ creatorInfo.addChildrenInfo(childrenInfo);
visualMenu.appendChild(visualMenuLabel);
MozillaSupports.release(visualMenuLabel);
@@ -123,6 +123,31 @@
return labelFacet;
}
+ private Element getLabelFacet1(Element sourceElement) {
+ if (sourceElement == null) {
+ return null;
+ }
+
+ NodeList children = sourceElement.getChildNodes();
+ if (children != null) {
+ int size = children.getLength();
+ if (size > 0) {
+ for (int i=0; i<size; i++) {
+ Node child = children.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE
+ && child.getNodeName().endsWith(":facet")) {
+ Element facetElement = (Element)child;
+ if (LABEL_FACET_NAME.equals(facetElement.getAttribute("name"))) {
+ return facetElement;
+ }
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
private String getElementTextContent(Element element) {
String content = null;
NodeList children = element.getChildNodes();
17 years, 3 months
JBoss Tools SVN: r3688 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-09-18 11:32:17 -0400 (Tue, 18 Sep 2007)
New Revision: 3688
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeHtmlTemplate.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-901
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeHtmlTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeHtmlTemplate.java 2007-09-18 13:08:22 UTC (rev 3687)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeHtmlTemplate.java 2007-09-18 15:32:17 UTC (rev 3688)
@@ -562,9 +562,15 @@
}
public Node getNodeForUptate(VpePageContext pageContext, Node sourceNode, Node visualNode, Object data) {
+ // TODO Sergey Vasilyev redevelop JSF's facet template
+ if (sourceNode.getNodeName().endsWith(":facet")) {
+ return sourceNode.getParentNode();
+ }
+
if (creator != null) {
return creator.getNodeForUptate(pageContext, sourceNode, visualNode, (Map)data);
}
+
return null;
}
}
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r3687 - trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-09-18 09:08:22 -0400 (Tue, 18 Sep 2007)
New Revision: 3687
Added:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-api-3.1.0.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-impl-3.1.0.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-ui-3.1.0.jar
Removed:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-api-3.1.0-rc2.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-impl-3.1.0-rc2.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-ui-3.1.0-rc2.jar
Log:
http://jira.jboss.com/jira/browse/RHDS-73 Update Richfaces jars to 3.1.0 GA
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-api-3.1.0-rc2.jar
===================================================================
(Binary files differ)
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-api-3.1.0.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-api-3.1.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-impl-3.1.0-rc2.jar
===================================================================
(Binary files differ)
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-impl-3.1.0.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-impl-3.1.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-ui-3.1.0-rc2.jar
===================================================================
(Binary files differ)
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-ui-3.1.0.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/richfaces-ui-3.1.0.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 3 months
JBoss Tools SVN: r3686 - trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/list.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-18 08:34:46 -0400 (Tue, 18 Sep 2007)
New Revision: 3686
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/list/WebPromptingProvider.java
Log:
JBIDE-890
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/list/WebPromptingProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/list/WebPromptingProvider.java 2007-09-18 12:32:27 UTC (rev 3685)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/list/WebPromptingProvider.java 2007-09-18 12:34:46 UTC (rev 3686)
@@ -11,6 +11,8 @@
package org.jboss.tools.jst.web.project.list;
import java.util.*;
+
+import org.eclipse.core.runtime.Platform;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.util.ModelFeatureFactory;
import org.jboss.tools.jst.web.WebModelPlugin;
@@ -20,15 +22,17 @@
static IWebPromptingProvider[] providers;
static {
- String[] pns = new String[]{
- "org.jboss.tools.jsf.model.pv.JSFPromptingProvider",
- "org.jboss.tools.struts.model.pv.StrutsPromptingProvider",
- "org.jboss.tools.shale.model.pv.ShalePromptingProvider"
+ String[][] pns = new String[][]{
+ {"org.jboss.tools.jsf.model.pv.JSFPromptingProvider", "org.jboss.tools.jsf"},
+ {"org.jboss.tools.struts.model.pv.StrutsPromptingProvider", "org.jboss.tools.struts"},
+ {"org.jboss.tools.shale.model.pv.ShalePromptingProvider", "org.jboss.tools.shale"}
};
List<IWebPromptingProvider> l = new ArrayList<IWebPromptingProvider>();
for (int i = 0; i < pns.length; i++) {
+ String bundleName = pns[i][1];
+ if(Platform.getBundle(bundleName) == null) continue;
try {
- IWebPromptingProvider p = (IWebPromptingProvider)ModelFeatureFactory.getInstance().createFeatureInstance(pns[i]);
+ IWebPromptingProvider p = (IWebPromptingProvider)ModelFeatureFactory.getInstance().createFeatureInstance(pns[i][0]);
if(p != null) l.add(p);
} catch (Exception e) {
WebModelPlugin.getPluginLog().logError(e);
17 years, 3 months
JBoss Tools SVN: r3685 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-18 08:32:27 -0400 (Tue, 18 Sep 2007)
New Revision: 3685
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ClassLoaderUtil.java
Log:
JBIDE-890
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ClassLoaderUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ClassLoaderUtil.java 2007-09-18 12:25:10 UTC (rev 3684)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/ClassLoaderUtil.java 2007-09-18 12:32:27 UTC (rev 3685)
@@ -33,7 +33,7 @@
{"org.jboss.tools.jst.web.ui", "org.jboss.tools.jst.web.ui.WebUiPlugin", "required"},
{"org.jboss.tools.jst.web", "org.jboss.tools.jst.web.WebModelPlugin", "required"},
{"org.jboss.tools.jsf.ui", "org.jboss.tools.jsf.ui.JsfUiPlugin", "required"},
- {"org.jboss.tools.struts.ui", "org.jboss.tools.struts.ui.StrutsUIPlugin", "required"},
+ {"org.jboss.tools.struts.ui", "org.jboss.tools.struts.ui.StrutsUIPlugin", "optional"},
{"org.jboss.tools.common.verification.ui", "org.jboss.tools.common.verification.ui.XStudioVerificationPlugin", "optional"},
};
17 years, 3 months
JBoss Tools SVN: r3684 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-18 08:25:10 -0400 (Tue, 18 Sep 2007)
New Revision: 3684
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/FacesConfigLoader.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFEntityRecognizer.java
Log:
JBIDE-898
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/FacesConfigLoader.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/FacesConfigLoader.java 2007-09-18 12:24:38 UTC (rev 3683)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/FacesConfigLoader.java 2007-09-18 12:25:10 UTC (rev 3684)
@@ -38,10 +38,8 @@
String body = XModelObjectLoaderUtil.getTempBody(object);
int resolution = EntityXMLRegistration.getInstance().resolve(object.getModelEntity());
+ if(EntityXMLRegistration.isSystemId(body)) resolution = EntityXMLRegistration.UNRESOLVED;
String[] errors =
-// (entity.equals(ENT_FACESCONFIG_12))
-// ? new SAXValidator().getXMLErrors(new StringReader(body))
-// : XMLUtil.getXMLErrors(new StringReader(body));
XMLUtil.getXMLErrors(new StringReader(body), resolution == EntityXMLRegistration.DTD, resolution == EntityXMLRegistration.SCHEMA);
boolean hasErrors = (errors != null && errors.length > 0);
if(hasErrors) {
@@ -73,6 +71,9 @@
if(n instanceof DocumentType) {
DocumentType dt = (DocumentType)n;
object.setAttributeValue("systemId", dt.getSystemId());
+ if(dt.getPublicId() == null) {
+ object.setAttributeValue("publicId", "null");
+ }
}
}
}
@@ -164,6 +165,7 @@
String entity = object.getModelEntity().getName();
String systemId = object.getAttributeValue("systemId");
String publicId = object.getAttributeValue("publicId");
+ if("null".equals(publicId)) publicId = null;
if(systemId != null) {
int version = entity.equals(ENT_FACESCONFIG_11) ? 11 : 10;
@@ -171,7 +173,7 @@
if(publicId != null && publicId.length() == 0) publicId = (version == 10) ? DOC_PUBLICID : DOC_PUBLICID_11;
}
- Element element = (systemId == null || publicId == null)
+ Element element = (systemId == null && publicId == null)
? XMLUtil.createDocumentElement(object.getModelEntity().getXMLSubPath())
: XMLUtil.createDocumentElement(object.getModelEntity().getXMLSubPath(), DOC_QUALIFIEDNAME, publicId, systemId, null);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFEntityRecognizer.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFEntityRecognizer.java 2007-09-18 12:24:38 UTC (rev 3683)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFEntityRecognizer.java 2007-09-18 12:25:10 UTC (rev 3684)
@@ -30,8 +30,16 @@
public String getEntityName(String ext, String body) {
if(body == null) return null;
- if(body.indexOf(DOC_PUBLICID) > 0) return ENT_FACESCONFIG;
- if(body.indexOf(DOC_PUBLICID_11) > 0) return ENT_FACESCONFIG_11;
+ int i = body.indexOf("<!DOCTYPE");
+ if(i >= 0) {
+ int j = body.indexOf(">", i);
+ if(j < 0) return null;
+ String dt = body.substring(i, j);
+ if(dt.indexOf("faces-config") < 0) return null;
+ if(dt.indexOf(DOC_PUBLICID) > 0) return ENT_FACESCONFIG;
+ if(dt.indexOf(DOC_PUBLICID_11) > 0) return ENT_FACESCONFIG_11;
+ if(dt.indexOf("SYSTEM") > 0 && dt.indexOf("web-facesconfig_1_1.dtd") > 0) return ENT_FACESCONFIG_11;
+ }
if(is12(body)) return ENT_FACESCONFIG_12;
return null;
}
17 years, 3 months
JBoss Tools SVN: r3683 - in trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-18 08:24:38 -0400 (Tue, 18 Sep 2007)
New Revision: 3683
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EntityXMLRegistration.java
Log:
JBIDE-898
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java 2007-09-18 12:22:34 UTC (rev 3682)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractExtendedXMLFileImpl.java 2007-09-18 12:24:38 UTC (rev 3683)
@@ -131,6 +131,7 @@
set("isIncorrect", "yes");
// setErrors(value, hasDTD(), !hasDTD()); //never validate dtd
int resolution = EntityXMLRegistration.getInstance().resolve(getModelEntity());
+ if(EntityXMLRegistration.isSystemId(value)) resolution = EntityXMLRegistration.UNRESOLVED;
setErrors(value, resolution == EntityXMLRegistration.DTD, resolution == EntityXMLRegistration.SCHEMA);
}
}
@@ -232,6 +233,7 @@
loaderError = null;
// setErrors(body, hasDTD(), !hasDTD()); //never validate dtd
int resolution = EntityXMLRegistration.getInstance().resolve(getModelEntity());
+ if(EntityXMLRegistration.isSystemId(body)) resolution = EntityXMLRegistration.UNRESOLVED;
setErrors(body, resolution == EntityXMLRegistration.DTD, resolution == EntityXMLRegistration.SCHEMA);
boolean errors2 = (get("errors") != null && get("errors").length() > 0);
if(errors1 && errors2) {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EntityXMLRegistration.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EntityXMLRegistration.java 2007-09-18 12:22:34 UTC (rev 3682)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EntityXMLRegistration.java 2007-09-18 12:24:38 UTC (rev 3683)
@@ -87,4 +87,14 @@
return SCHEMA;
}
+ public static boolean isSystemId(String body) {
+ if(body == null) return false;
+ int i = body.indexOf("<!DOCTYPE");
+ if(i < 0) return false;
+ int j = body.indexOf(">", i);
+ if(j < 0) return false;
+ String dt = body.substring(i, j);
+ return (dt.indexOf("SYSTEM") > 0);
+ }
+
}
17 years, 3 months
JBoss Tools SVN: r3682 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-18 08:22:34 -0400 (Tue, 18 Sep 2007)
New Revision: 3682
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleErrorForm.java
Log:
JBIDE-898
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleErrorForm.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleErrorForm.java 2007-09-18 11:40:59 UTC (rev 3681)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/form/SampleErrorForm.java 2007-09-18 12:22:34 UTC (rev 3682)
@@ -223,8 +223,8 @@
public StyleRange2(int start, int length, Color fg, Color bg, String location) {
super(start, length, fg, bg);
int i = location.indexOf(":");
- line = getInt(location.substring(0, i), 0);
- position = getInt(location.substring(i + 1), 0);
+ line = i < 0 ? 0 : getInt(location.substring(0, i), 0);
+ position = i < 0 ? 0 : getInt(location.substring(i + 1), 0);
}
public void execute() {
if(listener != null) listener.errorSelected(line, position);
17 years, 3 months