Community
Participate
Working Groups
Fairly often I need to import SWT classes, which have same names as classes from other libraries, for example Color. And often I know, that I want SWT class, not from other libraries. So it would be nice to have possibility to limit next selection from several choices in dialog one or two, most usefull and when I will press Ctrl+Shift+O I will see only these choices. And have another hot key for displaying all choices.
If we provide such a filter then it should also be honored by code assist and add import
*** Bug 16300 has been marked as a duplicate of this bug. ***
*** Bug 37829 has been marked as a duplicate of this bug. ***
*** Bug 39267 has been marked as a duplicate of this bug. ***
From Bug 39267: Two useful way of defining unwanted packages are to say what I do allow, for example: allow only: com.mycompany.* or to say what I do deny. deny any com.ms.* I suggest to have UI for both options. such setting should be workspace wide, but should be overrideable at the project level.
Yup, this is something I've often wanted, when dealing with lots of 3rd party libraries, each of which seems to have a lot of similarly named classes to mine :) And indeed that would be another option for the UI of the filter: be able to say, "I want to be able to import automatically from the project's source code and the JRE itself." (etc) Of course, it shouldn't screw up when you've deliberately imported something from another library...
good point..
I think that these configuration parameters should be "workspace wide" and "project specific". Furthermore, browser dialogs that pay attention to these should offer a "local one-time-override" if practical.
I don't know if I may add it here but I also wish to filter my code assistant and I was pointed here. I was thinking if it is possible to give it some more 'intelligence'. I was thinking about the sorting and what's the first suggestion at all. I know it's dealing type assoziates and closest guess and stuff (and it works well). But mostly when a new import statement is needed (type unknown) it missguesses every time. For example if I import Map or List I get many guesses but I only constantly need them from java.util.*. Therefore it would be great if the code assistant would be able to store some statistic informations. A simple mapping from input to type would save me most of scrolling, pointing, and clicking stuff (just hit enter - it was the first guess - yipey). And if this mapping is persistantly stored it would ease everything for me ;). Summery: Add simple mapping of input to type. Type 'List' and select the java.util.List and the next time 'List' is typed, the code assist's first guess will be java.util.List rather then *.swt.List or *.awt.List. To limit memory footprint the map may only contain the latest and the most often used inputs. If this is already implemented I would like to say sorry ;) I am using Eclipse 2.1
*** Bug 46559 has been marked as a duplicate of this bug. ***
Added a 'Type Filter' preference page where you can select package names with wild cards to specify types you don't want to show up in 'all types', 'code assist' and quick fix proposals. This is experimental so far. Filters are defined workbench global and should not really be implemented in the UI but in the core. > 20031205
Would be great to have this filter not only global for all workspace, but also for project and for individual packages. I.e. if you set filter for project, it should be used for all packages of this project. But you can also set different filter for any package (and all sub-packages, yes, I know, that there is not such thing as package hierarhy, but this would be useful), so for this package only package filter will be used. For example, if you write application that uses SWT and Draw2d, for some packages you want to use Point/Rectangle from SWT, but for another - from draw2d.