Community
Participate
Working Groups
When I press CTRL+SHIFT+T to open OpenType dialog and type sth. to find a type. If the type has both in source file and jar file, it will display twice. But we always find the type in source file. Would you please provide a option checkbox to disable find type in jar file in Open Type dialog. Thanks!
Moving to JDT UI for comment
What you suggest seems a bit too specific to me. Did you see that you select a working set in the open type dialog's view menu? You could for example create a working set that contains everything except the JAR's you don't like. Setting to remind.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.
Still valid.
*** Bug 536210 has been marked as a duplicate of this bug. ***
This is still open (and relevant) in 4.12. I think we probably need more than a checkbox to filter classes from JAR files. Instead the "Open Type" dialog should be a bit more intelligent. 1. Consider only Java classes of my most recently used project 2. Consider only Java classes of dependent projects of my most recently used project 3. ... ... 20. Consider Java classes from the java.* namespace 21. Consider Java classes from the sun.* namespace ... Example of the current behavior: We have a class "Entity" in our project. When I try to open "Entity" then the first hits I get are: - com.sun.tools.doclint [adoptopenjdk11] - com.sun.xml.internal.stream [adoptopenjdk11] - java.swing.text.html.parser [adoptopenjdk11] - javax.ws.rs.client [java.ws.rs-api-2.1.1.jar] ... - my own Entity class I think this should be somehow improved.
I was just looking for an enum "Action" in my workspace (yes, probably not a really good name), was scared about the order of the results and remembered this bug ... Any progress on that? The point is that my "Action" enum appeared at the 37th position (I had to scroll down). Some of the "Action" classes shown before my workspace "Action" come from transitive dependencies of libraries I'm using (something like org.apache.commons.math3.ode.events.Action). Another idea how to improve the user experience for "Open Type": Maybe show matches from JAR files in a different color or style (= highlight the classes from the workspace). This could already improve the situation a lot, even without improved ordering.
i guess this case is also describing the bit that i like to have that when searching for something that the sort order is always "workspace/source types first" for example in our source we have a class called "Row" but there are are lot more people that think "Row" is a good name ;) So there are many Row classes in all the binary jars, so my Row class if i search for it is only 13th! position.. I would love to have an option (or could be completely default) that source stuff are always sorted first and then library/binary classes.
I like IntelliJ's behavior: Initially the dialog only shows types from the opened project. To include everything else, there's a "include non-project items" checkbox - which is triggered by the same key binding as the dialog.
is this the place where the current sorting is done? https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/tree/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredTypesSelectionDialog.java#n1157 Not sure if we have there enough info that i can decide this is a source thing or a class? Because then i could easily make a quick gerrit patch
(In reply to Johan Compagner from comment #10) > is this the place where the current sorting is done? > > https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/tree/org.eclipse.jdt.ui/ui/ > org/eclipse/jdt/internal/ui/dialogs/FilteredTypesSelectionDialog.java#n1157 > > Not sure if we have there enough info that i can decide this is a source > thing or a class? Because then i could easily make a quick gerrit patch Apparently that compare already checks for source types (getElementTypeCategory). But only if the fully qualified names are equal. Might make sense to bump the source comparison before compareTypeContainerName, i.e. 1) simple name 2) deprecation 3) from sources 4) package name 5) container name
ahh right.. i didn't notice that but i think the only thing we want is that he lines: https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/tree/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredTypesSelectionDialog.java#n1169 until 1174 are just done first... so source is always on top and sorted by itself.
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/166692
i made that patch and updated my own 4.16 install with that. For me that works perfectly, now the once i really search for are really on top (for the most part i am wanting to open source files, not searching for binaries)
created another bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=565467