Author: rob.stryker(a)jboss.com
Date: 2012-05-14 15:22:50 -0400 (Mon, 14 May 2012)
New Revision: 41003
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
Log:
JBIDE-11854
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java 2012-05-14
19:06:08 UTC (rev 41002)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ChangePortDialog.java 2012-05-14
19:22:50 UTC (rev 41003)
@@ -62,6 +62,7 @@
private ChangePortDialogInfo info;
private String selected;
private XPathQuery currentQuery;
+ private XPathQuery[] allQueries;
private boolean queriesLoaded = false;
private List listWidget;
private Label currentValue;
@@ -126,9 +127,9 @@
ArrayList<String> list = new ArrayList<String>();
XPathCategory[] categories = XPathModel.getDefault().getCategories(info.server);
for( int i = 0; i < categories.length; i++ ) {
- XPathQuery[] queries = categories[i].getQueries();
- for( int j = 0; j < queries.length; j++ ) {
- list.add(categories[i].getName() + IPath.SEPARATOR + queries[j].getName());
+ allQueries = categories[i].getQueries();
+ for( int j = 0; j < allQueries.length; j++ ) {
+ list.add(categories[i].getName() + IPath.SEPARATOR + allQueries[j].getName());
}
}
String[] stuff = (String[]) list.toArray(new String[list.size()]);
@@ -186,7 +187,7 @@
throws InvocationTargetException, InterruptedException {
monitor.beginTask(Messages.ChangePortDialog_LoadingTaskName, items.length);
for( int i = 0; i < items.length; i++ ) {
- countMatches(currentQuery);
+ countMatches(allQueries[i]);
monitor.worked(1);
}
monitor.done();
@@ -228,6 +229,7 @@
if( query == null )
return String.valueOf(-1);
+ query.clearCache();
int count = 0;
XPathFileResult[] fResults = query.getResults();
for( int i = 0; i < fResults.length; i++ ) {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2012-05-14
19:06:08 UTC (rev 41002)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2012-05-14
19:22:50 UTC (rev 41003)
@@ -186,7 +186,7 @@
super(parentShell);
setShellStyle(getShellStyle() | SWT.RESIZE);
this.server = server;
- repository = new XMLDocumentRepository(XMLDocumentRepository.getDefault());
+ repository = new XMLDocumentRepository(null);
if( original != null ) {
this.original = original;
this.originalName = this.name = original.getName();
Show replies by date