Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 73316 Details for
Bug 195543
[Scratchpad] Double Clicking on a folder expands wrong folder if shown twice in view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Double Clicking is based on TreePath's so proper element is expanded
patch.txt (text/plain), 2.60 KB, created by
Kevin Doyle
on 2007-07-09 09:32:39 EDT
(
hide
)
Description:
Double Clicking is based on TreePath's so proper element is expanded
Filename:
MIME Type:
Creator:
Kevin Doyle
Created:
2007-07-09 09:32:39 EDT
Size:
2.60 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.ui >Index: UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadViewPart.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadViewPart.java,v >retrieving revision 1.8 >diff -u -r1.8 SystemScratchpadViewPart.java >--- UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadViewPart.java 28 Jun 2007 19:58:44 -0000 1.8 >+++ UI/org/eclipse/rse/internal/ui/view/scratchpad/SystemScratchpadViewPart.java 9 Jul 2007 13:18:17 -0000 >@@ -14,6 +14,7 @@ > * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core > * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry > * Kevin Doyle (IBM) - [182403] Double Click on an object that can be expanded >+ * Kevin Doyle (IBM) - [195543] Double Clicking expands wrong folder when duplicate elements shown > ********************************************************************************/ > > package org.eclipse.rse.internal.ui.view.scratchpad; >@@ -28,7 +29,9 @@ > import org.eclipse.jface.viewers.ISelection; > import org.eclipse.jface.viewers.ISelectionChangedListener; > import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.jface.viewers.ITreeSelection; > import org.eclipse.jface.viewers.SelectionChangedEvent; >+import org.eclipse.jface.viewers.TreePath; > import org.eclipse.jface.viewers.Viewer; > import org.eclipse.rse.core.RSECorePlugin; > import org.eclipse.rse.core.events.ISystemResourceChangeEvent; >@@ -176,7 +179,7 @@ > > private void handleDoubleClick(DoubleClickEvent event) > { >- IStructuredSelection s = (IStructuredSelection) event.getSelection(); >+ ITreeSelection s = (ITreeSelection) event.getSelection(); > Object element = s.getFirstElement(); > > if (element == null) >@@ -188,13 +191,18 @@ > { > if (adapter.hasChildren((IAdaptable)element)) > { >- if (_viewer.getExpandedState(element)) >+ // Get the path for the element and use it for setting expanded state, >+ // so the proper TreeItem is expanded/collapsed >+ TreePath[] paths = s.getPathsFor(element); >+ if (paths == null || paths.length == 0 || paths[0] == null) return; >+ TreePath elementPath = paths[0]; >+ if (_viewer.getExpandedState(elementPath)) > { >- _viewer.collapseToLevel(element, 1); >+ _viewer.collapseToLevel(elementPath, 1); > } > else > { >- _viewer.expandToLevel(element, 1); >+ _viewer.expandToLevel(elementPath, 1); > } > } > else
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mober.at+eclipse
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 195543
: 73316