Bug 182366 - [Contributions] Need substitute for IContributorResourceAdapter
Summary: [Contributions] Need substitute for IContributorResourceAdapter
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks: 288976 173456 175693
  Show dependency tree
 
Reported: 2007-04-13 13:45 EDT by Michael Valenta CLA
Modified: 2022-01-19 11:56 EST (History)
2 users (show)

See Also:


Attachments
Use a resolver v01 (6.29 KB, patch)
2010-01-19 13:48 EST, Paul Webster CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Valenta CLA 2007-04-13 13:45:29 EDT
In the old objectContribution world, the contribution manager (through the LegacyResourceSupport) would make use of the IContributorResourceAdapter (and IContributorResourceAdapter2) interfaces to adapt objects to resources. The visibility expressions for resource based object contributions depended on this to ensure their menus appeared when appropriate.

In the new menuContribution/handler world, the expressions framework only knows how to adapt things directly. What we need is some sort of expression that does the adaptation provided by the IContributorResourceAdapter(2) interface. Without this, repository providers (e.g CVS) will not be able to convert their objectContributions to menuContributions/handlers.
Comment 1 Paul Webster CLA 2008-03-02 14:58:50 EST
There is an internal ISelectionConversionService (that currently doesn't do much).  The selection that's passed in an IEvaluationContext is the IStructuredSelection right out of the viewer.

The ISelectionConversionService could provide a collection of IResources or a ResourceMapping for any incoming ISelection(IStructuredSelection).

Another potential solution would be to use <resolve variable="selection" args="LegacyResourceSupport"> ... whatever ...</resolve>

The IDE could provide an IVariableResolver that could take the ISelection and run it through similar convolutions that are currently done by the ObjectContributionManager.

PW
Comment 2 Paul Webster CLA 2009-03-02 11:40:49 EST
Updated as per http://wiki.eclipse.org/Platform_UI/Bug_Triage
PW
Comment 3 Paul Webster CLA 2009-09-10 08:59:20 EDT
This is a gap that needs to be closed to support more object contribution like functionality in commands.

PW
Comment 4 Paul Webster CLA 2010-01-19 13:48:44 EST
Created attachment 156545 [details]
Use a resolver v01

This is not likely to succeed, because the context that has the variable is not necessarily the context that has the resolver, and the resolver cannot access the original context to retrieve the request variable.

PW
Comment 5 Eclipse Webmaster CLA 2019-09-06 16:19:18 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 6 Eclipse Genie CLA 2022-01-19 11:56:18 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.