Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2016-01-13 09:57:07 -0500
committerCamille Letavernier2016-01-18 07:41:09 -0500
commite470aff3493a4d9c00ecaa22cae442625a50e2c5 (patch)
treebc5003fe2aa9d339a68fcfd535c45248c95bb42e /plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/resources
parent1305645a73413c2c73c3e2dad8e99c409279a342 (diff)
downloadorg.eclipse.papyrus-e470aff3493a4d9c00ecaa22cae442625a50e2c5.tar.gz
org.eclipse.papyrus-e470aff3493a4d9c00ecaa22cae442625a50e2c5.tar.xz
org.eclipse.papyrus-e470aff3493a4d9c00ecaa22cae442625a50e2c5.zip
485539: [Performances - Facet Manager] FacetManager recomputes the
Facets for a given element too many times https://bugs.eclipse.org/bugs/show_bug.cgi?id=485539 - Replace the custom property isVisible(EObject, EStructuralFeature) with getVisibleReferences(EObject) and getVisibleAttributes(EObject). This improves performances a lot, especially for complex metamodels such as UML Change-Id: I170b70774b8f6f19ded7fe1e824097b0c5cf7300 Signed-off-by: Camille Letavernier <camille.letavernier@cea.fr>
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/resources')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/resources/PapyrusDiagram.custom141
1 files changed, 95 insertions, 46 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/resources/PapyrusDiagram.custom b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/resources/PapyrusDiagram.custom
index bc4c1539533..c6446db5d4b 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/resources/PapyrusDiagram.custom
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/resources/PapyrusDiagram.custom
@@ -1,57 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
-<custom:Customization xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:custom="http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/custom" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:efacet="http://www.eclipse.org/papyrus/emf/facet/efacet/0.2.incubation/efacet" xmlns:javaQuery="http://www.eclipse.org/papyrus/emf/facet/query/java/0.2.incubation/javaquery" xmlns:query="http://www.eclipse.org/papyrus/emf/facet/efacet/0.2.incubation/efacet/query" name="PapyrusDiagram" documentation="Display contained diagram and their icons" mustBeLoadedByDefault="true" rank="1">
- <eClassifiers xsi:type="custom:EClassCustomization" name="Diagram" documentation="Representation of diagram in model explorer">
- <extendedMetaclass href="http://www.eclipse.org/gmf/runtime/1.0.2/notation#//Diagram"/>
- <facetOperations name="GetDiagramIcon" documentation="Return the path to the icon of the corresponding diagram">
- <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/custom_primitive_types#//Image"/>
- <eParameters name="eObject">
- <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+<custom:Customization
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:custom="http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/custom"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:efacet="http://www.eclipse.org/papyrus/emf/facet/efacet/0.2.incubation/efacet"
+ xmlns:javaQuery="http://www.eclipse.org/papyrus/emf/facet/query/java/0.2.incubation/javaquery"
+ xmlns:query="http://www.eclipse.org/papyrus/emf/facet/efacet/0.2.incubation/efacet/query"
+ name="PapyrusDiagram"
+ documentation="Display contained diagram and their icons"
+ mustBeLoadedByDefault="true"
+ rank="1">
+ <eClassifiers
+ xsi:type="custom:EClassCustomization"
+ name="Diagram"
+ documentation="Representation of diagram in model explorer">
+ <extendedMetaclass
+ href="http://www.eclipse.org/gmf/runtime/1.0.2/notation#//Diagram"/>
+ <facetOperations
+ name="GetDiagramIcon"
+ documentation="Return the path to the icon of the corresponding diagram">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/custom_primitive_types#//Image"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//ETypedElement"/>
</eParameters>
- <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.gmfdiag.modelexplorer.queries.GetDiagramIcon"/>
- <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/image"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.infra.gmfdiag.modelexplorer.queries.GetDiagramIcon"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/image"/>
</facetOperations>
- <facetOperations name="NotVisibleStructuralFeature">
- <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <eParameters name="eStructuralFeature">
- <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature"/>
- </eParameters>
- <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.gmfdiag.modelexplorer.queries.NotVisibleStructuralFeatureQuery"/>
- <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/isVisible"/>
+ <facetOperations
+ name="GetVisibleReferences"
+ upperBound="-1"
+ documentation="Return the list of visible references (Hide everything)">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.infra.gmfdiag.modelexplorer.queries.EmptyListQuery"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/visibleReferences"/>
</facetOperations>
</eClassifiers>
- <eClassifiers xsi:type="efacet:Facet" name="DiagramContainer" documentation="this element represent a container of diagram" conformanceTypedElement="//DiagramContainer/isDiagramContainer">
- <extendedMetaclass href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <facetOperations name="isDiagramContainer" documentation="test if the element references diagrams">
- <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.gmfdiag.modelexplorer.queries.IsDiagramContainer"/>
+ <eClassifiers
+ xsi:type="efacet:Facet"
+ name="DiagramContainer"
+ documentation="this element represent a container of diagram"
+ conformanceTypedElement="//DiagramContainer/isDiagramContainer">
+ <extendedMetaclass
+ href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <facetOperations
+ name="isDiagramContainer"
+ documentation="test if the element references diagrams">
+ <eType
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.infra.gmfdiag.modelexplorer.queries.IsDiagramContainer"/>
</facetOperations>
</eClassifiers>
- <eClassifiers xsi:type="custom:FacetCustomization" name="DiagramContainer" documentation="Representation of a diagram container">
- <facetElements xsi:type="efacet:FacetReference" name="diagrams" upperBound="-1" defaultValueLiteral="" derived="true">
- <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/gmf/runtime/1.0.2/notation#//Diagram"/>
- <query xsi:type="query:OperationCallQuery" operation="//DiagramContainer.1/DiagramsRefContent"/>
+ <eClassifiers
+ xsi:type="custom:FacetCustomization"
+ name="DiagramContainer"
+ documentation="Representation of a diagram container">
+ <facetElements
+ xsi:type="efacet:FacetReference"
+ name="diagrams"
+ upperBound="-1"
+ defaultValueLiteral=""
+ derived="true">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/gmf/runtime/1.0.2/notation#//Diagram"/>
+ <query
+ xsi:type="query:OperationCallQuery"
+ operation="//DiagramContainer.1/DiagramsRefContent"/>
</facetElements>
- <!-- facetOperations name="DiagramsRefVisibility" documentation="Return true if the element contains diagrams">
- <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <eParameters name="eStructuralFeature">
- <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature"/>
- </eParameters>
- <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.gmfdiag.modelexplorer.queries.IsDiagramContainer"/>
- <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/isVisible"/>
- </facetOperations-->
- <facetOperations name="DiagramsRefContent" upperBound="-1" documentation="Get the collection of all contained diagrams">
- <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/gmf/runtime/1.0.2/notation#//Diagram"/>
- <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.gmfdiag.modelexplorer.queries.GetContainedDiagrams"/>
+ <facetOperations
+ name="DiagramsRefContent"
+ upperBound="-1"
+ documentation="Get the collection of all contained diagrams">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/gmf/runtime/1.0.2/notation#//Diagram"/>
+ <query
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.infra.gmfdiag.modelexplorer.queries.GetContainedDiagrams"/>
</facetOperations>
- <!-- facetOperations name="DiagramsRefCollapse">
- <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <eParameters name="eStructuralFeature">
- <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature"/>
- </eParameters>
- <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.infra.gmfdiag.modelexplorer.queries.DiagramsRefCollapseQuery"/>
- <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/collapseLink"/>
- </facetOperations -->
- <extendedFacets href="../../../plugin/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/resources/PapyrusDiagram.custom#//DiagramContainer"/>
- <customizedFacet href="../../../plugin/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/resources/PapyrusDiagram.custom#//DiagramContainer"/>
+ <extendedFacets
+ href="../../../plugin/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/resources/PapyrusDiagram.custom#//DiagramContainer"/>
+ <customizedFacet
+ href="../../../plugin/org.eclipse.papyrus.infra.gmfdiag.modelexplorer/resources/PapyrusDiagram.custom#//DiagramContainer"/>
</eClassifiers>
</custom:Customization>

Back to the top