| Summary: | QVTo Metamodel Explorer View: show the plugin in the property view that registers the selected metamodel | ||
|---|---|---|---|
| Product: | [Modeling] QVTo | Reporter: | Nicolas Rouquette <nicolas.f.rouquette> |
| Component: | UI | Assignee: | mmt-atl.web-inbox <mmt-atl.web-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | nicolas.f.rouquette, serg.boyko2011 |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
|
Description
Nicolas Rouquette
This was incorrectly assigned to ATL, it should be assigned to QVTO UI. I can suggest to provide special item provider adapter factory (something similar to EcoreItemProviderAdapterFactory class so that it supports IItemPropertySource type). In org.eclipse.m2m.internal.qvt.oml.common.ui.views.MetamodelBrowser.getPropertySheetPage() method you can add your adapter factory like: ((ComposedAdapterFactory) provider.getAdapterFactory()).insertAdapterFactory(myAdapterFactory); It would be reasonable if such adapter factory will delegate collecting of properties to some registry of applicable adapters (similar to ComposedAdapterFactory(Descriptor.Registry adapterFactoryDescriptorRegistry)). Same idea would be useful for metamodel explorer context menu extensions. Except for the registration of applicable adapters, are you talking about an approach similar to the one used in org.eclipse.uml2.uml.editor.presentation.UMLEditor.getPropertySheetPage() where org.eclipse.uml2.uml.editor.presentation.UMLEditor.UMLPropertySource.getPropertyDescriptors() has special logic to create additional IPropertyDescriptor based on stereotype applications? It seems to me that what you are suggesting is a combination of the UMLEditor's UMLAdapterFactoryContentProvider / UMLPropertySource / UMLPropertyDescriptor but with the difference that the logic for adding additional IPropertyDescriptors for applied stereotypes would be done in an extension-defined factory for IItemPropertyDescriptor. It seems to me that this the kind of UI customization that the new EMF Extended Editing Framework (EEF) should make easier to do than building the above by copying & adapting the mechanisms from the UMLEditor. However, this would require adding a dependency to EEF; I doubt that this would be reasonable to do just to solve this problem so the copy&own strategy may still be the most expedient way for now. |