Double click in explorer perspective should expand folder
@@ -460,9 +460,21 @@ public class ExplorerPerspective implements IHopPerspective , TabClosable {
private void openFile(Event event) {
if (event.item instanceof TreeItem) {
TreeItem item = (TreeItem) event.item;
+
+ TreeItemFolder tif = (TreeItemFolder) item.getData();
+ if (tif.folder) {
+ if (!item.getExpanded()) {
+ lazyLoadFolderOnExpand(event);
+ item.setExpanded(true);
+ } else {
+ item.setExpanded(false);
+ }
+ TreeMemory.getInstance().storeExpanded(FILE_EXPLORER_TREE, item, item.getExpanded());
+ } else {
openFile(item);
}
}
+ }
private void openFile(TreeItem item) {
try {
@@ -1193,7 +1205,8 @@ public class ExplorerPerspective implements IHopPerspective , TabClosable {
@Override
public boolean hasNavigationNextFile() {
- return ( tabFolder.getItemCount() > 0 ) && ( tabFolder.getSelectionIndex() < (tabFolder.getItemCount() - 1) );
+ return (tabFolder.getItemCount() > 0)
+ && (tabFolder.getSelectionIndex() < (tabFolder.getItemCount() - 1));
}
@Override
@@ -1215,9 +1228,7 @@ public class ExplorerPerspective implements IHopPerspective , TabClosable {
return new ArrayList<>();
}
- /**
- * Update HOP GUI menu and toolbar...
- */
+ /** Update HOP GUI menu and toolbar... */
public void updateGui() {
if (hopGui == null || toolBarWidgets == null || toolBar == null || toolBar.isDisposed()) {
return;
