Community
Participate
Working Groups
In Synchronize/Compare page, Users may consider changing some preference settings of General-Compare/Patch ,it's more convient if add the link to Compare/Patch in team -Synchronize/Compare page
This is complicated by the fact that the CVS Sync/Compare page is also contributed to the synchronize view by CVS. In this case, the link would need to be omitted. I don't think there is any way of differentiating the context in which the page is being shown (i.e. are links smart enough to know whether the page being linked is availabel in the same preference dialog?). I guess one solution would be to include the general compare page in the sync view as well but this may be a problem since these pages are probably not API. We'll have to investigate a bit to see if this is doable.
Michael: Sorry I think I didn't describe clearly. My idea is to add a link of Compare/Patch preference page in Synchronize/Compare prefrence page, this is easy to deal with. If you open a preference dialog -> General -> Editors, you will see a link to Text Editor, that's it.
No, I understand perfectly. However, the page in question is reused in other contexts (i.e. the synchronize view has a preferences dialog and CVS contributes that page there). I know that adding a link is easy but I'm not sure what will happen if the link is clicked in the other context (Tod?). A related question for Tod. Are preference page ids considered API?
They are only API if they are mentioned in an API class. A failed link would do nothing I should think (we haven't got a firm policy on this yet).
I have released the fixe to HEAD. I was able to differentiate the context using an IWorkbenchPreferenceContainer vs. IPreferencePageContainer check. The only remaining problem is that I need to hardcode the path to the preference page in question. The id of the page is: "org.eclipse.compare.internal.ComparePreferencePage" Moving to Compare as a request to make the preference page id available as an API constant field somewhere.
Added the requested constant PREFERENCE_PAGE_ID to CompareUI.