Community
Participate
Working Groups
Build Identifier: Eclipse 3.6 Hi, I request you to provide some context information about user selection in IDirectEditing APIs. ** Current feature: As I know there is an API, String[] getValueProposals(String value, int caretPosition, IDirectEditingContext context); Which supposed to return array of String which will be given to user for selection while doing direct editing on Shape. and there is another API void setValue(String value, IDirectEditingContext context); which will give user selection in variable 'value', which is also string. ** Issue with Current feature: As there in only String object passed between both APIs. In case, where there is multiple strings having same value is returned from getValueProposals() API, it is difficult for API user to figure out exact selection from setValue() API. ** Expected feature: It would be great if you can provide some context between both APIs. So that user selection can be known from the context provided. ** My use case: We are using IDirectEditing feture where we returned array of String which contains below strings Step1 step1 Step1 These values we derieve from some domain objects. And after user selection, we want to derieve selected domain object. If we are getting only String object then for us it is difficult to know which domain object corresponds to the string. ----- Let me know if you want any input from my side. Hope, I have clear the requirement well. We are looking to get this feature as early as possible. Thanks & Regards, Nurali Reproducible: Always
The same issue appears in the stantard EClass diagram editor when you have several ECLass objects with the same name belonging to different EPackages. A workaround is already possible today: the names provided by getValueProposal must contain additional information that is suitable to identify the selected object (in the above example this would be something like <class name> - <package name>).
Created attachment 178407 [details] Details for workaround The attached file contains details on the described workaround for a similiar problem in a MOF Class Editor
Done. There is a new method in IDirectEditing: IProposalSupport getProposalSupport();
Done. There is a new method in IDirectEditing which can be implemented to achieve the proposed behavior: IProposalSupport getProposalSupport(); An example can be found in the class SketchTextProposalDirectEditingFeature.
Part of 0.8.0
Part of Graphiti Indigo 0.8.0