try {
LocalComponentRegistry registry = new LocalComponentRegistry(
path);
// XXX This might take time, so it's better to move to another
// thread.
ComponentTreeNode componentTree = registry.getComponentTree();
componentTreeViewer.addComponentTree(componentTree);
} catch (ComponentRegistryException e) {
getErrorWindow().error(ErrorMessages.COMPONENT_LIST_LOAD_ERROR,
e);
} catch (RuntimeException e) {
getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR, e);
}
}
//load xRegistry only when myProxy is loaded and xRegistryURL is presented
if (this.configuration.getXRegistryURL() != null && this.configuration.isLoadMyProxy()) {
new Thread() {
@Override
public void run() {
try {
XRegistryComponent client = new XRegistryComponent(
XBayaEngine.this.configuration
.getXRegistryURL(),
XRegistryComponent.Type.ABSTRACT,
XBayaEngine.this.myProxyClient.getProxy());
XBayaEngine.this
.setXRegistryURL(XBayaEngine.this.configuration
.getXRegistryURL());
ComponentTreeNode componentTree = client
.getComponentTree();
componentTreeViewer.addComponentTree(componentTree);
// TreeNode[] path = componentTree.getPath();
// JTree swingComponent = componentTreeViewer.getSwingComponent();
// swingComponent.expandPath(