diff --git a/.classpath b/.classpath
index 2252298..071c964 100644
--- a/.classpath
+++ b/.classpath
@@ -1,12 +1,12 @@
-
+
-
+
@@ -45,5 +45,5 @@
-
+
diff --git a/distro/changelog.xml b/distro/changelog.xml
index 784929a..3c6fc56 100644
--- a/distro/changelog.xml
+++ b/distro/changelog.xml
@@ -1,4 +1,9 @@
+
+ Updated resource selection how workaround for
+ WorkspaceExplorer widget [ticket #16157]
+
+
Added the project folder path update in the open operation
[ticket #12977]
diff --git a/pom.xml b/pom.xml
index 139ed63..4ea397a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
4.0.0
org.gcube.portlets.user
statistical-algorithms-importer
- 1.13.1-SNAPSHOT
+ 1.13.2-SNAPSHOT
war
diff --git a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/project/ProjectManager.java b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/project/ProjectManager.java
index de135d2..c24c05d 100644
--- a/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/project/ProjectManager.java
+++ b/src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter/client/project/ProjectManager.java
@@ -206,30 +206,30 @@ public class ProjectManager {
}
public void addResource() {
- List selectableTypes = new ArrayList();
- selectableTypes.add(ItemType.EXTERNAL_FILE);
+ /*
+ * List selectableTypes = new ArrayList();
+ * selectableTypes.add(ItemType.EXTERNAL_FILE);
+ *
+ * List showableTypes = new ArrayList();
+ * showableTypes.addAll(Arrays.asList(ItemType.values()));
+ */
- List showableTypes = new ArrayList();
- showableTypes.addAll(Arrays.asList(ItemType.values()));
-
- WorkspaceExplorerSelectDialog wselectDialog = new WorkspaceExplorerSelectDialog("Select a Resource",
- selectableTypes, showableTypes);
+ WorkspaceExplorerSelectDialog wselectDialog = new WorkspaceExplorerSelectDialog("Select a file resource", false);
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
@Override
public void onSelectedItem(Item item) {
- if (item.getType() != ItemType.FOLDER && item.getType() != ItemType.PRIVATE_FOLDER
- && item.getType() != ItemType.SHARED_FOLDER && item.getType() != ItemType.VRE_FOLDER) {
+ if (item == null || item.getType() == ItemType.FOLDER || item.getType() == ItemType.PRIVATE_FOLDER
+ || item.getType() == ItemType.SHARED_FOLDER || item.getType() == ItemType.VRE_FOLDER) {
+ UtilsGXT3.info("Attention", "Select a valid file resource!");
+ } else {
String filename = item.getName();
if (filename != null && !filename.isEmpty()) {
addResourceToProject(item);
} else {
- UtilsGXT3.info("Attention", "Select a valid resource!");
+ UtilsGXT3.info("Attention", "Select a valid file resource!");
}
-
- } else {
- UtilsGXT3.info("Attention", "Select a valid resource!");
}
}
@@ -393,7 +393,7 @@ public class ProjectManager {
Log.error("Session Expired");
eventBus.fireEvent(new SessionExpiredEvent(SessionExpiredType.EXPIREDONSERVER));
} else {
- Log.error("Error in create software: " + caught.getLocalizedMessage(),caught);
+ Log.error("Error in create software: " + caught.getLocalizedMessage(), caught);
UtilsGXT3.alert("Error", caught.getLocalizedMessage());
fireProjectStatusExplorerRefreshEvent();
}