wlu: fixed a bug with opening default library
diff --git a/1.5/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIManager.java b/1.5/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIManager.java
index 0e04845..409e4aa 100644
--- a/1.5/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIManager.java
+++ b/1.5/plugins/org.eclipse.epf.library.ui/src/org/eclipse/epf/library/ui/LibraryUIManager.java
@@ -291,7 +291,9 @@
*/
private void openLibrary(final URI uri, final Runnable successRunnable, final Runnable nextRunnable) {
if(uri == null) {
- nextRunnable.run();
+ if (nextRunnable != null) {
+ nextRunnable.run();
+ }
return;
}
@@ -362,7 +364,7 @@
postOpenLibrary(errors, (String) args.get(XMILibraryManager.ARG_LIBRARY_PATH));
if(errors.isEmpty()) {
successRunnable.run();
- } else {
+ } else if (nextRunnable != null) {
nextRunnable.run();
}
return Status.OK_STATUS;
@@ -930,11 +932,12 @@
final URI defautlLibUrl = defaultLibraryURI_NL != null ? defaultLibraryURI_NL : defaultLibraryURI;
if (defautlLibUrl != null) {
- openLibrary(defautlLibUrl, successRunnable, new Runnable() {
- public void run() {
- openLibrary(defautlLibUrl, successRunnable, null);
- }
- });
+// openLibrary(defautlLibUrl, successRunnable, new Runnable() {
+// public void run() {
+// openLibrary(defautlLibUrl, successRunnable, null);
+// }
+// });
+ openLibrary(defautlLibUrl, successRunnable, null);
}
}