Community
Participate
Working Groups
Eclipse modeling, Neon.1 Type String s; s.|equals( (At "|" hit ctrl+space for auto-completion proposals, then continue typing) This gets me s.contentEquals( which is not what I typed. Since "s.equals(" is valid code I would expect the assist to leave my text alone.
Quite annoying, I agree. Actually looks exactly like - bug 481752 comment 11 - bug 483511 comment 2 But all these are supposed to be resolved in Neon, see also bug 483895 and bug 487668 Just to rule out one possible cause, could you please paste the exact versions of plugins org.eclipse.jdt.core and org.eclipse.jdt.ui?
Hmm, theoretically that should be queryable, but no idea how. I used OSGI console in the end, I hope this is what you need: osgi> lb org.eclipse.jdt.core START LEVEL 6 ID|State |Level|Name 553|Active | 4|Java Development Tools Core (3.12.1.v20160829-0950) 554|Active | 4|Java Code Manipulation Functionality (1.7.0.v20160419-0705) osgi> lb org.eclipse.jdt.ui START LEVEL 6 ID|State |Level|Name 564|Active | 4|Java Development Tools UI (3.12.1.v20160822-0645)
Updating my Eclipse doesn't seem to work, it can't find a repo with the correct jgit or egit version, it says. If this is needed, I'd need to download a new eclipse I guess.
(In reply to Stephan Herrmann from comment #1) > Quite annoying, I agree. Were you able to reproduce? I'm not, using http://download.eclipse.org/eclipse/downloads/drops4/S-4.7RC2-201705242000/
(In reply to Dani Megert from comment #4) > (In reply to Stephan Herrmann from comment #1) > > Quite annoying, I agree. > > Were you able to reproduce? No. (this comment referred just to the bug in general).
I updated to Neon.3 modeling, and the issue is still there. I also tried the above version with a new work space, new project, new class, and then it works as expected. This suggests the workspace is breaking things?
(In reply to Albert Hofkamp from comment #6) > I updated to Neon.3 modeling, and the issue is still there. > I also tried the above version with a new work space, new project, new > class, and then it works as expected. > > This suggests the workspace is breaking things? Not necessarily. I'd have to check, but Modelling might include Code Recommenders. Are you using that? Can you try your steps using http://download.eclipse.org/eclipse/downloads/drops4/S-4.7RC2-201705242000/ and a fresh workspace? Just to make sure that I don't see the issue because I use different steps.
I never heard of Code Recommenders, so I don't use them consciously :p I Ran more tests, thinking it might be context-related, and made a self-contained case based on my real code, in 2 classes shown below. Likely still too big, but this was the quickest way to get working. The example reproduces in Neon.3 modeling. I also tried your 4.7RC2 and there is works correctly (does not reproduce). ----------------- public class Event { public String name; } ----------------- import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; public class X { public static Event computeEventSets(Set<Event> supAlphabet, String tickEventName, String observeSuffix, String enableSuffix, Set<Event> plantEvents, Set<Event> observeEvents, Map<Event, Event> enableEventMap) { // Supervisor alphabet should contain a) all plant events, b) all observe events (one for each plant event), and tick event. int expectedSize = Math.max(supAlphabet.size() / 2, 1); plantEvents = new LinkedHashSet<>(expectedSize); observeEvents = new LinkedHashSet<>(expectedSize); enableEventMap = new LinkedHashMap<>(expectedSize); Map<String, Event> plantEventNames = new LinkedHashMap<>(expectedSize); Map<String, Event> observeEventNames = new LinkedHashMap<>(expectedSize); Event tickEvent = null; for (Event evt : supAlphabet) { // Connect tickevent name with the actual event. if (evt.name.equals(tickEventName)) { tickEvent = evt; continue; } // String s; // s.contentEquals(cs) // Reprodcues in Neon.3 modeling } return tickEvent; } }
> I also tried your 4.7RC2 and there is works correctly (does not reproduce). Thank you. I am sorry, but we can't do anything if we do not get steps based on one of "our" downloads. If you can provide steps based on http://download.eclipse.org/eclipse/downloads/drops4/S-4.7RC2-201705242000/ or newer, then please reopen. Sorry.
Ok, thanks for your efforts
Created attachment 279515 [details] Video showing problematic auto completion
I just added a video showing the behavior using Eclipse Version: 2019-03 (4.11.0) Build id: 20190314-1200. If you need me to produce a self contained project showing the problem, I'd be happy to do that. Cheers, Wallace
(In reply to Wallace Mann from comment #12) > I just added a video showing the behavior using Eclipse Version: 2019-03 > (4.11.0) > Build id: 20190314-1200. If you need me to produce a self contained project > showing the problem, I'd be happy to do that. That'd be nice. I don't see this behavior on HEAD. Using a similar example, I see put* appearing nicely at the top.
@Wallace, the above question about installed plug-ins is relevant also for you. So: which Eclipse package did you install? Any additional plug-ins on top?