Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342095 - Properties in Properties view remain "Pending..." in some cases
Summary: Properties in Properties view remain "Pending..." in some cases
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3.1   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 348778
  Show dependency tree
 
Reported: 2011-04-06 20:59 EDT by Masao Nishimoto CLA
Modified: 2011-06-29 11:33 EDT (History)
2 users (show)

See Also:


Attachments
patch to make the part of focus on property sheet update (3.28 KB, patch)
2011-06-06 12:28 EDT, David McKnight CLA
no flags Details | Diff
patch using post selection event rather than selection event (3.36 KB, patch)
2011-06-07 10:32 EDT, David McKnight CLA
no flags Details | Diff
patch to check for structured selection (1.65 KB, patch)
2011-06-28 09:26 EDT, David McKnight CLA
no flags Details | Diff
updated patch to account for dialog scenario (3.30 KB, patch)
2011-06-28 10:47 EDT, David McKnight CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Masao Nishimoto CLA 2011-04-06 20:59:50 EDT
In the following cases, remote file properties in the Properties view remains "Pending...".
1. RMB on a remote file
2. Double click a remote file
Comment 1 Martin Oberhuber CLA 2011-04-07 00:35:18 EDT
I think this is a duplicate of bug 308783 which has already been fixed and backported, no ?

*** This bug has been marked as a duplicate of bug 308783 ***
Comment 2 Masao Nishimoto CLA 2011-04-07 01:06:37 EDT
No.  This is not a duplicate of bug 308783.  If a remote file is selected by a left mouse button, it works.  A right mouse button or doubld click does not.
Comment 3 John W Snyder CLA 2011-06-03 11:41:30 EDT
Any news on this defect?
Comment 4 David McKnight CLA 2011-06-06 09:56:25 EDT
(In reply to comment #3)
> Any news on this defect?

I spent some time on Friday investigating this and will look at it again today.
Comment 5 David McKnight CLA 2011-06-06 12:28:27 EDT
Created attachment 197418 [details]
patch to make the part of focus on property sheet update

The property sheet is not being updated in the double-click case because, when the editor comes up, the SystemViewPart loses focus (even though the SystemView control retains focus).  When the part loses focus, it also loses it's selection event listeners - so the fireSelectionChanged() calls have no effect on the property sheet.  One way this can be overcome is by calling getWorkbenchPart().setFocus() as is done in this patch.  Does this patch resolve your issues?
Comment 6 Masao Nishimoto CLA 2011-06-07 04:17:24 EDT
The patch does not work for me.  The patch for bug 308783 does not work either.  I reopened it.
Comment 7 David McKnight CLA 2011-06-07 10:32:44 EDT
Created attachment 197497 [details]
patch using post selection event rather than selection event

I think this may depend on whether you're using Helios or Indigo.  With Helios and earlier, we need to use fireSelectionChanged() while for Indigo, we need to use firePostSelectionChanged().  This updated patch does both.  Can you try with this?
Comment 8 Masao Nishimoto CLA 2011-06-07 21:56:52 EDT
The patch solved both problems, this and bug 308783.  Would you backport it to 3.2.x?
Comment 9 David McKnight CLA 2011-06-08 12:45:11 EDT
I've committed the updated patch and opened bug 348778 for the 3.2.x backport.
Comment 10 Martin Oberhuber CLA 2011-06-08 17:26:49 EDT
This will eventually go into 3.3.1 (not released yet).
Comment 11 Martin Oberhuber CLA 2011-06-28 07:54:52 EDT
Reviewing the code, it looks like an "instanceof IStructuredSelection" is missing or there's a risk of ClassCastException
Comment 12 David McKnight CLA 2011-06-28 09:26:52 EDT
Created attachment 198723 [details]
patch to check for structured selection
Comment 13 David McKnight CLA 2011-06-28 09:27:27 EDT
(In reply to comment #11)
> Reviewing the code, it looks like an "instanceof IStructuredSelection" is
> missing or there's a risk of ClassCastException

I've attached a patch that has a check for structured selection.
Comment 14 David McKnight CLA 2011-06-28 10:47:27 EDT
Created attachment 198740 [details]
updated patch to account for dialog scenario
Comment 15 David McKnight CLA 2011-06-28 10:49:12 EDT
I checked in the update.
Comment 16 Martin Oberhuber CLA 2011-06-29 11:30:30 EDT
Patch released for I-builds.
Should any patch here be marked obsolete?
Comment 17 David McKnight CLA 2011-06-29 11:33:26 EDT
(In reply to comment #16)
> Patch released for I-builds.
> Should any patch here be marked obsolete?

I'm not sure since each subsequent patch is a diff based on the previous one.