if (selectAll) { tree.addSelectionPaths(paths);
if (!found) { break;
			public void run() {				// if we have a different root and not the actual root then this will not work				// or should it?				tree.setRootVisible(false);				if (((DefaultTreeModel) tree.getModel()).getRoot() != AssetManager.getRootFolderNode()) {					((DefaultTreeModel) tree.getModel()).setRoot(AssetManager.getRootFolderNode());				}				MatrixTreeNode parent = AssetManager.getRootFolderNode();				int numAssets = assetids.length;				int level = 0;				int loadedNodes = 0;				boolean found = false;				TreePath path = null;				try {					// clear all other selections					tree.clearSelection();					int sort_order = 0;					int totalKids = 0;					found=true;					if (found) {						TreePath[] paths = new TreePath[numAssets+1];						paths[0] = path;						while (level < numAssets) {							found = false;							Asset asset = parent.getAsset();							totalKids = asset.getTotalKidsLoaded();							sort_order = Integer.parseInt(sort_orders[level]);							if (!sort_orders[level].equals("-1")) {								int modifier = (int)(sort_order/AssetManager.getLimit());								int loc = 0;								if (parent.getChildCount() == 0 || (AssetManager.getLimit()*modifier != totalKids)) {									for (int i=(AssetManager.getLimit()*modifier); i > 0; i--) {										if (parent.getAsset().getNumKids() >= AssetManager.getLimit()*modifier) {											break;										} else {											modifier--;										}									}									if (parent.getAsset().getNumKids() >= AssetManager.getLimit()*modifier) {										// load another set of assets										removeChildNodes(parent);										AssetManager.refreshAsset(parent, "", AssetManager.getLimit()*modifier, -1);										loadedNodes += parent.getChildCount();									}								}								if (parent.getChildCount() > 0) {									loc += (sort_order%AssetManager.getLimit());									if (loc >= parent.getChildCount()) {										loc = parent.getChildCount()-1;									} else if (loc < 0) {										loc = 0;									}									MatrixTreeNode foundChild = null;									foundChild = (MatrixTreeNode)parent.getChildAt(loc);									if (foundChild.getAsset().getId().equals(assetids[level])) {										found = true;										parent = foundChild;									} else {										for (int i = 0; i < parent.getChildCount(); i++) {											foundChild = (MatrixTreeNode)parent.getChildAt(i);											if (foundChild.getAsset().getId().equals(assetids[level])) {												found = true;												parent = foundChild;												break;											}										}									}								}							} else {								parent = findAssetUnderParent(parent, assetids[level], false);								if (parent != null) {									found = true;								}							}							if (!found) {								break;							} else {								path = getPathToRoot(parent);								paths[level] = path;								level++;							}						}						// scroll to the last selected node						if (selectAll) {							tree.addSelectionPaths(paths);						} else {							tree.addSelectionPath(path);						}						if (teleport) {							teleportToRoot((MatrixTreeNode)path.getLastPathComponent());						}						scrollPathToVisible(path);					}					if (!found) {						// asset not found						MatrixStatusBar.setStatusAndClear(Matrix.translate("asset_map_status_bar_requesting"), 1000);						Object[] transArgs = {							assetids[level]						};						String message = Matrix.translate("asset_map_error_locate_asset", transArgs);						GUIUtilities.error(message, Matrix.translate("asset_map_dialog_title_error"));						return;					}				} catch (Exception ioe) {					MatrixStatusBar.setStatusAndClear(Matrix.translate("asset_map_status_bar_requesting"), 1000);					Object[] transArgs = {						ioe.getMessage()					};					String message = Matrix.translate("asset_map_error_loading_children", transArgs);					GUIUtilities.error(message, Matrix.translate("asset_map_dialog_title_error"));					Log.log(message, MatrixTree.class, ioe);					return;				}				if (loadedNodes == 1) {					MatrixStatusBar.setStatusAndClear(Matrix.translate("asset_map_status_bar_loaded_child"), 3000);				} else {					Object[] transArgs = {						new Integer(loadedNodes)					};					MatrixStatusBar.setStatusAndClear(Matrix.translate("asset_map_status_bar_loaded_children", transArgs), 3000);				}			}