|
|
Re: Common Navigator setup question [message #441259 is a reply to message #440666] |
Fri, 31 July 2009 10:08 |
Franck Mising name Messages: 92 Registered: July 2009 Location: France |
Member |
|
|
Here is a first specific use case where I am seeing strange CNF behavior.
Based on discussions I saw on bugzilla on label providers being searched
by trigger points I have updated augmented my triggerPoints with the
possibleChildren condition (i.e. M1 trigger points are now [IWorkspaceRoot
or any M1Resource], M2 are [M1Project or M1Folder or any M2Resource]).
If I use File->New->Folder... to create a new folder directly under an
M1Project, my M1 resource listener issues a call to
viewer.refresh(M1Project).
The image for newM1Folder should be provided by the M1LabelProvider.
The refresh call goes down to
NavigatorContentServiceLabelProvider.getImage(newM1Folder)
which in turns looks for possible contributing extensions by calling
findDescriptorsByTriggerPoint(newM1Folder, considerOverrides=false).
That method only considers firstClassDescriptorsSet members as candidate
extensions, which my M1 content extension is not (it overrides resources).
It would also consider getSourceOfContribution(newM1Folder) but that
returns null (more on this below), and in the end the image returned is
null.
Should I declare two navigator content extensions for M1, one overriding
the core resources provider and another not overriding anything (to
account for providing M1 children or M1 containers)??
Regarding contributions sources, I am tracing and seeing very strange
things, in particular M1Folders being marked as contributed by the
M2Provider, due to this line in NavigatorContentServiceContentProvider:
// Update contributor even if not pipelining as this is where it is
recorded by
viewer pipelinedChildren.setContributor((NavigatorContentDescriptor )
theOverridingExtensions[i].getDescriptor());
I don't quite understand the comment, but this code will mark an M1Folder
and all its M1 children as having been contributed my M2, simply because
M2 wanted a chance to maybe replace a few specific M1 children... this
looks wrong?
This trace demonstrates the pb:
rememberContribution: Content[CNF_Test.M2, "M2 model provider"]:
cnf_test.M1Folder@2c073c61
rememberContribution: Content[CNF_Test.M2, "M2 model provider"]:
cnf_test.M1Folder@2c073c71
rememberContribution: Content[CNF_Test.M2, "M2 model provider"]:
cnf_test.M1Folder@2c073c79
rememberContribution: Content[CNF_Test.M2, "M2 model provider"]:
cnf_test.M2Resource@58cfeb49
rememberContribution: Content[CNF_Test.M2, "M2 model provider"]:
cnf_test.M1File@89d4cd29
Should I just disregard those erroneous contribution assignments??
Thanks!
Franck
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01929 seconds