Author: rob.stryker(a)jboss.com
Date: 2008-09-11 15:45:22 -0400 (Thu, 11 Sep 2008)
New Revision: 10207
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathQuery.java
Log:
JBIDE-2741 - exception removed, editor can load, but UI / result is still not ideal.
However comments on the UI and how it should work should go in the issue regarding that
portion of the UI
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathQuery.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathQuery.java 2008-09-11
15:46:52 UTC (rev 10206)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathQuery.java 2008-09-11
19:45:22 UTC (rev 10207)
@@ -101,19 +101,24 @@
}
protected void loadResults() {
- String[] files = getFilter().getIncludedFiles();
- String fileLoc;
- ArrayList<XPathFileResult> resultList = new ArrayList<XPathFileResult>();
- List<Node> nodeList = null;
- for( int i = 0; i < files.length; i++ ) {
- fileLoc = new Path(baseDir).append(files[i]).toOSString();
- Document d = getRepository().getDocument(fileLoc);
- if( d != null )
- nodeList = d.selectNodes(xpathPattern);
- if( nodeList != null && nodeList.size() > 0 )
- resultList.add(new XPathFileResult(this, fileLoc, nodeList));
+ try {
+ String[] files = getFilter().getIncludedFiles();
+ String fileLoc;
+ ArrayList<XPathFileResult> resultList = new ArrayList<XPathFileResult>();
+ List<Node> nodeList = null;
+ for( int i = 0; i < files.length; i++ ) {
+ fileLoc = new Path(baseDir).append(files[i]).toOSString();
+ Document d = getRepository().getDocument(fileLoc);
+ if( d != null )
+ nodeList = d.selectNodes(xpathPattern);
+ if( nodeList != null && nodeList.size() > 0 )
+ resultList.add(new XPathFileResult(this, fileLoc, nodeList));
+ }
+ results = resultList.toArray(new XPathFileResult[resultList.size()]);
+ } catch( IllegalStateException ise ) {
+ // cannot load TODO log?
+ results = new XPathFileResult[0];
}
- results = resultList.toArray(new XPathFileResult[resultList.size()]);
}
public String getFirstResult() {