Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[recommenders-dev] [models] DependencyInfo.hints needs to be Map<String, String>?

Hi,

today I looked at a customers workspace which contained many projects that contained dozens of nested jars in lib/ folders (see screenshot below):



Unfortunately, these jars do not contain any identification information (self-built with ant), and thus cannot be identified. In addition, these jars  are usually not visible to external clients but are exported by the enclosing project. As such, I'd like to write a project coordinate advisor that simply returns the PC of the enclosing project.

Olav, 
is that possible with low efforts? My first guess was to put a new hint <"jdt-packageFragmentRoot", IPackageFragmentRoot> into these nested DependencyInfos. The map, however, requires String keys and String values. I wonder whether this is a hard requirement or changing it to something similar we use in IRecommendersCompletionContext, IProcessableProposal would work out well here too.

I know that the manual coordinates advisor (de)serializes DepdencyInfos, and as such, relies on Strings. But I wonder if the json serializer really needs to serialize the hints too. What do you think?

Without changing the API, I'd add a new key "java-element" to the map which contains the java-elements handle and recreate it when needed. But maybe you have a better suggestion how to work around this issue? 

Best,
Marcel


Back to the top