Bug 398509 - Regression to 4.2.1: Sending of postSelection events stops working
Summary: Regression to 4.2.1: Sending of postSelection events stops working
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2.2   Edit
Hardware: All All
: P2 critical with 21 votes (vote)
Target Milestone: 4.2.2+   Edit
Assignee: Eric Moffatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 399354 400661 402238 402526 402824 403598 404887 405416 410309 (view as bug list)
Depends on:
Blocks: 400661 402526
  Show dependency tree
 
Reported: 2013-01-18 10:45 EST by Stephen Ranger CLA
Modified: 2017-12-06 13:16 EST (History)
48 users (show)

See Also:


Attachments
Patched JAR (230.87 KB, application/jar)
2013-05-07 04:10 EDT, Dani Megert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Ranger CLA 2013-01-18 10:45:58 EST
Eclipse for RCP and RAP Developers
Version: Kepler Release
Build id: 20121220-1030

When highlighting a variable/class/etc in Eclipse, it will highlight all occurrences but if I then try to switch to a new variable/class/etc it will not un-highlight the old variable and highlight the new variable. If I make Eclipse lose focus (click on another application) the highlighting is removed and I can then highlight a new variable.
Comment 1 Dani Megert CLA 2013-01-21 03:47:00 EST
This works fine for me on Windows 7 with these steps:

1. download latest (4.3 M4) 'Eclipse for RCP and RAP developers':
http://www.eclipse.org/downloads/index-developer.php

2. start new workspace

3. paste the following code into the 'Package Explorer':
public class OccurrenceTest {
	String str;
	void foo(String aString) {
		foo(str);
		foo(aString);
	}
}

4. click on any of the Java members and see the occurrences being updated


If you still see this using 4.3 M4 or newer, please provide more detailed steps to reproduce and reopen this bug.
Comment 2 Stephen Ranger CLA 2013-01-29 11:16:22 EST
I updated to 4.3 M4 and at first it worked fine. However, after about an hour of work in one file it stopped working again. Then, I tried making a small example and it doesn't seem reproducible on a regular basis. If I restart eclipse the file I had issues with occurrences now work fine. Is there anything that you think might help? I'm sorry I can't give you the specific code I'm working on but any prefs/settings/etc you think might help or anything you'd like me to try I'd be glad to do.
Comment 3 Dani Megert CLA 2013-01-29 11:19:17 EST
(In reply to comment #2)
> I updated to 4.3 M4 and at first it worked fine. However, after about an
> hour of work in one file it stopped working again. Then, I tried making a
> small example and it doesn't seem reproducible on a regular basis. If I
> restart eclipse the file I had issues with occurrences now work fine. Is
> there anything that you think might help? I'm sorry I can't give you the
> specific code I'm working on but any prefs/settings/etc you think might help
> or anything you'd like me to try I'd be glad to do.

Check for the following things when it happens again:
- are there exceptions in the .log?
- do other views still update when the selection changes (e.g. Javadoc view)?
- are errors correctly added/removed while editing but not saving?
Comment 4 Dani Megert CLA 2013-01-29 11:35:31 EST
(In reply to comment #3)
> (In reply to comment #2)
> > I updated to 4.3 M4 and at first it worked fine. However, after about an
> > hour of work in one file it stopped working again. Then, I tried making a
> > small example and it doesn't seem reproducible on a regular basis. If I
> > restart eclipse the file I had issues with occurrences now work fine. Is
> > there anything that you think might help? I'm sorry I can't give you the
> > specific code I'm working on but any prefs/settings/etc you think might help
> > or anything you'd like me to try I'd be glad to do.
> 
> Check for the following things when it happens again:
> - are there exceptions in the .log?
> - do other views still update when the selection changes (e.g. Javadoc view)?
> - are errors correctly added/removed while editing but not saving?

Also, check whether you have more than one editor open in the same class.
Comment 5 Stephen Ranger CLA 2013-02-01 10:35:29 EST
(In reply to comment #3)
> (In reply to comment #2)
> > I updated to 4.3 M4 and at first it worked fine. However, after about an
> > hour of work in one file it stopped working again. Then, I tried making a
> > small example and it doesn't seem reproducible on a regular basis. If I
> > restart eclipse the file I had issues with occurrences now work fine. Is
> > there anything that you think might help? I'm sorry I can't give you the
> > specific code I'm working on but any prefs/settings/etc you think might help
> > or anything you'd like me to try I'd be glad to do.
> 
> Check for the following things when it happens again:
> - are there exceptions in the .log?
> - do other views still update when the selection changes (e.g. Javadoc view)?
> - are errors correctly added/removed while editing but not saving?

1. there is no .log file in my eclipse directory. In my workspace, there's only one error and it had to do with loading a jar (Error while extracting name and version from file: D:\dev\jv5\lib\3rdparty\geoapi-2.2-M1.jar)

2. Javadoc view does not update. If I close the tab and re-open it works again (for a while) but eventually exhibits the same behavior.

3. Errors are correctly added/removed while typing. If I just type random text it gets a red underline and the X icon on the left and if deleted, it goes away.

4. There is only one editor open for this class

ps. sorry it took so long to get back to you. Thanks for the help.
Comment 6 Dani Megert CLA 2013-02-04 03:04:58 EST
(In reply to comment #5)
> 2. Javadoc view does not update. If I close the tab and re-open it works
> again (for a while) but eventually exhibits the same behavior.

If the 'Javadoc' and 'Declaration' view stop updating too, then this indicates a problem with selection changed events being sent out. There is nothing we can do if we do not get more detailed steps to reproduce the problem. Sorry.
Comment 7 Meng Xin Zhu CLA 2013-02-04 03:10:56 EST
Could you tell me which method or class is handling with mark occurrences?

It will be much easier for me to debug it more.

(In reply to comment #6)
> (In reply to comment #5)
> > 2. Javadoc view does not update. If I close the tab and re-open it works
> > again (for a while) but eventually exhibits the same behavior.
> 
> If the 'Javadoc' and 'Declaration' view stop updating too, then this
> indicates a problem with selection changed events being sent out. There is
> nothing we can do if we do not get more detailed steps to reproduce the
> problem. Sorry.
Comment 8 Dani Megert CLA 2013-02-04 07:18:47 EST
(In reply to comment #7)
> Could you tell me which method or class is handling with mark occurrences?

I guess it is enough to just put a breakpoint anywhere in a post-selection listener, e.g.

org.eclipse.jdt.internal.ui.infoviews.AbstractInfoView.selectionChanged(IWorkbenchPart, ISelection)

since I suspect that this event gets lost at some point. However, finding out why it gets lost will be the tricky part.
Comment 9 Stephen Ranger CLA 2013-02-07 13:52:33 EST
(In reply to comment #6)
> (In reply to comment #5)
> > 2. Javadoc view does not update. If I close the tab and re-open it works
> > again (for a while) but eventually exhibits the same behavior.
> 
> If the 'Javadoc' and 'Declaration' view stop updating too, then this
> indicates a problem with selection changed events being sent out. There is
> nothing we can do if we do not get more detailed steps to reproduce the
> problem. Sorry.

So, I installed ubuntu 12.10 and a new version of Eclipse and it still happens (so not a windows-only issue).

Also, I think I've figured out how to reproduce it as it seems to happen everytime.

1. Open Class1
2. Ctrl+Click open Class2
3. use back button on mouse to return to previous location in Class1
4. occurrence highlighting stuck

I'm using a Razer Lachesis (only mouse I have that has back buttons to test with). Closing Class2 to return to Class1 doesn't seem to break the highlighting like using the mouse's back button does
Comment 10 Stephen Ranger CLA 2013-02-07 13:55:36 EST
(In reply to comment #9)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > 2. Javadoc view does not update. If I close the tab and re-open it works
> > > again (for a while) but eventually exhibits the same behavior.
> > 
> > If the 'Javadoc' and 'Declaration' view stop updating too, then this
> > indicates a problem with selection changed events being sent out. There is
> > nothing we can do if we do not get more detailed steps to reproduce the
> > problem. Sorry.
> 
> So, I installed ubuntu 12.10 and a new version of Eclipse and it still
> happens (so not a windows-only issue).
> 
> Also, I think I've figured out how to reproduce it as it seems to happen
> everytime.
> 
> 1. Open Class1
> 2. Ctrl+Click open Class2
> 3. use back button on mouse to return to previous location in Class1
> 4. occurrence highlighting stuck
> 
> I'm using a Razer Lachesis (only mouse I have that has back buttons to test
> with). Closing Class2 to return to Class1 doesn't seem to break the
> highlighting like using the mouse's back button does
Nevermind, closing Class2 makes it happen as well (just not every time).
Comment 11 Stephen Ranger CLA 2013-02-07 13:57:26 EST
(In reply to comment #10)

Class2 doesn't need to be closed; it affects both classes after ctrl+clicking to open the reference. However, it does not seem to affect other classes that might be open before breaking.
Comment 12 Dani Megert CLA 2013-02-08 07:05:24 EST
Thanks for insisting! I can reproduce with 4.2 SR2 RC4 and 4.3 M5a.

1. paste this into the 'Package Explorer':
public class First {
	Second s;
}
public class Second {
}

2. close both editors

3. open 'First'

4. in the editor ctrl+click on "Second"

5. switch back to the first editor (doesn't matter how)

==> post-selection events are no longer fired in this editor and hence Mark Occurrences is not updated and also other things that react on post-selection no longer update, e.g. the Javadoc view.


WORKAROUND: select something in the Outline and then go back to the editor.
Comment 13 Dani Megert CLA 2013-02-08 07:06:51 EST
*** Bug 399354 has been marked as a duplicate of this bug. ***
Comment 14 Jens Ohlsson CLA 2013-03-07 13:56:24 EST
I think this should be fixed earlier than 4.3. It has big impact on code readability, and therefore, on the ide's overall usability aswell.

A patch release would be very welcome.
Comment 15 Markus Keller CLA 2013-03-08 07:03:09 EST
The bug appears somewhere near EclipseContext#invalidate(..) line 268:

	Set<Computation> namedComputations = weakListeners.getListeners(name);

In the instance that works, I get a namedComputations HashSet containing a TrackableComputationExt with a SelectionAggregator$8 runnable (line 214).

In the failing case, namedComputations is null, and hence no event is sent out.

=> Something's wrong with the weakListeners handling. That also explains why this doesn't happen all the time, and may not be reproducible in all environments.


> WORKAROUND: select something in the Outline and then go back to the editor.

This only sends out a single postSelection event when the part is reactivated. I often run into the same bug when the Git Repositories view stops sending postSelection events, and hence the Git Staging view doesn't update any more. The only workaround is to re-create the part (close view in all perspectives).
Comment 16 Dani Megert CLA 2013-03-11 12:25:13 EDT
*** Bug 402526 has been marked as a duplicate of this bug. ***
Comment 17 Dani Megert CLA 2013-03-11 12:37:51 EDT
*** Bug 402824 has been marked as a duplicate of this bug. ***
Comment 18 Paul Webster CLA 2013-03-12 15:27:52 EDT
Eric, another regression ...
PW
Comment 19 Eric Moffatt CLA 2013-03-14 14:57:57 EDT
Dani, I've been able to reproduce this using the M6 candidate. I'll start looking into it now but it sounds a lot like bug 394517 (auto-opening an editor) except in this case the newly opened editor is OK it's the switch back that isn't...

I'll continue to look at this today.
Comment 20 Dani Megert CLA 2013-03-15 03:19:07 EDT
(In reply to comment #19)
> Dani, I've been able to reproduce this using the M6 candidate. I'll start
> looking into it now but it sounds a lot like bug 394517 (auto-opening an
> editor) except in this case the newly opened editor is OK it's the switch
> back that isn't...
> 
> I'll continue to look at this today.

Thanks!
Comment 21 Eric Moffatt CLA 2013-03-18 14:42:41 EDT
Need to look at bug 403598 as well since I suspect that there's a similar root cause to both...
Comment 22 René Krell CLA 2013-04-01 02:45:41 EDT
Isn't bug 400661 related, too?
Comment 23 Dani Megert CLA 2013-04-04 11:03:58 EDT
*** Bug 404887 has been marked as a duplicate of this bug. ***
Comment 24 Eric Moffatt CLA 2013-04-04 13:33:58 EDT
http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=24cee195f6bf8e51d662813fbd690df6b2ce3680

This commit matches the code in the selection RAT by removing the context from the 'tracked' context map, making the two RATs symmetric. Why this fixes the issue and especially why only the ctrl-click activation causes the problem are issues that *must* be investigated but likely post-4.3...
Comment 25 Jonas Petersen CLA 2013-04-04 15:18:34 EDT
(In reply to comment #24)
> ...especially why only the ctrl-click activation causes the
> problem are issues that *must* be investigated but likely post-4.3...

Can't confirm that only the ctrl-click activation causes the problem. I suffer from this problem (specifically bug 400661) and it definitely occurs without using ctrl-click. I'm pressing F3 most of the time to jump to locations. Which is not triggering the effect (whereas ctrl-click reproducibly is). Sooner or later it will happen due to some other reason. I have not yet found out what it is exactly.
Comment 26 Dani Megert CLA 2013-04-05 07:04:14 EDT
(In reply to comment #25)
> (In reply to comment #24)
> > ...especially why only the ctrl-click activation causes the
> > problem are issues that *must* be investigated but likely post-4.3...
> 
> Can't confirm that only the ctrl-click activation causes the problem. 

Correct. See e.g. bug 404887 for a scenario without Ctrl+Click. The good news is, that the fix also fixes that one.
Comment 27 Dani Megert CLA 2013-04-05 07:04:31 EDT
*** Bug 400661 has been marked as a duplicate of this bug. ***
Comment 28 Dani Megert CLA 2013-04-05 08:28:47 EDT
Cherry-picked to 4.2.2+ with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=2223c41bef449202fb6017ee8d7a571cf3e5010f

And also updated the bundle version.
Comment 29 Bing-Yi Wong CLA 2013-04-07 23:38:05 EDT
Thanks!  A stupid question: what should I do if I want to apply this patch?  Should I extract the zip file to eclipse root folder and override everything?
Comment 30 Paul Webster CLA 2013-04-08 08:01:46 EDT
(In reply to comment #29)
> Thanks!  A stupid question: what should I do if I want to apply this patch? 
> Should I extract the zip file to eclipse root folder and override everything?

For Kepler, you just need to pick up this week's I build.  For 4.2.2, you would have to rebuild the plugins that were effected by the patch, create a feature patch for them, and then install them using Help>Install New Software (either export them from your workspace or get the CBI build working)

PW
Comment 31 Garret Wilson CLA 2013-04-08 09:02:55 EDT
Dare a say that this is a crucial bug that disables an important feature many developers use *every few minutes* in their day-to-day work; that requiring developers to risk other bugs by installing a nightly build or manually rebuilding a patch is inappropriate; and that if this bug is fixed a new release via the update site should be made available immediately.
Comment 32 Paul Webster CLA 2013-04-08 09:42:10 EDT
(In reply to comment #31)
> Dare a say that this is a crucial bug that disables an important feature
> many developers use *every few minutes* in their day-to-day work; that
> requiring developers to risk other bugs by installing a nightly build or
> manually rebuilding a patch is inappropriate; and that if this bug is fixed
> a new release via the update site should be made available immediately.

The next opportunity to pick up this fix officially would be in Kepler M7 (4 weeks from now) or for a full release, Kepler (June 2013).

There are no people (or resources) to spin a new release of Juno (complete with EPPs) after SR2.  I could (time permitting) pre-package whatever is in 4.2.2+ up to this point but that's all it would be, a developer feature patch (with its associated risk of other bugs), not a new release that's been tested.

PW
Comment 33 Paul Webster CLA 2013-04-09 10:06:20 EDT
*** Bug 403598 has been marked as a duplicate of this bug. ***
Comment 34 Bing-Yi Wong CLA 2013-04-10 01:38:43 EDT
(In reply to comment #30)

That sounds difficult to me to rebuild the plugins.  I guess I'll have to wait for Kepler release.
Comment 35 Dani Megert CLA 2013-04-11 03:45:14 EDT
*** Bug 405416 has been marked as a duplicate of this bug. ***
Comment 36 Endre Stølsvik CLA 2013-04-16 03:37:23 EDT
You should get out a hotfix for Juno, IMHO. Waiting till June for to get a fix for this exceptionally important feature is pretty bad.

Except from typing in text into the editor and moving the cursor around, this is the most important feature for a code editor for me!
Comment 37 Endre Stølsvik CLA 2013-04-16 03:43:41 EDT
Several StackOverflow questions about this problem. Here's a link to the two workarounds that at least gets your current occurrences highlighted: http://stackoverflow.com/a/16031157/39334

(In addition, having Alt+Shift+O toggle this feature is probably one of the worse ideas in Eclipse, as people accidentially hits this combination instead of Organize Imports, Ctrl+Shift+O. And then you get the boatload of questions on StackOverflow and other media that complains about highlight occurrences not working.. Btw, who wants to turn this off? Who needs to turn this on and off often?)
Comment 38 Aljaz Jamnik CLA 2013-04-18 04:58:12 EDT
Hello,

I have tried to install the latest version from http://www.eclipse.org/downloads/index-developer.php, Eclipse IDE for Java EE Developers, 32 bit version (eclipse-jee-kepler-M6-linux-gtk). The issue persists.
I am running on 32 bit linux (Kubuntu 12.10).

Thank you. I am available for any additional details.



(In reply to comment #30)
> (In reply to comment #29)
> > Thanks!  A stupid question: what should I do if I want to apply this patch? 
> > Should I extract the zip file to eclipse root folder and override everything?
> 
> For Kepler, you just need to pick up this week's I build.  For 4.2.2, you
> would have to rebuild the plugins that were effected by the patch, create a
> feature patch for them, and then install them using Help>Install New
> Software (either export them from your workspace or get the CBI build
> working)
> 
> PW
Comment 39 Dani Megert CLA 2013-04-18 05:09:35 EDT
(In reply to comment #38)
> Hello,
> 
> I have tried to install the latest version from
> http://www.eclipse.org/downloads/index-developer.php, Eclipse IDE for Java
> EE Developers, 32 bit version (eclipse-jee-kepler-M6-linux-gtk). The issue
> persists.

That's expected. You downloaded M6, but the fix will be in the M7 packages. In the meantime you could download the Eclipse SDK and install the bundles you need.

http://download.eclipse.org/eclipse/downloads/drops4/I20130416-0800/
Comment 40 Aljaz Jamnik CLA 2013-04-18 05:39:16 EDT
I see, apologies for the misunderstanding.

Appreciate your help, will play around with the SDK. Thanks.

(In reply to comment #39)
> (In reply to comment #38)
> > Hello,
> > 
> > I have tried to install the latest version from
> > http://www.eclipse.org/downloads/index-developer.php, Eclipse IDE for Java
> > EE Developers, 32 bit version (eclipse-jee-kepler-M6-linux-gtk). The issue
> > persists.
> 
> That's expected. You downloaded M6, but the fix will be in the M7 packages.
> In the meantime you could download the Eclipse SDK and install the bundles
> you need.
> 
> http://download.eclipse.org/eclipse/downloads/drops4/I20130416-0800/
Comment 41 Kadir Gumus CLA 2013-04-18 10:12:15 EDT
I agree! This bug hinders/bothers me much while developing, and makes me close/reopen my current editor, or restarting eclipse twice or more daily. I am aware that you guys doing splendid work for all of us, and busy with all this stuff. But, can't we get a hotfix at least soon, please?

(In reply to comment #36)
> You should get out a hotfix for Juno, IMHO. Waiting till June for to get a
> fix for this exceptionally important feature is pretty bad.
> 
> Except from typing in text into the editor and moving the cursor around,
> this is the most important feature for a code editor for me!
Comment 42 Garret Wilson CLA 2013-04-18 11:58:40 EDT
Yeah, I think some priorities are misplaced here. 4.3M6 was just released---but do we really have to have a new color constant for hyperlinks? Are we stuck in our development because we don't have "Convert to if-!-return" in QuickAssist?

I know that as a developer my priority is that I want an Eclipse that works and doesn't take away a central feature I use every few minutes, in the process putting my IDE back on the same level as Visual Studio 2010. I think these new snazzy features are wonderful. Sure, when you refactor and add things, sometimes you break existing functionality. But when you do, especially something so fundamental, I think there's a duty to fix what was broken before playing with more bells and whistles.

We need a a 4.2.3 with this fixed more than we need a 4.3M7.
Comment 43 Igor Muntyan CLA 2013-04-18 12:33:00 EDT
Completely agree with everyone asking for a quicker fix. This is a core feature that is too important to defer to the next major release. I understand the resource constraints and considering the free nature of Eclipse wouldn't insist on emergency fix but this functionality is absolutely essential.
Comment 44 Paul Webster CLA 2013-04-19 07:36:31 EDT
For those looking to pick this up early, you can now build eclipse yourself (with maven).  http://wiki.eclipse.org/Platform-releng/Platform_Build

If anybody wants to build the current state of 4.2.2+ and contribute a feature patch I can help them.  I might be able to put one together myself, but it'll be in a little while.

PW
Comment 45 Eric Moffatt CLA 2013-04-19 13:59:29 EDT
I strongly encourage those folks that are being impacted by this to pick up M7 once it arrives. Comments such as 'risk another set of defects' had *better* be unfounded...this is M7, meaning that it's essentially what Kepler will be (we're well past developing new features...).

It'll be out at the end of next week so the wait isn't overly long (and thanks for your patience to this point!). It'd also be helpful of you could post back here either saying that it's now working or giving scenarios in which it may still fail. We don't know of any but if there are still corner cases knowing while we still have time to correct it is always a good thing.
Comment 46 David Balažic CLA 2013-04-19 14:09:14 EDT
(In reply to comment #45)
> I strongly encourage those folks that are being impacted by this to pick up
> M7 once it arrives. Comments such as 'risk another set of defects' had
> *better* be unfounded...this is M7, meaning that it's essentially what
> Kepler will be (we're well past developing new features...).

And we currently use service release, not one, but two, yet it still has this and many other bugs. I'll just list them here:
 - Perspective switching locks up. The buttons react, some part of the GUI change, but most views stay unchanged. At the same time the File / Restart menu item gets disabled (grayed out).
 - Text Compare, sometimes its toolbar does not appear, other times the "Ignore white space" button is grayed out
 - Bug 398509
 - can't change the order of Perspective button by DND
 - Run As context menu subitem disappears ("JUnit Test") until restart

All this in two days of usage (read: there are many more not yet discovered/encountered by me)

I sincerely hope Kepler has a whole different release criteria.
Comment 47 David Balažic CLA 2013-04-22 15:14:29 EDT
keyboard shortcut stop working at random. (currently ctrl-m dos no (un)maximize any view, it worked just 5 minutes ago)
Comment 48 Paul Webster CLA 2013-04-25 07:19:00 EDT
I've tried creating a feature patch against a post 4.2.2 build, http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/featurePatch?h=pwebster/exampleFeaturePatch

Unfortunately with tycho I ran into bug 406104 and bug 389698.  The PDE build there seems to create the feature patch, but when applied it doesn't seem to replace o.e.ui.workbench. bug 406532

If anybody has any luck with either the PDE build or the tycho build included in that branch, please let us know.

PW
Comment 49 Missing name CLA 2013-04-26 23:30:14 EDT
I'm using 4.3 M6 and experience this bug.  Even switching application focus does not help, I can switch back and forth several times and my previous highlight remains, and selecting a new variable does not change the highlight.  Using 64-bit on Win8.  So is this completely resolved in M7?
Comment 50 Missing name CLA 2013-04-27 00:35:11 EDT
Is this bug related?  Maybe some type of general editor refreshing problem?
https://bugs.eclipse.org/bugs/show_bug.cgi?id=403401
Comment 51 Dani Megert CLA 2013-04-29 03:33:43 EDT
(In reply to comment #49)
> I'm using 4.3 M6 and experience this bug.

This is expected, see comment 39.


>  Even switching application focus
> does not help, I can switch back and forth several times and my previous
> highlight remains, and selecting a new variable does not change the
> highlight.  Using 64-bit on Win8.  So is this completely resolved in M7?

Please try the following build and let us know, if your case is fixed:
http://download.eclipse.org/eclipse/downloads/drops4/I20130428-2000/
Comment 52 Missing name CLA 2013-05-01 01:45:17 EDT
Yes, working great in that build!  Thank you very much!

Been using M6 for a bit and it seems very high quality overall.  This was the one issue I ran into and I find it a very useful feature, so really glad to see it's resolved.  4.3 should be a good release.  Good work to the team.
Comment 53 Stephen Ranger CLA 2013-05-03 10:34:16 EDT
(In reply to comment #51)
> (In reply to comment #49)
> > I'm using 4.3 M6 and experience this bug.
> 
> This is expected, see comment 39.
> 
> 
> >  Even switching application focus
> > does not help, I can switch back and forth several times and my previous
> > highlight remains, and selecting a new variable does not change the
> > highlight.  Using 64-bit on Win8.  So is this completely resolved in M7?
> 
> Please try the following build and let us know, if your case is fixed:
> http://download.eclipse.org/eclipse/downloads/drops4/I20130428-2000/

If I'm using M6 already, which one should I download to apply the fix to my existing eclipse install?
Comment 54 Eric Moffatt CLA 2013-05-03 10:39:45 EDT
My suggestion would be to wait and just get M7 when it comes out next week. Any of the recent I-builds will also contain the fix.
Comment 55 Garret Wilson CLA 2013-05-06 11:23:58 EDT
So I have an installation of 4.2.2 that I've been using for months. I installed the generic 4.2.1; and then carefully installed all the plugins I need, the formatting definitions I need, the server definitions I need, etc.; and then did an update to 4.2.2 via a normal in-app "check-for-updates".

Question 1: How do I update my 4.2.2 installation to 4.3M7 without disturbing my plugins and settings? Is there an update site I need to add?

Question 2: If I upgrade to M7, will this interfere with the software's ability to update to 4.3 final when it is released?
Comment 56 Eric Moffatt CLA 2013-05-06 14:33:52 EDT
Garret, your comment is a fine example of a complete non sequitur...;-).

You'll have much better luck posting your question to the platform-ui mailing list IMO...
Comment 57 Garret Wilson CLA 2013-05-06 18:48:42 EDT
Just to summarize:

Users: Dear Eclipse, in 4.2.2 you've broken a fundamental editing feature.

Eclipse: Sorry about that.

Users: Um... can you release a patch with the fix?

Eclipse: Sorry, we don't have time. We're too busy making content assist automatically append ';' to void methods.

Users: But this is core functionality we use day-to-day in the editor! We'd rather have the editor un-broken than to have more bells and whistles.

Eclipse: If you want it fixed so bad, make a feature patch yourself based on 4.2.2.

Users: We tried to create a feature patch, but we can't because of *other* bugs such as bug 406104, bug 389698 and bug 406532.

Eclipse: Well, then, install 4.3M7.

Users: But is it possible to update our 4.2.2 installation to 4.3M7 without losing our current plugins and settings, as we could if you would have released a 4.2.3 with the fix on the update site like we asked?

Eclipse: That's a fine example of a complete non sequitur. Go ask somebody else.

Users: (sigh) We get the hint.
Comment 58 Paul Webster CLA 2013-05-06 19:53:02 EDT
(In reply to comment #57)
> Just to summarize:
> [...snip...]
> Users: We tried to create a feature patch, but we can't because of *other*
> bugs such as bug 406104, bug 389698 and bug 406532.

That's an Eclipse committer that created the feature patches (me), not the Users.  And another committer is now looking at one of those bugs to see why it won't install properly.

You can still step up and help too.  That's why we post these things publicly, there aren't enough committers to look at everything at the same time but there is a large enough community (it just takes time for them to get the information).

PW
Comment 59 Dani Megert CLA 2013-05-07 03:53:27 EDT
(In reply to comment #57)
> Users: Um... can you release a patch with the fix?
> 
> Eclipse: Sorry, we don't have time. We're too busy making content assist
> automatically append ';' to void methods.

Just for your records: the person who worked on said content assist feature is working on/for a completely different component. So, the only thing besides providing that content assist feature would have been to do nothing and wait.
Comment 60 Dani Megert CLA 2013-05-07 04:10:58 EDT
Created attachment 230566 [details]
Patched JAR

This is a patched 'org.eclipse.e4.ui.workbench_0.11.0.v20130125-100758.jar'. You can replace the one in <your install>/plugins folder and all should be good.

DISCLAIMER: This is not the way one should updated/patch an install. Use at your own risk!
Comment 61 Guillaume Simard CLA 2013-05-07 14:36:59 EDT
(In reply to comment #60)
> Created attachment 230566 [details]
> Patched JAR
> 
> This is a patched 'org.eclipse.e4.ui.workbench_0.11.0.v20130125-100758.jar'.
> You can replace the one in <your install>/plugins folder and all should be
> good.
> 
> DISCLAIMER: This is not the way one should updated/patch an install. Use at
> your own risk!

Thanks for this fix. This bug was driving me crazy.
I sincerely hope that we'll get a more official fix to this issue but in the meantime replacing this jar will have to do.

Cheers!
Comment 62 John Arthorne CLA 2013-05-07 15:10:36 EDT
(In reply to comment #57)
> Users: But is it possible to update our 4.2.2 installation to 4.3M7 without
> losing our current plugins and settings, as we could if you would have
> released a 4.2.3 with the fix on the update site like we asked?

Yes it is possible.

1) Help > Install New Software
2) Paste this URL: http://download.eclipse.org/eclipse/updates/4.3milestones
3) Select Eclipse SDK, Next, accept license, Finish

This will upgrade you to 4.3 M7, which is also the first release candidate for the 4.3 release. This is not release quality but is a solid build that fixes your problem. You will be able to upgrade again from M7 to 4.3.0 final next month when it comes out.
Comment 63 Garret Wilson CLA 2013-05-07 15:51:46 EDT
(In reply to comment #62)
> (In reply to comment #57)
> > Users: But is it possible to update our 4.2.2 installation to 4.3M7 without
> > losing our current plugins and settings, as we could if you would have
> > released a 4.2.3 with the fix on the update site like we asked?
> 
> Yes it is possible.
> 
> ...
> 2) Paste this URL: http://download.eclipse.org/eclipse/updates/4.3milestones
> ...

Wow, John, thanks for your complete and concise answer! That's really all I was asking.

I suspect many people coming to this bug would be satisfied if they saw some sort of sticky-note saying, "This bug has been fixed in 4.3M7, to which you can upgrade your current installation by adding http://download.eclipse.org/eclipse/updates/4.3milestones to your Available Software Sites".

Thanks again, John. Much appreciated.
Comment 64 Endre Stølsvik CLA 2013-05-08 02:29:37 EDT
Dani Megert: Fantastic. Finally. That's what we need: A person that know their shit and just fixes it for everybody, without lame excuses and whatnot. It would obviously have been even greater 2-3 months ago, when the realization dawned what was the bug.. - but anyway, thanks.

John Arthorne: Great.
Comment 65 David Balažic CLA 2013-05-15 06:30:41 EDT
(In reply to comment #62)
> (In reply to comment #57)
> > Users: But is it possible to update our 4.2.2 installation to 4.3M7 without
> > losing our current plugins and settings, as we could if you would have
> > released a 4.2.3 with the fix on the update site like we asked?
> 
> Yes it is possible.
> 
> 1) Help > Install New Software
> 2) Paste this URL: http://download.eclipse.org/eclipse/updates/4.3milestones
> 3) Select Eclipse SDK, Next, accept license, Finish
> 
> This will upgrade you to 4.3 M7, which is also the first release candidate
> for the 4.3 release. This is not release quality but is a solid build that
> fixes your problem. You will be able to upgrade again from M7 to 4.3.0 final
> next month when it comes out.

This does not work for me.
I have:
Eclipse Java EE IDE for Web Developers.
Version: Juno Service Release 2
Build id: 20130225-0426

And after doing the above, I get:

Cannot complete the install because of a conflicting dependency.
  Software being installed: Eclipse SDK 4.3.0.I20130502-0800 (org.eclipse.sdk.ide 4.3.0.I20130502-0800)
  Software currently installed: Eclipse IDE for Java EE Developers 1.5.2.20130211-1820 (epp.package.jee 1.5.2.20130211-1820)
  Only one of the following can be installed at once: 
    Refactoring UI 3.7.0.v20120523-1543 (org.eclipse.ltk.ui.refactoring 3.7.0.v20120523-1543)
    Refactoring UI 3.7.100.v20130225-1753 (org.eclipse.ltk.ui.refactoring 3.7.100.v20130225-1753)
  Cannot satisfy dependency:
    From: Eclipse IDE for Java EE Developers 1.5.2.20130211-1820 (epp.package.jee 1.5.2.20130211-1820)
    To: org.eclipse.epp.package.jee.feature.feature.group [1.5.2.20130211-1820]
  Cannot satisfy dependency:
    From: Java EE IDE Feature 1.5.2.20130211-1820 (org.eclipse.epp.package.jee.feature.feature.group 1.5.2.20130211-1820)
    To: org.eclipse.platform.feature.group [4.2.1.v20130118-173121-9MF7GHYdG0B5kx4E_SkfZV-1mNjVATf67ZAb7]
  Cannot satisfy dependency:
    From: Eclipse Platform 4.2.1.v20130118-173121-9MF7GHYdG0B5kx4E_SkfZV-1mNjVATf67ZAb7 (org.eclipse.platform.feature.group 4.2.1.v20130118-173121-9MF7GHYdG0B5kx4E_SkfZV-1mNjVATf67ZAb7)
    To: org.eclipse.ltk.ui.refactoring [3.7.0.v20120523-1543]
  Cannot satisfy dependency:
    From: Eclipse Platform 4.3.0.v20130502-0800 (org.eclipse.platform.feature.group 4.3.0.v20130502-0800)
    To: org.eclipse.ltk.ui.refactoring [3.7.100.v20130225-1753]
  Cannot satisfy dependency:
    From: Eclipse Project SDK 4.3.0.v20130502-0800 (org.eclipse.sdk.feature.group 4.3.0.v20130502-0800)
    To: org.eclipse.platform.feature.group [4.3.0.v20130502-0800]
  Cannot satisfy dependency:
    From: Eclipse SDK 4.3.0.I20130502-0800 (org.eclipse.sdk.ide 4.3.0.I20130502-0800)
    To: org.eclipse.sdk.feature.group [4.3.0.v20130502-0800]
Comment 66 Paul Webster CLA 2013-05-15 06:54:28 EDT
(In reply to comment #65)
> This does not work for me.
> I have:
> Eclipse Java EE IDE for Web Developers.
> Version: Juno Service Release 2
> Build id: 20130225-0426
> 
> And after doing the above, I get:

The M7 upgrade only works for installs of the Eclipse SDK (Classic).  For any of the EPP packages, you need the feature patch (not currently working) or to actually pick up an M7 EPP package (you might be able to upgrade an existing EPP install using http://download.eclipse.org/releases/kepler in addition to the 4.3milestone repository)

PW
Comment 67 Endre Stølsvik CLA 2013-05-15 07:47:49 EDT
@David: Use the jar-hack from Dani!
Comment 68 Stephen Ranger CLA 2013-05-15 09:43:09 EDT
I've been using 4.3 M7 since it was posted on the main download page a few days ago and the issue I posted the bug for seems to have indeed been fixed (I trusted your word but just thought I'd verify). Thanks for your hard work and my sanity appreciates it. I'd have updated earlier but as a comment two above me stated, the update didn't work unless you had Classic. Oh well, M7 is out and it's looking good. Thanks again!
Comment 69 Paul Webster CLA 2013-05-24 11:38:28 EDT
I've created a possible feature patch for the EPP Juno SR2.  You can test it by installing from http://download.eclipse.org/eclipse/updates/tmpJunoSR2

You have to install both feature patches:
    Eclipse RCP 4.2.2+ Patch	1.0.0.v20130524-1415
    Eclipse4 RCP 4.2.2+ Patch	1.0.0.v20130524-1415


PW
Comment 70 Adam Steiner CLA 2013-06-07 11:31:12 EDT
(In reply to comment #60)
> Created attachment 230566 [details]
> Patched JAR
> 
> This is a patched 'org.eclipse.e4.ui.workbench_0.11.0.v20130125-100758.jar'.
> You can replace the one in <your install>/plugins folder and all should be
> good.
> 
> DISCLAIMER: This is not the way one should updated/patch an install. Use at
> your own risk!

This works with my installation, which was Eclipse Platform 4.2.1, with hand-picked plugins, then updated to 4.2.2

Dani Megert: Thank you, thank you, thank you for the jar.  This issue has been bugging me for weeks (if not longer).  This feature has become so essential to my coding/refactoring that its hard using other IDEs that don't (VS 2010, I'm looking your way)

And also thank you Eric Moffatt for fixing.
Comment 71 Dani Megert CLA 2013-06-10 07:54:25 EDT
*** Bug 410309 has been marked as a duplicate of this bug. ***
Comment 72 David Balažic CLA 2013-10-25 12:12:10 EDT
I still see this occasionally in Eclipse 4.3.1.

I select a variable name in Java source and it and its occurrences are highlighted.
Then I click on another variable, but still the previous one is highlighted.
alt-tab to another window and back "fixes" it: the new variable is highlighted.


Eclipse Java EE IDE for Web Developers.

Version: Kepler Service Release 1
Build id: 20130919-0819


Windows 7 Pro SP1 64 bit
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Should I open a new bug?
Comment 73 Paul Webster CLA 2013-10-25 12:25:31 EDT
(In reply to David  Balažic from comment #72)
> 
> Should I open a new bug?

Yes please.

PW
Comment 74 Alexander Kurtakov CLA 2017-12-06 13:16:28 EST
*** Bug 402238 has been marked as a duplicate of this bug. ***