Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 281262

Summary: Need an easy way to debug library provider priority issues
Product: [WebTools] WTP Common Tools Reporter: Konstantin Komissarchik <konstantin>
Component: Faceted Project FrameworkAssignee: Konstantin Komissarchik <konstantin>
Status: CLOSED FIXED QA Contact: Konstantin Komissarchik <konstantin>
Severity: enhancement    
Priority: P3 Keywords: plan
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Konstantin Komissarchik CLA 2009-06-23 14:49:04 EDT
Every library provider is given a priority when it is declared by the author. This priority is used when sorting the list of applicable providers to show to the user. The priority is also important as the highest-priority provider is the provider that is selected by default.

It can sometimes be difficult to debug priority-related issues, especially when library providers for a particular facet are contributed by multiple parties. We need a relatively easy way to look up provider priorities.
Comment 1 Konstantin Komissarchik CLA 2009-06-23 14:58:27 EDT
Added the following trace flag:

org.eclipse.fproj.enablement.jdt/LibraryInstallDelegate/refresh

Setting this trace flag to true, will cause the framework to dump information about providers in a given context after the priority sort has been performed (including every time a model change causes the list to be refreshed). Here is a sample output:

LibraryInstallDelegate.refresh() : 5272169 : post sort
#
  osgi-bundles-library-provider-fproj.samples.rand-1.0 : 200
  user-library-provider-fproj.samples.rand : 100
#

Providers are listed in priority order. Each provider priority is shown next to its id. On the first line, 5272169 is the hash code of the LibraryInstallDelegate instance, which is useful multiple instances are active in memory concurrently.
Comment 2 Konstantin Komissarchik CLA 2009-06-23 15:11:21 EDT
Closing.