| Summary: | Allow the deactivation of the properties view with the new EEF runtime | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Stephane Begaudeau <stephane.begaudeau> |
| Component: | Properties | Assignee: | Pierre-Charles David <pierre-charles.david> |
| Status: | CLOSED FIXED | QA Contact: | Laurent Redor <laurent.redor> |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | laurent.redor, pierre-charles.david |
| Version: | 3.1.0 | Keywords: | triaged |
| Target Milestone: | 4.0.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/73304 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=3110d15a103a894399e5e66bdc69110377946e70 https://bugs.eclipse.org/bugs/show_bug.cgi?id=482528 |
||
| Whiteboard: | |||
New Gerrit change created: https://git.eclipse.org/r/73304 Gerrit change https://git.eclipse.org/r/73304 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=3110d15a103a894399e5e66bdc69110377946e70 Fixed by 3110d15a103a894399e5e66bdc69110377946e70. The keyword FORCE_LEGACY_PROPERTIES disables the new properties view. But it is not documented. Even the description of this bugzilla does not indicate the correct keyword. To clarify: if the current selection comes from a Sirius representation whose definition (the RepresentationDescription in the VSM) contains the special string "FORCE_LEGACY_PROPERTIES" in its "documentation" field (or in any of its ancestors documentation in the VSM), Sirius falls back to the previous behavior, as if support for EEF-based properties views was not installed. This allows specifiers to opt-out of this new feature even if it is installed, for specific representations, viewpoints or whole VSMs (by putting the keyword in the top-level Group's documentation). After discussion with the team, we don't plan do document this mechanism (at least in the official doc). It is more of a temporary hack that we hope will never be needed, and will normally be removed for the next version. If we need to refer someone to it, the bugzilla comment above will do. Verified on Sirius 4.0.0 RC2 (No change since comment 4 but OK according to comment 5 and comment 6). Available in Sirius 4.0.0. |
In the various call to the properties sheet page provider in : - SiriusDiagramEditor#getAdapter() - AbstractDTreeEditor#getAdapter() - ModelExplorerView#getAdapter() Instead of giving the property sheet page provider the variable "type" which will always be the IPropertySheetPage class, it should be given the variable "this" which would give access to the current editor. As a result, in org.eclipse.sirius.ui.properties.internal.EEFPropertySheetPageProvider.getPropertySheetPage(Object, String), it should be possible to case the source, now the Sirius editor, to a DRepresentationEditor (if that exist) and then look for the odesign used for the representation and if the odesign involve contains in its Group object the string "NO_PROPERTIES_VIEW_WITH_EEF" we should return null which would thus deactivate the properties view with EEF. Something like this : public class EEFPropertySheetPageProvider implements ISiriusPropertySheetPageProvider { @Override public IPropertySheetPage getPropertySheetPage(Object source, String contributorId) { if (source instanceof DRepresentationEditor) { DRepresentation representation = ((DRepresentationEditor)source).getRepresentation().getDefinition(); if (representation.getGroup().getDocumentation.contains("NO_PROPERTIES_VIEW_WITH_EEF")) { // Deactivate EEF support return null; } } return new EEFTabbedPropertySheetPage(source, contributorId); } }