Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarolyn MacLeod2005-10-03 20:28:03 +0000
committerCarolyn MacLeod2005-10-03 20:28:03 +0000
commit5f1d51ad09d399422550635b6d5c809737dd728f (patch)
tree02e85fb1adb51cf13b3599bdde118b0ff144d750 /examples/org.eclipse.swt.examples.launcher
parentc589b83339477b9cd24d205bdab1caf2f61e909e (diff)
downloadeclipse.platform.swt-5f1d51ad09d399422550635b6d5c809737dd728f.tar.gz
eclipse.platform.swt-5f1d51ad09d399422550635b6d5c809737dd728f.tar.xz
eclipse.platform.swt-5f1d51ad09d399422550635b6d5c809737dd728f.zip
110342 - double-click category didn't work
Diffstat (limited to 'examples/org.eclipse.swt.examples.launcher')
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherView.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherView.java b/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherView.java
index b107767a7c..6adf390736 100755
--- a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherView.java
+++ b/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherView.java
@@ -66,7 +66,15 @@ public class LauncherView extends ViewPart {
public void widgetDefaultSelected(SelectionEvent event) {
final ItemDescriptor item = getSelectedItem();
setDescriptionByItem(item);
- launchItem(getSelectedItem());
+ if (item.getMainType() == null && item.getView() == null) {
+ // Category selected, so just expand/colapse the node
+ TreeItem treeItem = (TreeItem) event.item;
+ boolean expanded = treeItem.getExpanded();
+ if (treeItem != null) treeItem.setExpanded(!expanded);
+ treeItem.setImage(LauncherPlugin.images[expanded ? LauncherPlugin.liClosedFolder : LauncherPlugin.liOpenFolder]);
+ } else {
+ launchItem(getSelectedItem());
+ }
}
});
launchTree.addTreeListener(new TreeListener() {

Back to the top