@ -1,7 +1,6 @@ |
|||||||
Copyright (c) 2017-2018 IRT AESE (IRT Saint Exupéry). |
Copyright (c) 2017-2018 IRT AESE (IRT Saint Exupéry). |
||||||
All rights reserved. This program and the accompanying materials |
All rights reserved. This program and the accompanying materials |
||||||
are made available under the terms of the |
are made available under the terms of the Eclipse Public License 2.0 (EPL 2.0) |
||||||
Eclipse Public License 2.0 (EPL 2.0) |
|
||||||
which accompanies this distribution, and is available at |
which accompanies this distribution, and is available at |
||||||
https://www.eclipse.org/legal/epl-2.0/ |
https://www.eclipse.org/legal/epl-2.0/ |
||||||
|
|
@ -0,0 +1,17 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<projectDescription> |
||||||
|
<name>pseim</name> |
||||||
|
<comment></comment> |
||||||
|
<projects> |
||||||
|
</projects> |
||||||
|
<buildSpec> |
||||||
|
<buildCommand> |
||||||
|
<name>org.rodinp.core.rodinbuilder</name> |
||||||
|
<arguments> |
||||||
|
</arguments> |
||||||
|
</buildCommand> |
||||||
|
</buildSpec> |
||||||
|
<natures> |
||||||
|
<nature>org.rodinp.core.rodinnature</nature> |
||||||
|
</natures> |
||||||
|
</projectDescription> |
@ -0,0 +1,23 @@ |
|||||||
|
# Patterns for SEIM Event-B models |
||||||
|
|
||||||
|
## Contributors |
||||||
|
|
||||||
|
Jean-Paul Bodeveix, Arnaud Dieumegard, Mamoun Filali |
||||||
|
|
||||||
|
## Content |
||||||
|
|
||||||
|
This project contains the Event-B models for the formalization of pattern instantiations on system engineering models. |
||||||
|
|
||||||
|
### Structure |
||||||
|
|
||||||
|
![Pattern instantiation and application model](event-b_model_structure2.jpg "Pattern instantiation and application project structure") |
||||||
|
|
||||||
|
### Documentation |
||||||
|
|
||||||
|
Documentation on the content of these models is provided on the deliverable. |
||||||
|
|
||||||
|
### Additional elements |
||||||
|
|
||||||
|
An other context is provided: pattern_safety. |
||||||
|
This model contains the first version of an instance of pattern directly encoded using Event-B. |
||||||
|
Using simulation tools such as Pro-B on this model may produce an instance of Model where the pattern is instantiated. This shall be checked as it is only a prototype. |
@ -0,0 +1,18 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<org.eventb.core.scContextFile org.eventb.core.accurate="true" org.eventb.core.configuration="org.eventb.core.fwd;de.prob.symbolic.ctxBase;de.prob.units.mchBase"> |
||||||
|
<org.eventb.core.scExtendsContext name="'" org.eventb.core.scTarget="/pseim/cModel.bcc|org.eventb.core.scContextFile#cModel" org.eventb.core.source="/pseim/cComponent.buc|org.eventb.core.contextFile#cComponent|org.eventb.core.extendsContext#_IT7_UPqUEeectLZKwQfI0A"/> |
||||||
|
<org.eventb.core.scInternalContext name="cModel"> |
||||||
|
<org.eventb.core.scAxiom name="'" org.eventb.core.label="Pattern_ty" org.eventb.core.predicate="Pattern⊆Model" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wcfqkEeectLZKwQfI0A" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name="(" org.eventb.core.label="Mdl_ty" org.eventb.core.predicate="Mdl∈Model ∖ Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wcvqkEeectLZKwQfI0A" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name=")" org.eventb.core.label="Pat_ty" org.eventb.core.predicate="Pat∈Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wc_qkEeectLZKwQfI0A" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name="*" org.eventb.core.label="Inst_ty" org.eventb.core.predicate="Inst∈Model ∖ Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_fxjdEQKnEeiAPf1wPUl3Gw" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name="+" org.eventb.core.label="Inst_Mdl" org.eventb.core.predicate="Inst≠Mdl" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_DGgrYAUMEei9ocE08JsPSw" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scConstant name="Inst" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_fxjdEAKnEeiAPf1wPUl3Gw" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.scConstant name="Mdl" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_h20JYPqkEeectLZKwQfI0A" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.scCarrierSet name="Model" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.carrierSet#_5dsj0PqTEeectLZKwQfI0A" org.eventb.core.type="ℙ(Model)"/> |
||||||
|
<org.eventb.core.scConstant name="Pat" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_b4aBsPraEeerIsS6OyYQ4w" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.scConstant name="Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_h20wcPqkEeectLZKwQfI0A" org.eventb.core.type="ℙ(Model)"/> |
||||||
|
<org.eventb.core.scCarrierSet name="Property" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.carrierSet#_9dBM4ADlEei-meqqkXX9bA" org.eventb.core.type="ℙ(Property)"/> |
||||||
|
</org.eventb.core.scInternalContext> |
||||||
|
<org.eventb.core.scCarrierSet name="Component" org.eventb.core.source="/pseim/cComponent.buc|org.eventb.core.contextFile#cComponent|org.eventb.core.carrierSet#_IT7_UfqUEeectLZKwQfI0A" org.eventb.core.type="ℙ(Component)"/> |
||||||
|
</org.eventb.core.scContextFile> |
@ -0,0 +1,2 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<org.eventb.core.prFile version="1"/> |
@ -0,0 +1,5 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<org.eventb.core.contextFile org.eventb.core.configuration="org.eventb.core.fwd;de.prob.symbolic.ctxBase;de.prob.units.mchBase" org.eventb.texttools.text_lastmodified="1522154685480" org.eventb.texttools.text_representation="context cComponent extends cModel sets Component end " version="3"> |
||||||
|
<org.eventb.core.extendsContext name="_IT7_UPqUEeectLZKwQfI0A" org.eventb.core.target="cModel"/> |
||||||
|
<org.eventb.core.carrierSet name="_IT7_UfqUEeectLZKwQfI0A" org.eventb.core.identifier="Component"/> |
||||||
|
</org.eventb.core.contextFile> |
@ -0,0 +1,37 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<org.eventb.core.scContextFile org.eventb.core.accurate="true" org.eventb.core.configuration="org.eventb.core.fwd;de.prob.symbolic.ctxBase;de.prob.units.mchBase;org.eventb.codegen.ui.cgConfig"> |
||||||
|
<org.eventb.core.scExtendsContext name="'" org.eventb.core.scTarget="/pseim/cPort.bcc|org.eventb.core.scContextFile#cPort" org.eventb.core.source="/pseim/cLink.buc|org.eventb.core.contextFile#cLink|org.eventb.core.extendsContext#'"/> |
||||||
|
<org.eventb.core.scInternalContext name="cModel"> |
||||||
|
<org.eventb.core.scAxiom name="'" org.eventb.core.label="Pattern_ty" org.eventb.core.predicate="Pattern⊆Model" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wcfqkEeectLZKwQfI0A" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name="(" org.eventb.core.label="Mdl_ty" org.eventb.core.predicate="Mdl∈Model ∖ Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wcvqkEeectLZKwQfI0A" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name=")" org.eventb.core.label="Pat_ty" org.eventb.core.predicate="Pat∈Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wc_qkEeectLZKwQfI0A" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name="*" org.eventb.core.label="Inst_ty" org.eventb.core.predicate="Inst∈Model ∖ Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_fxjdEQKnEeiAPf1wPUl3Gw" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name="+" org.eventb.core.label="Inst_Mdl" org.eventb.core.predicate="Inst≠Mdl" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_DGgrYAUMEei9ocE08JsPSw" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scConstant name="Inst" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_fxjdEAKnEeiAPf1wPUl3Gw" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.scConstant name="Mdl" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_h20JYPqkEeectLZKwQfI0A" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.scCarrierSet name="Model" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.carrierSet#_5dsj0PqTEeectLZKwQfI0A" org.eventb.core.type="ℙ(Model)"/> |
||||||
|
<org.eventb.core.scConstant name="Pat" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_b4aBsPraEeerIsS6OyYQ4w" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.scConstant name="Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_h20wcPqkEeectLZKwQfI0A" org.eventb.core.type="ℙ(Model)"/> |
||||||
|
<org.eventb.core.scCarrierSet name="Property" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.carrierSet#_9dBM4ADlEei-meqqkXX9bA" org.eventb.core.type="ℙ(Property)"/> |
||||||
|
</org.eventb.core.scInternalContext> |
||||||
|
<org.eventb.core.scInternalContext name="cComponent"> |
||||||
|
<org.eventb.core.scExtendsContext name="'" org.eventb.core.scTarget="/pseim/cModel.bcc|org.eventb.core.scContextFile#cModel" org.eventb.core.source="/pseim/cComponent.buc|org.eventb.core.contextFile#cComponent|org.eventb.core.extendsContext#_IT7_UPqUEeectLZKwQfI0A"/> |
||||||
|
<org.eventb.core.scCarrierSet name="Component" org.eventb.core.source="/pseim/cComponent.buc|org.eventb.core.contextFile#cComponent|org.eventb.core.carrierSet#_IT7_UfqUEeectLZKwQfI0A" org.eventb.core.type="ℙ(Component)"/> |
||||||
|
</org.eventb.core.scInternalContext> |
||||||
|
<org.eventb.core.scInternalContext name="cPort"> |
||||||
|
<org.eventb.core.scExtendsContext name="'" org.eventb.core.scTarget="/pseim/cComponent.bcc|org.eventb.core.scContextFile#cComponent" org.eventb.core.source="/pseim/cPort.buc|org.eventb.core.contextFile#cPort|org.eventb.core.extendsContext#'"/> |
||||||
|
<org.eventb.core.scAxiom name="cComponenu" org.eventb.core.label="part" org.eventb.core.predicate="partition(Port,IPort,OPort)" org.eventb.core.source="/pseim/cPort.buc|org.eventb.core.contextFile#cPort|org.eventb.core.axiom#_Y1LocvqyEeectLZKwQfI0A" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scConstant name="IPort" org.eventb.core.source="/pseim/cPort.buc|org.eventb.core.contextFile#cPort|org.eventb.core.constant#_Y1LocPqyEeectLZKwQfI0A" org.eventb.core.type="ℙ(Port)"/> |
||||||
|
<org.eventb.core.scConstant name="OPort" org.eventb.core.source="/pseim/cPort.buc|org.eventb.core.contextFile#cPort|org.eventb.core.constant#_Y1LocfqyEeectLZKwQfI0A" org.eventb.core.type="ℙ(Port)"/> |
||||||
|
<org.eventb.core.scCarrierSet name="Port" org.eventb.core.source="/pseim/cPort.buc|org.eventb.core.contextFile#cPort|org.eventb.core.carrierSet#_YwaNQPqeEeectLZKwQfI0A" org.eventb.core.type="ℙ(Port)"/> |
||||||
|
</org.eventb.core.scInternalContext> |
||||||
|
<org.eventb.core.scAxiom name="cComponenu" org.eventb.core.label="link_k" org.eventb.core.predicate="partition(Link,Transpose,Identity,Shift,First,Rotate)" org.eventb.core.source="/pseim/cLink.buc|org.eventb.core.contextFile#cLink|org.eventb.core.axiom#_u1ZfsfgzEeeeS5KQUtrGlw" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name="cComponenv" org.eventb.core.label="LKind" org.eventb.core.predicate="LKind={Transpose,Identity,Shift,First,Rotate}" org.eventb.core.source="/pseim/cLink.buc|org.eventb.core.contextFile#cLink|org.eventb.core.axiom#_u1ZfsvgzEeeeS5KQUtrGlw" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scConstant name="First" org.eventb.core.source="/pseim/cLink.buc|org.eventb.core.contextFile#cLink|org.eventb.core.constant#_WzjhM_g8EeeeS5KQUtrGlw" org.eventb.core.type="ℙ(Link)"/> |
||||||
|
<org.eventb.core.scConstant name="Identity" org.eventb.core.source="/pseim/cLink.buc|org.eventb.core.contextFile#cLink|org.eventb.core.constant#_WzjhMfg8EeeeS5KQUtrGlw" org.eventb.core.type="ℙ(Link)"/> |
||||||
|
<org.eventb.core.scConstant name="LKind" org.eventb.core.source="/pseim/cLink.buc|org.eventb.core.contextFile#cLink|org.eventb.core.constant#_u1ZfsPgzEeeeS5KQUtrGlw" org.eventb.core.type="ℙ(ℙ(Link))"/> |
||||||
|
<org.eventb.core.scCarrierSet name="Link" org.eventb.core.source="/pseim/cLink.buc|org.eventb.core.contextFile#cLink|org.eventb.core.carrierSet#_IabHcPoIEeeOzddrJxUeNA" org.eventb.core.type="ℙ(Link)"/> |
||||||
|
<org.eventb.core.scConstant name="Rotate" org.eventb.core.source="/pseim/cLink.buc|org.eventb.core.contextFile#cLink|org.eventb.core.constant#_WzjhNPg8EeeeS5KQUtrGlw" org.eventb.core.type="ℙ(Link)"/> |
||||||
|
<org.eventb.core.scConstant name="Shift" org.eventb.core.source="/pseim/cLink.buc|org.eventb.core.contextFile#cLink|org.eventb.core.constant#_WzjhMvg8EeeeS5KQUtrGlw" org.eventb.core.type="ℙ(Link)"/> |
||||||
|
<org.eventb.core.scConstant name="Transpose" org.eventb.core.source="/pseim/cLink.buc|org.eventb.core.contextFile#cLink|org.eventb.core.constant#_WzjhMPg8EeeeS5KQUtrGlw" org.eventb.core.type="ℙ(Link)"/> |
||||||
|
</org.eventb.core.scContextFile> |
@ -0,0 +1,32 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<org.eventb.core.poFile org.eventb.core.poStamp="0"> |
||||||
|
<org.eventb.core.poPredicateSet name="ABSHYP" org.eventb.core.poStamp="0"> |
||||||
|
<org.eventb.core.poIdentifier name="Model" org.eventb.core.type="ℙ(Model)"/> |
||||||
|
<org.eventb.core.poIdentifier name="Property" org.eventb.core.type="ℙ(Property)"/> |
||||||
|
<org.eventb.core.poIdentifier name="Inst" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.poIdentifier name="Mdl" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.poIdentifier name="Pat" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.poIdentifier name="Pattern" org.eventb.core.type="ℙ(Model)"/> |
||||||
|
<org.eventb.core.poPredicate name="Propertz" org.eventb.core.predicate="Pattern⊆Model" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wcfqkEeectLZKwQfI0A"/> |
||||||
|
<org.eventb.core.poPredicate name="Propert{" org.eventb.core.predicate="Mdl∈Model ∖ Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wcvqkEeectLZKwQfI0A"/> |
||||||
|
<org.eventb.core.poPredicate name="Propert|" org.eventb.core.predicate="Pat∈Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wc_qkEeectLZKwQfI0A"/> |
||||||
|
<org.eventb.core.poPredicate name="Propert}" org.eventb.core.predicate="Inst∈Model ∖ Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_fxjdEQKnEeiAPf1wPUl3Gw"/> |
||||||
|
<org.eventb.core.poPredicate name="Propert~" org.eventb.core.predicate="Inst≠Mdl" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_DGgrYAUMEei9ocE08JsPSw"/> |
||||||
|
<org.eventb.core.poIdentifier name="Component" org.eventb.core.type="ℙ(Component)"/> |
||||||
|
<org.eventb.core.poIdentifier name="Port" org.eventb.core.type="ℙ(Port)"/> |
||||||
|
<org.eventb.core.poIdentifier name="IPort" org.eventb.core.type="ℙ(Port)"/> |
||||||
|
<org.eventb.core.poIdentifier name="OPort" org.eventb.core.type="ℙ(Port)"/> |
||||||
|
<org.eventb.core.poPredicate name="Componenu" org.eventb.core.predicate="partition(Port,IPort,OPort)" org.eventb.core.source="/pseim/cPort.buc|org.eventb.core.contextFile#cPort|org.eventb.core.axiom#_Y1LocvqyEeectLZKwQfI0A"/> |
||||||
|
<org.eventb.core.poIdentifier name="Link" org.eventb.core.type="ℙ(Link)"/> |
||||||
|
<org.eventb.core.poIdentifier name="First" org.eventb.core.type="ℙ(Link)"/> |
||||||
|
<org.eventb.core.poIdentifier name="Identity" org.eventb.core.type="ℙ(Link)"/> |
||||||
|
<org.eventb.core.poIdentifier name="LKind" org.eventb.core.type="ℙ(ℙ(Link))"/> |
||||||
|
<org.eventb.core.poIdentifier name="Rotate" org.eventb.core.type="ℙ(Link)"/> |
||||||
|
<org.eventb.core.poIdentifier name="Shift" org.eventb.core.type="ℙ(Link)"/> |
||||||
|
<org.eventb.core.poIdentifier name="Transpose" org.eventb.core.type="ℙ(Link)"/> |
||||||
|
</org.eventb.core.poPredicateSet> |
||||||
|
<org.eventb.core.poPredicateSet name="ALLHYP" org.eventb.core.parentSet="/pseim/cLink.bpo|org.eventb.core.poFile#cLink|org.eventb.core.poPredicateSet#ABSHYP" org.eventb.core.poStamp="0"> |
||||||
|
<org.eventb.core.poPredicate name="PRD0" org.eventb.core.predicate="partition(Link,Transpose,Identity,Shift,First,Rotate)" org.eventb.core.source="/pseim/cLink.buc|org.eventb.core.contextFile#cLink|org.eventb.core.axiom#_u1ZfsfgzEeeeS5KQUtrGlw"/> |
||||||
|
<org.eventb.core.poPredicate name="PRD1" org.eventb.core.predicate="LKind={Transpose,Identity,Shift,First,Rotate}" org.eventb.core.source="/pseim/cLink.buc|org.eventb.core.contextFile#cLink|org.eventb.core.axiom#_u1ZfsvgzEeeeS5KQUtrGlw"/> |
||||||
|
</org.eventb.core.poPredicateSet> |
||||||
|
</org.eventb.core.poFile> |
@ -0,0 +1,2 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<org.eventb.core.prFile version="1"/> |
@ -0,0 +1,2 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<org.eventb.core.psFile/> |
@ -0,0 +1,13 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<org.eventb.core.contextFile org.eventb.core.configuration="org.eventb.core.fwd;de.prob.symbolic.ctxBase;de.prob.units.mchBase;org.eventb.codegen.ui.cgConfig" org.eventb.texttools.text_lastmodified="1516029848931" org.eventb.texttools.text_representation="context cLink extends cPort sets Link constants 	LKind Transpose Identity Shift First Rotate axioms 	@link_k partition(Link, Transpose, Identity, Shift, First, Rotate) 	@LKind LKind = {Transpose, Identity, Shift, First, Rotate} end " version="3"> |
||||||
|
<org.eventb.core.extendsContext name="'" org.eventb.core.target="cPort"/> |
||||||
|
<org.eventb.core.constant name="_u1ZfsPgzEeeeS5KQUtrGlw" org.eventb.core.identifier="LKind"/> |
||||||
|
<org.eventb.core.axiom name="_u1ZfsfgzEeeeS5KQUtrGlw" org.eventb.core.label="link_k" org.eventb.core.predicate="partition(Link, Transpose, Identity, Shift, First, Rotate)"/> |
||||||
|
<org.eventb.core.axiom name="_u1ZfsvgzEeeeS5KQUtrGlw" org.eventb.core.label="LKind" org.eventb.core.predicate="LKind = {Transpose, Identity, Shift, First, Rotate}"/> |
||||||
|
<org.eventb.core.constant name="_WzjhMPg8EeeeS5KQUtrGlw" org.eventb.core.identifier="Transpose"/> |
||||||
|
<org.eventb.core.constant name="_WzjhMfg8EeeeS5KQUtrGlw" org.eventb.core.identifier="Identity"/> |
||||||
|
<org.eventb.core.constant name="_WzjhMvg8EeeeS5KQUtrGlw" org.eventb.core.identifier="Shift"/> |
||||||
|
<org.eventb.core.constant name="_WzjhM_g8EeeeS5KQUtrGlw" org.eventb.core.identifier="First"/> |
||||||
|
<org.eventb.core.constant name="_WzjhNPg8EeeeS5KQUtrGlw" org.eventb.core.identifier="Rotate"/> |
||||||
|
<org.eventb.core.carrierSet name="_IabHcPoIEeeOzddrJxUeNA" org.eventb.core.identifier="Link"/> |
||||||
|
</org.eventb.core.contextFile> |
@ -0,0 +1,14 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<org.eventb.core.scContextFile org.eventb.core.accurate="true" org.eventb.core.configuration="org.eventb.core.fwd;de.prob.symbolic.ctxBase;de.prob.units.mchBase"> |
||||||
|
<org.eventb.core.scAxiom name="'" org.eventb.core.label="Pattern_ty" org.eventb.core.predicate="Pattern⊆Model" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wcfqkEeectLZKwQfI0A" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name="(" org.eventb.core.label="Mdl_ty" org.eventb.core.predicate="Mdl∈Model ∖ Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wcvqkEeectLZKwQfI0A" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name=")" org.eventb.core.label="Pat_ty" org.eventb.core.predicate="Pat∈Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wc_qkEeectLZKwQfI0A" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name="*" org.eventb.core.label="Inst_ty" org.eventb.core.predicate="Inst∈Model ∖ Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_fxjdEQKnEeiAPf1wPUl3Gw" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name="+" org.eventb.core.label="Inst_Mdl" org.eventb.core.predicate="Inst≠Mdl" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_DGgrYAUMEei9ocE08JsPSw" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scConstant name="Inst" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_fxjdEAKnEeiAPf1wPUl3Gw" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.scConstant name="Mdl" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_h20JYPqkEeectLZKwQfI0A" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.scCarrierSet name="Model" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.carrierSet#_5dsj0PqTEeectLZKwQfI0A" org.eventb.core.type="ℙ(Model)"/> |
||||||
|
<org.eventb.core.scConstant name="Pat" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_b4aBsPraEeerIsS6OyYQ4w" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.scConstant name="Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_h20wcPqkEeectLZKwQfI0A" org.eventb.core.type="ℙ(Model)"/> |
||||||
|
<org.eventb.core.scCarrierSet name="Property" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.carrierSet#_9dBM4ADlEei-meqqkXX9bA" org.eventb.core.type="ℙ(Property)"/> |
||||||
|
</org.eventb.core.scContextFile> |
@ -0,0 +1,2 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<org.eventb.core.prFile version="1"/> |
@ -0,0 +1,14 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<org.eventb.core.contextFile org.eventb.core.configuration="org.eventb.core.fwd;de.prob.symbolic.ctxBase;de.prob.units.mchBase" org.eventb.texttools.text_lastmodified="1517240994066" org.eventb.texttools.text_representation="context cModel sets Model Property constants Mdl Pattern Pat Inst axioms @Pattern_ty Pattern ⊆ Model @Mdl_ty Mdl ∈ Model ∖ Pattern @Pat_ty Pat ∈ Pattern @Inst_ty Inst ∈ Model ∖ Pattern @Inst_Mdl Inst ≠ Mdl end " version="3"> |
||||||
|
<org.eventb.core.carrierSet name="_5dsj0PqTEeectLZKwQfI0A" org.eventb.core.identifier="Model"/> |
||||||
|
<org.eventb.core.constant name="_h20JYPqkEeectLZKwQfI0A" org.eventb.core.identifier="Mdl"/> |
||||||
|
<org.eventb.core.constant name="_h20wcPqkEeectLZKwQfI0A" org.eventb.core.identifier="Pattern"/> |
||||||
|
<org.eventb.core.axiom name="_h20wcfqkEeectLZKwQfI0A" org.eventb.core.label="Pattern_ty" org.eventb.core.predicate="Pattern ⊆ Model"/> |
||||||
|
<org.eventb.core.axiom name="_h20wcvqkEeectLZKwQfI0A" org.eventb.core.label="Mdl_ty" org.eventb.core.predicate="Mdl ∈ Model ∖ Pattern"/> |
||||||
|
<org.eventb.core.axiom name="_h20wc_qkEeectLZKwQfI0A" org.eventb.core.label="Pat_ty" org.eventb.core.predicate="Pat ∈ Pattern"/> |
||||||
|
<org.eventb.core.constant name="_b4aBsPraEeerIsS6OyYQ4w" org.eventb.core.identifier="Pat"/> |
||||||
|
<org.eventb.core.carrierSet name="_9dBM4ADlEei-meqqkXX9bA" org.eventb.core.identifier="Property"/> |
||||||
|
<org.eventb.core.constant name="_fxjdEAKnEeiAPf1wPUl3Gw" org.eventb.core.identifier="Inst"/> |
||||||
|
<org.eventb.core.axiom name="_fxjdEQKnEeiAPf1wPUl3Gw" org.eventb.core.label="Inst_ty" org.eventb.core.predicate="Inst ∈ Model ∖ Pattern"/> |
||||||
|
<org.eventb.core.axiom name="_DGgrYAUMEei9ocE08JsPSw" org.eventb.core.label="Inst_Mdl" org.eventb.core.predicate="Inst ≠ Mdl"/> |
||||||
|
</org.eventb.core.contextFile> |
@ -0,0 +1,25 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<org.eventb.core.scContextFile org.eventb.core.accurate="true" org.eventb.core.configuration="org.eventb.core.fwd;de.prob.symbolic.ctxBase;de.prob.units.mchBase"> |
||||||
|
<org.eventb.core.scExtendsContext name="'" org.eventb.core.scTarget="/pseim/cComponent.bcc|org.eventb.core.scContextFile#cComponent" org.eventb.core.source="/pseim/cPort.buc|org.eventb.core.contextFile#cPort|org.eventb.core.extendsContext#'"/> |
||||||
|
<org.eventb.core.scInternalContext name="cModel"> |
||||||
|
<org.eventb.core.scAxiom name="'" org.eventb.core.label="Pattern_ty" org.eventb.core.predicate="Pattern⊆Model" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wcfqkEeectLZKwQfI0A" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name="(" org.eventb.core.label="Mdl_ty" org.eventb.core.predicate="Mdl∈Model ∖ Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wcvqkEeectLZKwQfI0A" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name=")" org.eventb.core.label="Pat_ty" org.eventb.core.predicate="Pat∈Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wc_qkEeectLZKwQfI0A" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name="*" org.eventb.core.label="Inst_ty" org.eventb.core.predicate="Inst∈Model ∖ Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_fxjdEQKnEeiAPf1wPUl3Gw" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scAxiom name="+" org.eventb.core.label="Inst_Mdl" org.eventb.core.predicate="Inst≠Mdl" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_DGgrYAUMEei9ocE08JsPSw" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scConstant name="Inst" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_fxjdEAKnEeiAPf1wPUl3Gw" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.scConstant name="Mdl" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_h20JYPqkEeectLZKwQfI0A" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.scCarrierSet name="Model" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.carrierSet#_5dsj0PqTEeectLZKwQfI0A" org.eventb.core.type="ℙ(Model)"/> |
||||||
|
<org.eventb.core.scConstant name="Pat" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_b4aBsPraEeerIsS6OyYQ4w" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.scConstant name="Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.constant#_h20wcPqkEeectLZKwQfI0A" org.eventb.core.type="ℙ(Model)"/> |
||||||
|
<org.eventb.core.scCarrierSet name="Property" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.carrierSet#_9dBM4ADlEei-meqqkXX9bA" org.eventb.core.type="ℙ(Property)"/> |
||||||
|
</org.eventb.core.scInternalContext> |
||||||
|
<org.eventb.core.scInternalContext name="cComponent"> |
||||||
|
<org.eventb.core.scExtendsContext name="'" org.eventb.core.scTarget="/pseim/cModel.bcc|org.eventb.core.scContextFile#cModel" org.eventb.core.source="/pseim/cComponent.buc|org.eventb.core.contextFile#cComponent|org.eventb.core.extendsContext#_IT7_UPqUEeectLZKwQfI0A"/> |
||||||
|
<org.eventb.core.scCarrierSet name="Component" org.eventb.core.source="/pseim/cComponent.buc|org.eventb.core.contextFile#cComponent|org.eventb.core.carrierSet#_IT7_UfqUEeectLZKwQfI0A" org.eventb.core.type="ℙ(Component)"/> |
||||||
|
</org.eventb.core.scInternalContext> |
||||||
|
<org.eventb.core.scAxiom name="cComponenu" org.eventb.core.label="part" org.eventb.core.predicate="partition(Port,IPort,OPort)" org.eventb.core.source="/pseim/cPort.buc|org.eventb.core.contextFile#cPort|org.eventb.core.axiom#_Y1LocvqyEeectLZKwQfI0A" org.eventb.core.theorem="false"/> |
||||||
|
<org.eventb.core.scConstant name="IPort" org.eventb.core.source="/pseim/cPort.buc|org.eventb.core.contextFile#cPort|org.eventb.core.constant#_Y1LocPqyEeectLZKwQfI0A" org.eventb.core.type="ℙ(Port)"/> |
||||||
|
<org.eventb.core.scConstant name="OPort" org.eventb.core.source="/pseim/cPort.buc|org.eventb.core.contextFile#cPort|org.eventb.core.constant#_Y1LocfqyEeectLZKwQfI0A" org.eventb.core.type="ℙ(Port)"/> |
||||||
|
<org.eventb.core.scCarrierSet name="Port" org.eventb.core.source="/pseim/cPort.buc|org.eventb.core.contextFile#cPort|org.eventb.core.carrierSet#_YwaNQPqeEeectLZKwQfI0A" org.eventb.core.type="ℙ(Port)"/> |
||||||
|
</org.eventb.core.scContextFile> |
@ -0,0 +1,23 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<org.eventb.core.poFile org.eventb.core.poStamp="0"> |
||||||
|
<org.eventb.core.poPredicateSet name="ABSHYP" org.eventb.core.poStamp="0"> |
||||||
|
<org.eventb.core.poIdentifier name="Model" org.eventb.core.type="ℙ(Model)"/> |
||||||
|
<org.eventb.core.poIdentifier name="Property" org.eventb.core.type="ℙ(Property)"/> |
||||||
|
<org.eventb.core.poIdentifier name="Inst" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.poIdentifier name="Mdl" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.poIdentifier name="Pat" org.eventb.core.type="Model"/> |
||||||
|
<org.eventb.core.poIdentifier name="Pattern" org.eventb.core.type="ℙ(Model)"/> |
||||||
|
<org.eventb.core.poPredicate name="Propertz" org.eventb.core.predicate="Pattern⊆Model" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wcfqkEeectLZKwQfI0A"/> |
||||||
|
<org.eventb.core.poPredicate name="Propert{" org.eventb.core.predicate="Mdl∈Model ∖ Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wcvqkEeectLZKwQfI0A"/> |
||||||
|
<org.eventb.core.poPredicate name="Propert|" org.eventb.core.predicate="Pat∈Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_h20wc_qkEeectLZKwQfI0A"/> |
||||||
|
<org.eventb.core.poPredicate name="Propert}" org.eventb.core.predicate="Inst∈Model ∖ Pattern" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_fxjdEQKnEeiAPf1wPUl3Gw"/> |
||||||
|
<org.eventb.core.poPredicate name="Propert~" org.eventb.core.predicate="Inst≠Mdl" org.eventb.core.source="/pseim/cModel.buc|org.eventb.core.contextFile#cModel|org.eventb.core.axiom#_DGgrYAUMEei9ocE08JsPSw"/> |
||||||
|
<org.eventb.core.poIdentifier name="Component" org.eventb.core.type="ℙ(Component)"/> |
||||||
|
<org.eventb.core.poIdentifier name="Port" org.eventb.core.type="ℙ(Port)"/> |
||||||
|
<org.eventb.core.poIdentifier name="IPort" org.eventb.core.type="ℙ(Port)"/> |
||||||
|
<org.eventb.core.poIdentifier name="OPort" org.eventb.core.type="ℙ(Port)"/> |
||||||
|
</org.eventb.core.poPredicateSet> |
||||||
|
<org.eventb.core.poPredicateSet name="ALLHYP" org.eventb.core.parentSet="/pseim/cPort.bpo|org.eventb.core.poFile#cPort|org.eventb.core.poPredicateSet#ABSHYP" org.eventb.core.poStamp="0"> |
||||||
|
<org.eventb.core.poPredicate name="PRD0" org.eventb.core.predicate="partition(Port,IPort,OPort)" org.eventb.core.source="/pseim/cPort.buc|org.eventb.core.contextFile#cPort|org.eventb.core.axiom#_Y1LocvqyEeectLZKwQfI0A"/> |
||||||
|
</org.eventb.core.poPredicateSet> |
||||||
|
</org.eventb.core.poFile> |
@ -0,0 +1,2 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<org.eventb.core.prFile version="1"/> |
@ -0,0 +1,2 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<org.eventb.core.psFile/> |
@ -0,0 +1,8 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<org.eventb.core.contextFile org.eventb.core.configuration="org.eventb.core.fwd;de.prob.symbolic.ctxBase;de.prob.units.mchBase" org.eventb.texttools.text_lastmodified="1516102973558" org.eventb.texttools.text_representation="context cPort extends cComponent sets 	Port constants 	IPort OPort axioms 	@part partition(Port,IPort,OPort) end " version="3"> |
||||||
|
<org.eventb.core.extendsContext name="'" org.eventb.core.target="cComponent"/> |
||||||
|
<org.eventb.core.carrierSet name="_YwaNQPqeEeectLZKwQfI0A" org.eventb.core.identifier="Port"/> |
||||||
|
<org.eventb.core.constant name="_Y1LocPqyEeectLZKwQfI0A" org.eventb.core.identifier="IPort"/> |
||||||
|
<org.eventb.core.constant name="_Y1LocfqyEeectLZKwQfI0A" org.eventb.core.identifier="OPort"/> |
||||||
|
<org.eventb.core.axiom name="_Y1LocvqyEeectLZKwQfI0A" org.eventb.core.label="part" org.eventb.core.predicate="partition(Port,IPort,OPort)"/> |
||||||
|
</org.eventb.core.contextFile> |
After Width: | Height: | Size: 30 KiB |
@ -0,0 +1,2 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<org.eventb.core.psFile/> |
@ -0,0 +1,35 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<org.eventb.core.machineFile org.eventb.core.configuration="org.eventb.core.fwd;de.prob.units.mchBase" org.eventb.texttools.text_lastmodified="1522334186022" org.eventb.texttools.text_representation="machine mProperty refines mComponent sees cComponent variables components container c_multiplicity to_clone_c c_index to_unfold_c to_unfold_c_in cProperties inst2pat_c invariants @prop cProperties ∈ Component ↔ Property events event instanciate_pattern extends instanciate_pattern end event unfold_root_c extends unfold_root_c then @prop cProperties ≔ cProperties ∪ (ran(new_c)×cProperties[{c}]) end event clone_c extends clone_c end event unfold_node_c extends unfold_node_c then @prop cProperties ≔ cProperties ∪ (ran(new_c)×cProperties[{c}]) end event apply_pattern extends apply_pattern any inst_props where @inst_prop inst_props ∈ Property ⇸ Property // pattern properties to model properties then @prop cProperties ≔ cProperties ∪ ((inst_components ∪ new_components)∼;cProperties) end end " version="5"> |
||||||
|
<org.eventb.core.refinesMachine name="_0kfYMPqeEeectLZKwQfI0A" org.eventb.core.target="mComponent"/> |
||||||
|
<org.eventb.core.seesContext name="_Rf6I4ADlEei-meqqkXX9bA" org.eventb.core.target="cComponent"/> |
||||||
|
<org.eventb.core.event name="'" org.eventb.core.convergence="0" org.eventb.core.extended="true" org.eventb.core.label="instanciate_pattern"> |
||||||
|
<org.eventb.core.refinesEvent name="_btHw0PqwEeectLZKwQfI0A" org.eventb.core.target="instanciate_pattern"/> |
||||||
|
</org.eventb.core.event> |
||||||
|
<org.eventb.core.variable name="_0kf_QPqeEeectLZKwQfI0A" org.eventb.core.identifier="components"/> |
||||||
|
<org.eventb.core.variable name="_0kf_QfqeEeectLZKwQfI0A" org.eventb.core.identifier="container"/> |
||||||
|
<org.eventb.core.variable name="_0kf_QvqeEeectLZKwQfI0A" org.eventb.core.identifier="c_multiplicity"/> |
||||||
|
<org.eventb.core.variable name="_0kf_Q_qeEeectLZKwQfI0A" org.eventb.core.identifier="to_clone_c"/> |
||||||
|
<org.eventb.core.invariant name="_0kf_RPqeEeectLZKwQfI0A" org.eventb.core.label="prop" org.eventb.core.predicate="cProperties ∈ Component ↔ Property"/> |
||||||
|
<org.eventb.core.variable name="_btIX4fqwEeectLZKwQfI0A" org.eventb.core.identifier="c_index"/> |
||||||
|
<org.eventb.core.event name="_btIX4_qwEeectLZKwQfI0A" org.eventb.core.convergence="0" org.eventb.core.extended="true" org.eventb.core.label="unfold_root_c"> |
||||||
|
<org.eventb.core.refinesEvent name="_bAhygAKxEeiAPf1wPUl3Gw" org.eventb.core.target="unfold_root_c"/> |
||||||
|
<org.eventb.core.action name="_btIX4PqwEeectLZKwQfI0A" org.eventb.core.assignment="cProperties ≔ cProperties ∪ (ran(new_c)×cProperties[{c}])" org.eventb.core.label="prop"/> |
||||||
|
</org.eventb.core.event> |
||||||
|
<org.eventb.core.event name="_btJmBfqwEeectLZKwQfI0A" org.eventb.core.convergence="0" org.eventb.core.extended="true" org.eventb.core.label="clone_c"> |
||||||
|
<org.eventb.core.refinesEvent name="_SDieEP06Eees7pYemx4WBQ" org.eventb.core.target="clone_c"/> |
||||||
|
</org.eventb.core.event> |
||||||
|
<org.eventb.core.event name="_btKNEfqwEeectLZKwQfI0A" org.eventb.core.convergence="0" org.eventb.core.extended="true" org.eventb.core.label="unfold_node_c"> |
||||||
|
<org.eventb.core.refinesEvent name="_bAhygQKxEeiAPf1wPUl3Gw" org.eventb.core.target="unfold_node_c"/> |
||||||
|
<org.eventb.core.action name="_btJmA_qwEeectLZKwQfI0A" org.eventb.core.assignment="cProperties ≔ cProperties ∪ (ran(new_c)×cProperties[{c}])" org.eventb.core.label="prop"/> |
||||||
|
</org.eventb.core.event> |
||||||
|
<org.eventb.core.event name="_btKNGPqwEeectLZKwQfI0A" org.eventb.core.convergence="0" org.eventb.core.extended="true" org.eventb.core.label="apply_pattern"> |
||||||
|
<org.eventb.core.refinesEvent name="_Rf7XAQDlEei-meqqkXX9bA" org.eventb.core.target="apply_pattern"/> |
||||||
|
<org.eventb.core.parameter name="_btHw0fqwEeectLZKwQfI0A" org.eventb.core.identifier="inst_props"/> |
||||||
|
<org.eventb.core.guard name="_btHw0_qwEeectLZKwQfI0A" org.eventb.core.comment="pattern properties to model properties" org.eventb.core.label="inst_prop" org.eventb.core.predicate="inst_props ∈ Property ⇸ Property"/> |
||||||
|
<org.eventb.core.action name="_bAhyggKxEeiAPf1wPUl3Gw" org.eventb.core.assignment="cProperties ≔ cProperties ∪ ((inst_components ∪ new_components)∼;cProperties)" org.eventb.core.label="prop"/> |
||||||
|
</org.eventb.core.event> |
||||||
|
<org.eventb.core.variable name="_zYW3EPqwEeectLZKwQfI0A" org.eventb.core.identifier="to_unfold_c"/> |
||||||
|
<org.eventb.core.variable name="_ANiZwPqxEeectLZKwQfI0A" org.eventb.core.identifier="to_unfold_c_in"/> |
||||||
|
<org.eventb.core.variable name="_JtPOYPqxEeectLZKwQfI0A" org.eventb.core.identifier="cProperties"/> |
||||||
|
<org.eventb.core.variable name="_gk8cUAK8EeiAPf1wPUl3Gw" org.eventb.core.identifier="inst2pat_c"/> |
||||||
|
</org.eventb.core.machineFile> |
@ -0,0 +1,36 @@ |
|||||||
|
L1: new_components;f0 = {} |
||||||
|
L2: f0;new_components~ = {} |
||||||
|
|
||||||
|
∀ m · |
||||||
|
∃ f · |
||||||
|
f∈components(m) ↔ components(m) ∧ |
||||||
|
container(m)⊆f ∧ f;f⊆f ∧ |
||||||
|
id∩f=∅ |
||||||
|
instancier pour Mdl et Inst |
||||||
|
|
||||||
|
Montrer les deux lemmes (L1, L2) |
||||||
|
|
||||||
|
Faire deux cas en fonction des valeurs de Mdl (dc m = Mdl) |
||||||
|
|
||||||
|
Magic (SMT) |
||||||
|
|
||||||
|
instancier exist avec acycl |
||||||
|
acycl: (new_components∼;f;inst_components;f0) ∪ (new_components∼;f;(new_components ∪ inst_components)) ∪ f0 |
||||||
|
|
||||||
|
faire apparaitre les cas (Magic SMT) |
||||||
|
|
||||||
|
distribuer les unions à gauche de l'inclusion |
||||||
|
|
||||||
|
faire les rewrite L1 L2 |
||||||
|
|
||||||
|
Auto ????? Magic ... |
||||||
|
|
||||||
|
==================== |
||||||
|
|
||||||
|
pour unfold_node acyclic |
||||||
|
((ran(new_c) × {dest});f) ∪ (ran(new_c) × {dest}) ∪ f |
||||||
|
|
||||||
|
============================================ |
||||||
|
apply_pattern_link_oo: |
||||||
|
|
||||||
|
ajouter XXX;(inst_comp \/ new_com); (inst_comp\/new_comp)~= XXX |
@ -0,0 +1,23 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<context:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:context="http://emf.eventb.org/models/core/context/2014" name="cComponent"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="configuration" value="org.eventb.core.fwd;de.prob.symbolic.ctxBase;de.prob.units.mchBase"/> |
||||||
|
<details key="name" value="cComponent"/> |
||||||
|
</annotations> |
||||||
|
<annotations source="http:///org/eventb/core/RodinReferenceNamesAnnotations"> |
||||||
|
<details key="extends cModel" value="_IT7_UPqUEeectLZKwQfI0A"/> |
||||||
|
</annotations> |
||||||
|
<attributes key="org.eventb.texttools.text_lastmodified"> |
||||||
|
<value type="Long" value="ACED00057372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000162677D4428"/> |
||||||
|
</attributes> |
||||||
|
<attributes key="org.eventb.texttools.text_representation"> |
||||||
|
<value type="String" value="ACED0005740036636F6E746578742063436F6D706F6E656E7420657874656E647320634D6F64656C0A0A7365747320436F6D706F6E656E740A656E640A"/> |
||||||
|
</attributes> |
||||||
|
<extends href="../cModel.buc#http://emf.eventb.org/models/core/context/2014::Context::cModel"/> |
||||||
|
<sets name="Component"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_IT7_UfqUEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="Component"/> |
||||||
|
</annotations> |
||||||
|
</sets> |
||||||
|
</context:Context> |
@ -0,0 +1,71 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<context:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:context="http://emf.eventb.org/models/core/context/2014" name="cLink"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="configuration" value="org.eventb.core.fwd;de.prob.symbolic.ctxBase;de.prob.units.mchBase;org.eventb.codegen.ui.cgConfig"/> |
||||||
|
<details key="name" value="cLink"/> |
||||||
|
</annotations> |
||||||
|
<annotations source="http:///org/eventb/core/RodinReferenceNamesAnnotations"> |
||||||
|
<details key="extends cPort" value="'"/> |
||||||
|
</annotations> |
||||||
|
<attributes key="org.eventb.texttools.text_lastmodified"> |
||||||
|
<value type="Long" value="ACED00057372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000160FA6BAD63"/> |
||||||
|
</attributes> |
||||||
|
<attributes key="org.eventb.texttools.text_representation"> |
||||||
|
<value type="String" value="ACED00057400EA636F6E7465787420634C696E6B20657874656E64732063506F72740A73657473204C696E6B0A636F6E7374616E74730A094C4B696E64205472616E73706F7365204964656E7469747920536869667420466972737420526F746174650A0A6178696F6D730A09406C696E6B5F6B20706172746974696F6E284C696E6B2C205472616E73706F73652C204964656E746974792C2053686966742C2046697273742C20526F74617465290A09404C4B696E64204C4B696E64203D207B5472616E73706F73652C204964656E746974792C2053686966742C2046697273742C20526F746174657D0A0A656E640A"/> |
||||||
|
</attributes> |
||||||
|
<extends href="../cPort.buc#http://emf.eventb.org/models/core/context/2014::Context::cPort"/> |
||||||
|
<sets name="Link"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_IabHcPoIEeeOzddrJxUeNA"/> |
||||||
|
<details key="identifier" value="Link"/> |
||||||
|
</annotations> |
||||||
|
</sets> |
||||||
|
<constants name="LKind"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_u1ZfsPgzEeeeS5KQUtrGlw"/> |
||||||
|
<details key="identifier" value="LKind"/> |
||||||
|
</annotations> |
||||||
|
</constants> |
||||||
|
<constants name="Transpose"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_WzjhMPg8EeeeS5KQUtrGlw"/> |
||||||
|
<details key="identifier" value="Transpose"/> |
||||||
|
</annotations> |
||||||
|
</constants> |
||||||
|
<constants name="Identity"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_WzjhMfg8EeeeS5KQUtrGlw"/> |
||||||
|
<details key="identifier" value="Identity"/> |
||||||
|
</annotations> |
||||||
|
</constants> |
||||||
|
<constants name="Shift"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_WzjhMvg8EeeeS5KQUtrGlw"/> |
||||||
|
<details key="identifier" value="Shift"/> |
||||||
|
</annotations> |
||||||
|
</constants> |
||||||
|
<constants name="First"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_WzjhM_g8EeeeS5KQUtrGlw"/> |
||||||
|
<details key="identifier" value="First"/> |
||||||
|
</annotations> |
||||||
|
</constants> |
||||||
|
<constants name="Rotate"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_WzjhNPg8EeeeS5KQUtrGlw"/> |
||||||
|
<details key="identifier" value="Rotate"/> |
||||||
|
</annotations> |
||||||
|
</constants> |
||||||
|
<axioms name="link_k" predicate="partition(Link, Transpose, Identity, Shift, First, Rotate)"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_u1ZfsfgzEeeeS5KQUtrGlw"/> |
||||||
|
<details key="label" value="link_k"/> |
||||||
|
</annotations> |
||||||
|
</axioms> |
||||||
|
<axioms name="LKind" predicate="LKind = {Transpose, Identity, Shift, First, Rotate}"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_u1ZfsvgzEeeeS5KQUtrGlw"/> |
||||||
|
<details key="label" value="LKind"/> |
||||||
|
</annotations> |
||||||
|
</axioms> |
||||||
|
</context:Context> |
@ -0,0 +1,79 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<context:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:context="http://emf.eventb.org/models/core/context/2014" name="cModel"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="configuration" value="org.eventb.core.fwd;de.prob.symbolic.ctxBase;de.prob.units.mchBase"/> |
||||||
|
<details key="name" value="cModel"/> |
||||||
|
</annotations> |
||||||
|
<attributes key="org.eventb.texttools.text_lastmodified"> |
||||||
|
<value type="Long" value="ACED00057372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000161429C4912"/> |
||||||
|
</attributes> |
||||||
|
<attributes key="org.eventb.texttools.text_representation"> |
||||||
|
<value type="String" value="ACED00057400ED636F6E7465787420634D6F64656C0A0A73657473204D6F64656C2050726F70657274790A0A636F6E7374616E7473204D646C205061747465726E2050617420496E73740A0A6178696F6D730A2020405061747465726E5F7479205061747465726E20E28A86204D6F64656C0A2020404D646C5F7479204D646C20E28888204D6F64656C20E28896205061747465726E0A2020405061745F74792050617420E28888205061747465726E0A202040496E73745F747920496E737420E28888204D6F64656C20E28896205061747465726E0A202040496E73745F4D646C20496E737420E289A0204D646C0A656E640A"/> |
||||||
|
</attributes> |
||||||
|
<sets name="Model"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_5dsj0PqTEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="Model"/> |
||||||
|
</annotations> |
||||||
|
</sets> |
||||||
|
<sets name="Property"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_9dBM4ADlEei-meqqkXX9bA"/> |
||||||
|
<details key="identifier" value="Property"/> |
||||||
|
</annotations> |
||||||
|
</sets> |
||||||
|
<constants name="Mdl"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_h20JYPqkEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="Mdl"/> |
||||||
|
</annotations> |
||||||
|
</constants> |
||||||
|
<constants name="Pattern"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_h20wcPqkEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="Pattern"/> |
||||||
|
</annotations> |
||||||
|
</constants> |
||||||
|
<constants name="Pat"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_b4aBsPraEeerIsS6OyYQ4w"/> |
||||||
|
<details key="identifier" value="Pat"/> |
||||||
|
</annotations> |
||||||
|
</constants> |
||||||
|
<constants name="Inst"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_fxjdEAKnEeiAPf1wPUl3Gw"/> |
||||||
|
<details key="identifier" value="Inst"/> |
||||||
|
</annotations> |
||||||
|
</constants> |
||||||
|
<axioms name="Pattern_ty" predicate="Pattern ⊆ Model"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_h20wcfqkEeectLZKwQfI0A"/> |
||||||
|
<details key="label" value="Pattern_ty"/> |
||||||
|
</annotations> |
||||||
|
</axioms> |
||||||
|
<axioms name="Mdl_ty" predicate="Mdl ∈ Model ∖ Pattern"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_h20wcvqkEeectLZKwQfI0A"/> |
||||||
|
<details key="label" value="Mdl_ty"/> |
||||||
|
</annotations> |
||||||
|
</axioms> |
||||||
|
<axioms name="Pat_ty" predicate="Pat ∈ Pattern"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_h20wc_qkEeectLZKwQfI0A"/> |
||||||
|
<details key="label" value="Pat_ty"/> |
||||||
|
</annotations> |
||||||
|
</axioms> |
||||||
|
<axioms name="Inst_ty" predicate="Inst ∈ Model ∖ Pattern"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_fxjdEQKnEeiAPf1wPUl3Gw"/> |
||||||
|
<details key="label" value="Inst_ty"/> |
||||||
|
</annotations> |
||||||
|
</axioms> |
||||||
|
<axioms name="Inst_Mdl" predicate="Inst ≠ Mdl"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_DGgrYAUMEei9ocE08JsPSw"/> |
||||||
|
<details key="label" value="Inst_Mdl"/> |
||||||
|
</annotations> |
||||||
|
</axioms> |
||||||
|
</context:Context> |
@ -0,0 +1,41 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<context:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:context="http://emf.eventb.org/models/core/context/2014" name="cPort"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="configuration" value="org.eventb.core.fwd;de.prob.symbolic.ctxBase;de.prob.units.mchBase"/> |
||||||
|
<details key="name" value="cPort"/> |
||||||
|
</annotations> |
||||||
|
<annotations source="http:///org/eventb/core/RodinReferenceNamesAnnotations"> |
||||||
|
<details key="extends cComponent" value="'"/> |
||||||
|
</annotations> |
||||||
|
<attributes key="org.eventb.texttools.text_lastmodified"> |
||||||
|
<value type="Long" value="ACED00057372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787000000160FEC77876"/> |
||||||
|
</attributes> |
||||||
|
<attributes key="org.eventb.texttools.text_representation"> |
||||||
|
<value type="String" value="ACED0005740071636F6E746578742063506F727420657874656E64732063436F6D706F6E656E740A736574730A09506F72740A636F6E7374616E74730A0949506F7274204F506F72740A6178696F6D730A09407061727420706172746974696F6E28506F72742C49506F72742C4F506F7274290A656E640A"/> |
||||||
|
</attributes> |
||||||
|
<extends href="../cComponent.buc#http://emf.eventb.org/models/core/context/2014::Context::cComponent"/> |
||||||
|
<sets name="Port"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_YwaNQPqeEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="Port"/> |
||||||
|
</annotations> |
||||||
|
</sets> |
||||||
|
<constants name="IPort"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_Y1LocPqyEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="IPort"/> |
||||||
|
</annotations> |
||||||
|
</constants> |
||||||
|
<constants name="OPort"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_Y1LocfqyEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="OPort"/> |
||||||
|
</annotations> |
||||||
|
</constants> |
||||||
|
<axioms name="part" predicate="partition(Port,IPort,OPort)"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_Y1LocvqyEeectLZKwQfI0A"/> |
||||||
|
<details key="label" value="part"/> |
||||||
|
</annotations> |
||||||
|
</axioms> |
||||||
|
</context:Context> |
@ -0,0 +1,160 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<machine:Machine xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:machine="http://emf.eventb.org/models/core/machine/2014" name="mProperty"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="configuration" value="org.eventb.core.fwd;de.prob.units.mchBase"/> |
||||||
|
<details key="name" value="mProperty"/> |
||||||
|
</annotations> |
||||||
|
<annotations source="http:///org/eventb/core/RodinReferenceNamesAnnotations"> |
||||||
|
<details key="refines mComponent" value="_0kfYMPqeEeectLZKwQfI0A"/> |
||||||
|
<details key="sees cComponent" value="_Rf6I4ADlEei-meqqkXX9bA"/> |
||||||
|
</annotations> |
||||||
|
<attributes key="org.eventb.texttools.text_lastmodified"> |
||||||
|
<value type="Long" value="ACED00057372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000016272303A26"/> |
||||||
|
</attributes> |
||||||
|
<attributes key="org.eventb.texttools.text_representation"> |
||||||
|
<value type="String" value="ACED00057403806D616368696E65206D50726F706572747920726566696E6573206D436F6D706F6E656E742020736565732063436F6D706F6E656E740A0A7661726961626C657320636F6D706F6E656E747320636F6E7461696E657220635F6D756C7469706C696369747920746F5F636C6F6E655F6320635F696E64657820746F5F756E666F6C645F6320746F5F756E666F6C645F635F696E206350726F7065727469657320696E7374327061745F630A0A696E76617269616E74730A20204070726F70206350726F7065727469657320E2888820436F6D706F6E656E7420E286942050726F70657274790A0A6576656E74730A20206576656E7420696E7374616E63696174655F7061747465726E20657874656E647320696E7374616E63696174655F7061747465726E0A2020656E640A0A20206576656E7420756E666F6C645F726F6F745F6320657874656E647320756E666F6C645F726F6F745F630A202020207468656E0A2020202020204070726F70206350726F7065727469657320E28994206350726F7065727469657320E288AA202872616E286E65775F6329C3976350726F706572746965735B7B637D5D290A2020656E640A0A20206576656E7420636C6F6E655F6320657874656E647320636C6F6E655F630A2020656E640A0A20206576656E7420756E666F6C645F6E6F64655F6320657874656E647320756E666F6C645F6E6F64655F630A202020207468656E0A2020202020204070726F70206350726F7065727469657320E28994206350726F7065727469657320E288AA202872616E286E65775F6329C3976350726F706572746965735B7B637D5D290A2020656E640A0A20206576656E74206170706C795F7061747465726E20657874656E6473206170706C795F7061747465726E0A20202020616E7920696E73745F70726F70730A2020202077686572650A20202020202040696E73745F70726F7020696E73745F70726F707320E288882050726F706572747920E287B82050726F7065727479202F2F207061747465726E2070726F7065727469657320746F206D6F64656C2070726F706572746965730A202020207468656E0A2020202020204070726F70206350726F7065727469657320E28994206350726F7065727469657320E288AA20202828696E73745F636F6D706F6E656E747320E288AA206E65775F636F6D706F6E656E747329E288BC3B6350726F70657274696573290A2020656E640A656E640A"/> |
||||||
|
</attributes> |
||||||
|
<refines href="../mComponent.bum#http://emf.eventb.org/models/core/machine/2014::Machine::mComponent"/> |
||||||
|
<sees href="../cComponent.buc#http://emf.eventb.org/models/core/context/2014::Context::cComponent"/> |
||||||
|
<variables name="components"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_0kf_QPqeEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="components"/> |
||||||
|
</annotations> |
||||||
|
</variables> |
||||||
|
<variables name="container"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_0kf_QfqeEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="container"/> |
||||||
|
</annotations> |
||||||
|
</variables> |
||||||
|
<variables name="c_multiplicity"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_0kf_QvqeEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="c_multiplicity"/> |
||||||
|
</annotations> |
||||||
|
</variables> |
||||||
|
<variables name="to_clone_c"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_0kf_Q_qeEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="to_clone_c"/> |
||||||
|
</annotations> |
||||||
|
</variables> |
||||||
|
<variables name="c_index"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_btIX4fqwEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="c_index"/> |
||||||
|
</annotations> |
||||||
|
</variables> |
||||||
|
<variables name="to_unfold_c"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_zYW3EPqwEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="to_unfold_c"/> |
||||||
|
</annotations> |
||||||
|
</variables> |
||||||
|
<variables name="to_unfold_c_in"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_ANiZwPqxEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="to_unfold_c_in"/> |
||||||
|
</annotations> |
||||||
|
</variables> |
||||||
|
<variables name="cProperties"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_JtPOYPqxEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="cProperties"/> |
||||||
|
</annotations> |
||||||
|
</variables> |
||||||
|
<variables name="inst2pat_c"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_gk8cUAK8EeiAPf1wPUl3Gw"/> |
||||||
|
<details key="identifier" value="inst2pat_c"/> |
||||||
|
</annotations> |
||||||
|
</variables> |
||||||
|
<invariants name="prop" predicate="cProperties ∈ Component ↔ Property"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_0kf_RPqeEeectLZKwQfI0A"/> |
||||||
|
<details key="label" value="prop"/> |
||||||
|
</annotations> |
||||||
|
</invariants> |
||||||
|
<events name="instanciate_pattern" extended="true"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="'"/> |
||||||
|
<details key="label" value="instanciate_pattern"/> |
||||||
|
</annotations> |
||||||
|
<annotations source="http:///org/eventb/core/RodinReferenceNamesAnnotations"> |
||||||
|
<details key="refines instanciate_pattern" value="_btHw0PqwEeectLZKwQfI0A"/> |
||||||
|
</annotations> |
||||||
|
<refines href="../mComponent.bum#http://emf.eventb.org/models/core/machine/2014::Event::mComponent.instanciate_pattern"/> |
||||||
|
</events> |
||||||
|
<events name="unfold_root_c" extended="true"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_btIX4_qwEeectLZKwQfI0A"/> |
||||||
|
<details key="label" value="unfold_root_c"/> |
||||||
|
</annotations> |
||||||
|
<annotations source="http:///org/eventb/core/RodinReferenceNamesAnnotations"> |
||||||
|
<details key="refines unfold_root_c" value="_bAhygAKxEeiAPf1wPUl3Gw"/> |
||||||
|
</annotations> |
||||||
|
<refines href="../mComponent.bum#http://emf.eventb.org/models/core/machine/2014::Event::mComponent.unfold_root_c"/> |
||||||
|
<actions name="prop" action="cProperties ≔ cProperties ∪ (ran(new_c)×cProperties[{c}])"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_btIX4PqwEeectLZKwQfI0A"/> |
||||||
|
<details key="label" value="prop"/> |
||||||
|
</annotations> |
||||||
|
</actions> |
||||||
|
</events> |
||||||
|
<events name="clone_c" extended="true"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_btJmBfqwEeectLZKwQfI0A"/> |
||||||
|
<details key="label" value="clone_c"/> |
||||||
|
</annotations> |
||||||
|
<annotations source="http:///org/eventb/core/RodinReferenceNamesAnnotations"> |
||||||
|
<details key="refines clone_c" value="_SDieEP06Eees7pYemx4WBQ"/> |
||||||
|
</annotations> |
||||||
|
<refines href="../mComponent.bum#http://emf.eventb.org/models/core/machine/2014::Event::mComponent.clone_c"/> |
||||||
|
</events> |
||||||
|
<events name="unfold_node_c" extended="true"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_btKNEfqwEeectLZKwQfI0A"/> |
||||||
|
<details key="label" value="unfold_node_c"/> |
||||||
|
</annotations> |
||||||
|
<annotations source="http:///org/eventb/core/RodinReferenceNamesAnnotations"> |
||||||
|
<details key="refines unfold_node_c" value="_bAhygQKxEeiAPf1wPUl3Gw"/> |
||||||
|
</annotations> |
||||||
|
<refines href="../mComponent.bum#http://emf.eventb.org/models/core/machine/2014::Event::mComponent.unfold_node_c"/> |
||||||
|
<actions name="prop" action="cProperties ≔ cProperties ∪ (ran(new_c)×cProperties[{c}])"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_btJmA_qwEeectLZKwQfI0A"/> |
||||||
|
<details key="label" value="prop"/> |
||||||
|
</annotations> |
||||||
|
</actions> |
||||||
|
</events> |
||||||
|
<events name="apply_pattern" extended="true"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_btKNGPqwEeectLZKwQfI0A"/> |
||||||
|
<details key="label" value="apply_pattern"/> |
||||||
|
</annotations> |
||||||
|
<annotations source="http:///org/eventb/core/RodinReferenceNamesAnnotations"> |
||||||
|
<details key="refines apply_pattern" value="_Rf7XAQDlEei-meqqkXX9bA"/> |
||||||
|
</annotations> |
||||||
|
<refines href="../mComponent.bum#http://emf.eventb.org/models/core/machine/2014::Event::mComponent.apply_pattern"/> |
||||||
|
<parameters name="inst_props"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_btHw0fqwEeectLZKwQfI0A"/> |
||||||
|
<details key="identifier" value="inst_props"/> |
||||||
|
</annotations> |
||||||
|
</parameters> |
||||||
|
<guards comment="pattern properties to model properties" name="inst_prop" predicate="inst_props ∈ Property ⇸ Property"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_btHw0_qwEeectLZKwQfI0A"/> |
||||||
|
<details key="label" value="inst_prop"/> |
||||||
|
<details key="comment" value="pattern properties to model properties"/> |
||||||
|
</annotations> |
||||||
|
</guards> |
||||||
|
<actions name="prop" action="cProperties ≔ cProperties ∪ ((inst_components ∪ new_components)∼;cProperties)"> |
||||||
|
<annotations source="http:///org/eventb/core/RodinInternalAnnotations"> |
||||||
|
<details key="name" value="_bAhyggKxEeiAPf1wPUl3Gw"/> |
||||||
|
<details key="label" value="prop"/> |
||||||
|
</annotations> |
||||||
|
</actions> |
||||||
|
</events> |
||||||
|
</machine:Machine> |
@ -0,0 +1,10 @@ |
|||||||
|
This project is a demonstrator of pattern instantiation on the System Engineering Information Model (PSEIM) made by the MOISE project. |
||||||
|
It contains: |
||||||
|
* the PSEIM metamodel and its basic tree editor (plug-ins com.irtsaintexupery.pseim, com.irtsaintexupery.pseim.edit and com.irtsaintexupery.pseim.editor), |
||||||
|
* a graphical editor based on Sirius (plug-in com.irtsaintexupery.sirius.pseim), |
||||||
|
* textual editors (plug-ins com.irtsaintexupery.xtext.*), |
||||||
|
* formal verification models (Event-B) and examples. |
||||||
|
|
||||||
|
More information about the required Eclipse configurations can be found in the folder eclipse/releng/eclipse.configuration. |
||||||
|
|
||||||
|
Licensing information can be found in the Copyright file. |
@ -0,0 +1,17 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<projectDescription> |
||||||
|
<name>com.irtsaintexupery.pseim.feature</name> |
||||||
|
<comment></comment> |
||||||
|
<projects> |
||||||
|
</projects> |
||||||
|
<buildSpec> |
||||||
|
<buildCommand> |
||||||
|
<name>org.eclipse.pde.FeatureBuilder</name> |
||||||
|
<arguments> |
||||||
|
</arguments> |
||||||
|
</buildCommand> |
||||||
|
</buildSpec> |
||||||
|
<natures> |
||||||
|
<nature>org.eclipse.pde.FeatureNature</nature> |
||||||
|
</natures> |
||||||
|
</projectDescription> |
@ -0,0 +1 @@ |
|||||||
|
bin.includes = feature.xml |
@ -0,0 +1,364 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<feature |
||||||
|
id="com.irtsaintexupery.pseim.feature" |
||||||
|
label="Patterns for System Engineering Information Model" |
||||||
|
version="1.0.0.qualifier" |
||||||
|
provider-name="IRT AESE (IRT Saint Exupéry)"> |
||||||
|
|
||||||
|
<description url="https://sahara.pf.irt-saintexupery.com"> |
||||||
|
This feature provides tools for Pattern instanciation on System |
||||||
|
Engineering Models. |
||||||
|
</description> |
||||||
|
|
||||||
|
<copyright> |
||||||
|
Copyright (c) 2017, 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
All rights reserved. This program and the accompanying materials |
||||||
|
are made available under the terms of the Eclipse Public License |
||||||
|
v2.0 which accompanies this distribution, and is available at |
||||||
|
https://www.eclipse.org/legal/epl-2.0. |
||||||
|
</copyright> |
||||||
|
|
||||||
|
<license url="https://www.eclipse.org/legal/epl-2.0"> |
||||||
|
Eclipse Public License - v 2.0 |
||||||
|
|
||||||
|
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE |
||||||
|
PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION |
||||||
|
OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. |
||||||
|
|
||||||
|
1. DEFINITIONS |
||||||
|
|
||||||
|
"Contribution" means: |
||||||
|
|
||||||
|
a) in the case of the initial Contributor, the initial content |
||||||
|
Distributed under this Agreement, and |
||||||
|
|
||||||
|
b) in the case of each subsequent Contributor: |
||||||
|
i) changes to the Program, and |
||||||
|
ii) additions to the Program; |
||||||
|
where such changes and/or additions to the Program originate from |
||||||
|
and are Distributed by that particular Contributor. A Contribution |
||||||
|
"originates" from a Contributor if it was added to the Program by |
||||||
|
such Contributor itself or anyone acting on such Contributor's behalf. |
||||||
|
Contributions do not include changes or additions to the Program that |
||||||
|
are not Modified Works. |
||||||
|
|
||||||
|
"Contributor" means any person or entity that Distributes the Program. |
||||||
|
|
||||||
|
"Licensed Patents" mean patent claims licensable by a Contributor which |
||||||
|
are necessarily infringed by the use or sale of its Contribution alone |
||||||
|
or when combined with the Program. |
||||||
|
|
||||||
|
"Program" means the Contributions Distributed in accordance with this |
||||||
|
Agreement. |
||||||
|
|
||||||
|
"Recipient" means anyone who receives the Program under this Agreement |
||||||
|
or any Secondary License (as applicable), including Contributors. |
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source Code or other |
||||||
|
form, that is based on (or derived from) the Program and for which the |
||||||
|
editorial revisions, annotations, elaborations, or other modifications |
||||||
|
represent, as a whole, an original work of authorship. |
||||||
|
|
||||||
|
"Modified Works" shall mean any work in Source Code or other form that |
||||||
|
results from an addition to, deletion from, or modification of the |
||||||
|
contents of the Program, including, for purposes of clarity any new file |
||||||
|
in Source Code form that contains any contents of the Program. Modified |
||||||
|
Works shall not include works that contain only declarations, |
||||||
|
interfaces, types, classes, structures, or files of the Program solely |
||||||
|
in each case in order to link to, bind by name, or subclass the Program |
||||||
|
or Modified Works thereof. |
||||||
|
|
||||||
|
"Distribute" means the acts of a) distributing or b) making available |
||||||
|
in any manner that enables the transfer of a copy. |
||||||
|
|
||||||
|
"Source Code" means the form of a Program preferred for making |
||||||
|
modifications, including but not limited to software source code, |
||||||
|
documentation source, and configuration files. |
||||||
|
|
||||||
|
"Secondary License" means either the GNU General Public License, |
||||||
|
Version 2.0, or any later versions of that license, including any |
||||||
|
exceptions or additional permissions as identified by the initial |
||||||
|
Contributor. |
||||||
|
|
||||||
|
2. GRANT OF RIGHTS |
||||||
|
|
||||||
|
a) Subject to the terms of this Agreement, each Contributor hereby |
||||||
|
grants Recipient a non-exclusive, worldwide, royalty-free copyright |
||||||
|
license to reproduce, prepare Derivative Works of, publicly display, |
||||||
|
publicly perform, Distribute and sublicense the Contribution of such |
||||||
|
Contributor, if any, and such Derivative Works. |
||||||
|
|
||||||
|
b) Subject to the terms of this Agreement, each Contributor hereby |
||||||
|
grants Recipient a non-exclusive, worldwide, royalty-free patent |
||||||
|
license under Licensed Patents to make, use, sell, offer to sell, |
||||||
|
import and otherwise transfer the Contribution of such Contributor, |
||||||
|
if any, in Source Code or other form. This patent license shall |
||||||
|
apply to the combination of the Contribution and the Program if, at |
||||||
|
the time the Contribution is added by the Contributor, such addition |
||||||
|
of the Contribution causes such combination to be covered by the |
||||||
|
Licensed Patents. The patent license shall not apply to any other |
||||||
|
combinations which include the Contribution. No hardware per se is |
||||||
|
licensed hereunder. |
||||||
|
|
||||||
|
c) Recipient understands that although each Contributor grants the |
||||||
|
licenses to its Contributions set forth herein, no assurances are |
||||||
|
provided by any Contributor that the Program does not infringe the |
||||||
|
patent or other intellectual property rights of any other entity. |
||||||
|
Each Contributor disclaims any liability to Recipient for claims |
||||||
|
brought by any other entity based on infringement of intellectual |
||||||
|
property rights or otherwise. As a condition to exercising the |
||||||
|
rights and licenses granted hereunder, each Recipient hereby |
||||||
|
assumes sole responsibility to secure any other intellectual |
||||||
|
property rights needed, if any. For example, if a third party |
||||||
|
patent license is required to allow Recipient to Distribute the |
||||||
|
Program, it is Recipient's responsibility to acquire that license |
||||||
|
before distributing the Program. |
||||||
|
|
||||||
|
d) Each Contributor represents that to its knowledge it has |
||||||
|
sufficient copyright rights in its Contribution, if any, to grant |
||||||
|
the copyright license set forth in this Agreement. |
||||||
|
|
||||||
|
e) Notwithstanding the terms of any Secondary License, no |
||||||
|
Contributor makes additional grants to any Recipient (other than |
||||||
|
those set forth in this Agreement) as a result of such Recipient's |
||||||
|
receipt of the Program under the terms of a Secondary License |
||||||
|
(if permitted under the terms of Section 3). |
||||||
|
|
||||||
|
3. REQUIREMENTS |
||||||
|
|
||||||
|
3.1 If a Contributor Distributes the Program in any form, then: |
||||||
|
|
||||||
|
a) the Program must also be made available as Source Code, in |
||||||
|
accordance with section 3.2, and the Contributor must accompany |
||||||
|
the Program with a statement that the Source Code for the Program |
||||||
|
is available under this Agreement, and informs Recipients how to |
||||||
|
obtain it in a reasonable manner on or through a medium customarily |
||||||
|
used for software exchange; and |
||||||
|
|
||||||
|
b) the Contributor may Distribute the Program under a license |
||||||
|
different than this Agreement, provided that such license: |
||||||
|
i) effectively disclaims on behalf of all other Contributors all |
||||||
|
warranties and conditions, express and implied, including |
||||||
|
warranties or conditions of title and non-infringement, and |
||||||
|
implied warranties or conditions of merchantability and fitness |
||||||
|
for a particular purpose; |
||||||
|
|
||||||
|
ii) effectively excludes on behalf of all other Contributors all |
||||||
|
liability for damages, including direct, indirect, special, |
||||||
|
incidental and consequential damages, such as lost profits; |
||||||
|
|
||||||
|
iii) does not attempt to limit or alter the recipients' rights |
||||||
|
in the Source Code under section 3.2; and |
||||||
|
|
||||||
|
iv) requires any subsequent distribution of the Program by any |
||||||
|
party to be under a license that satisfies the requirements |
||||||
|
of this section 3. |
||||||
|
|
||||||
|
3.2 When the Program is Distributed as Source Code: |
||||||
|
|
||||||
|
a) it must be made available under this Agreement, or if the |
||||||
|
Program (i) is combined with other material in a separate file or |
||||||
|
files made available under a Secondary License, and (ii) the initial |
||||||
|
Contributor attached to the Source Code the notice described in |
||||||
|
Exhibit A of this Agreement, then the Program may be made available |
||||||
|
under the terms of such Secondary Licenses, and |
||||||
|
|
||||||
|
b) a copy of this Agreement must be included with each copy of |
||||||
|
the Program. |
||||||
|
|
||||||
|
3.3 Contributors may not remove or alter any copyright, patent, |
||||||
|
trademark, attribution notices, disclaimers of warranty, or limitations |
||||||
|
of liability ("notices") contained within the Program from any copy of |
||||||
|
the Program which they Distribute, provided that Contributors may add |
||||||
|
their own appropriate notices. |
||||||
|
|
||||||
|
4. COMMERCIAL DISTRIBUTION |
||||||
|
|
||||||
|
Commercial distributors of software may accept certain responsibilities |
||||||
|
with respect to end users, business partners and the like. While this |
||||||
|
license is intended to facilitate the commercial use of the Program, |
||||||
|
the Contributor who includes the Program in a commercial product |
||||||
|
offering should do so in a manner which does not create potential |
||||||
|
liability for other Contributors. Therefore, if a Contributor includes |
||||||
|
the Program in a commercial product offering, such Contributor |
||||||
|
("Commercial Contributor") hereby agrees to defend and indemnify every |
||||||
|
other Contributor ("Indemnified Contributor") against any losses, |
||||||
|
damages and costs (collectively "Losses") arising from claims, lawsuits |
||||||
|
and other legal actions brought by a third party against the Indemnified |
||||||
|
Contributor to the extent caused by the acts or omissions of such |
||||||
|
Commercial Contributor in connection with its distribution of the Program |
||||||
|
in a commercial product offering. The obligations in this section do not |
||||||
|
apply to any claims or Losses relating to any actual or alleged |
||||||
|
intellectual property infringement. In order to qualify, an Indemnified |
||||||
|
Contributor must: a) promptly notify the Commercial Contributor in |
||||||
|
writing of such claim, and b) allow the Commercial Contributor to control, |
||||||
|
and cooperate with the Commercial Contributor in, the defense and any |
||||||
|
related settlement negotiations. The Indemnified Contributor may |
||||||
|
participate in any such claim at its own expense. |
||||||
|
|
||||||
|
For example, a Contributor might include the Program in a commercial |
||||||
|
product offering, Product X. That Contributor is then a Commercial |
||||||
|
Contributor. If that Commercial Contributor then makes performance |
||||||
|
claims, or offers warranties related to Product X, those performance |
||||||
|
claims and warranties are such Commercial Contributor's responsibility |
||||||
|
alone. Under this section, the Commercial Contributor would have to |
||||||
|
defend claims against the other Contributors related to those performance |
||||||
|
claims and warranties, and if a court requires any other Contributor to |
||||||
|
pay any damages as a result, the Commercial Contributor must pay |
||||||
|
those damages. |
||||||
|
|
||||||
|
5. NO WARRANTY |
||||||
|
|
||||||
|
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT |
||||||
|
PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" |
||||||
|
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR |
||||||
|
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF |
||||||
|
TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR |
||||||
|
PURPOSE. Each Recipient is solely responsible for determining the |
||||||
|
appropriateness of using and distributing the Program and assumes all |
||||||
|
risks associated with its exercise of rights under this Agreement, |
||||||
|
including but not limited to the risks and costs of program errors, |
||||||
|
compliance with applicable laws, damage to or loss of data, programs |
||||||
|
or equipment, and unavailability or interruption of operations. |
||||||
|
|
||||||
|
6. DISCLAIMER OF LIABILITY |
||||||
|
|
||||||
|
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT |
||||||
|
PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS |
||||||
|
SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
||||||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST |
||||||
|
PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
||||||
|
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE |
||||||
|
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE |
||||||
|
POSSIBILITY OF SUCH DAMAGES. |
||||||
|
|
||||||
|
7. GENERAL |
||||||
|
|
||||||
|
If any provision of this Agreement is invalid or unenforceable under |
||||||
|
applicable law, it shall not affect the validity or enforceability of |
||||||
|
the remainder of the terms of this Agreement, and without further |
||||||
|
action by the parties hereto, such provision shall be reformed to the |
||||||
|
minimum extent necessary to make such provision valid and enforceable. |
||||||
|
|
||||||
|
If Recipient institutes patent litigation against any entity |
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that the |
||||||
|
Program itself (excluding combinations of the Program with other software |
||||||
|
or hardware) infringes such Recipient's patent(s), then such Recipient's |
||||||
|
rights granted under Section 2(b) shall terminate as of the date such |
||||||
|
litigation is filed. |
||||||
|
|
||||||
|
All Recipient's rights under this Agreement shall terminate if it |
||||||
|
fails to comply with any of the material terms or conditions of this |
||||||
|
Agreement and does not cure such failure in a reasonable period of |
||||||
|
time after becoming aware of such noncompliance. If all Recipient's |
||||||
|
rights under this Agreement terminate, Recipient agrees to cease use |
||||||
|
and distribution of the Program as soon as reasonably practicable. |
||||||
|
However, Recipient's obligations under this Agreement and any licenses |
||||||
|
granted by Recipient relating to the Program shall continue and survive. |
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute copies of this Agreement, |
||||||
|
but in order to avoid inconsistency the Agreement is copyrighted and |
||||||
|
may only be modified in the following manner. The Agreement Steward |
||||||
|
reserves the right to publish new versions (including revisions) of |
||||||
|
this Agreement from time to time. No one other than the Agreement |
||||||
|
Steward has the right to modify this Agreement. The Eclipse Foundation |
||||||
|
is the initial Agreement Steward. The Eclipse Foundation may assign the |
||||||
|
responsibility to serve as the Agreement Steward to a suitable separate |
||||||
|
entity. Each new version of the Agreement will be given a distinguishing |
||||||
|
version number. The Program (including Contributions) may always be |
||||||
|
Distributed subject to the version of the Agreement under which it was |
||||||
|
received. In addition, after a new version of the Agreement is published, |
||||||
|
Contributor may elect to Distribute the Program (including its |
||||||
|
Contributions) under the new version. |
||||||
|
|
||||||
|
Except as expressly stated in Sections 2(a) and 2(b) above, Recipient |
||||||
|
receives no rights or licenses to the intellectual property of any |
||||||
|
Contributor under this Agreement, whether expressly, by implication, |
||||||
|
estoppel or otherwise. All rights in the Program not expressly granted |
||||||
|
under this Agreement are reserved. Nothing in this Agreement is intended |
||||||
|
to be enforceable by any entity that is not a Contributor or Recipient. |
||||||
|
No third-party beneficiary rights are created under this Agreement. |
||||||
|
|
||||||
|
Exhibit A - Form of Secondary Licenses Notice |
||||||
|
|
||||||
|
"This Source Code may also be made available under the following |
||||||
|
Secondary Licenses when the conditions for such availability set forth |
||||||
|
in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), |
||||||
|
version(s), and exceptions or additional permissions here}." |
||||||
|
|
||||||
|
Simply including a copy of this Agreement, including this Exhibit A |
||||||
|
is not sufficient to license the Source Code under Secondary Licenses. |
||||||
|
|
||||||
|
If it is not possible or desirable to put the notice in a particular |
||||||
|
file, then You may include the notice in a location (such as a LICENSE |
||||||
|
file in a relevant directory) where a recipient would be likely to |
||||||
|
look for such a notice. |
||||||
|
|
||||||
|
You may add additional accurate notices of copyright ownership. |
||||||
|
</license> |
||||||
|
|
||||||
|
<plugin |
||||||
|
id="com.irtsaintexupery.xtext.pseim.ide" |
||||||
|
download-size="0" |
||||||
|
install-size="0" |
||||||
|
version="0.0.0" |
||||||
|
unpack="false"/> |
||||||
|
|
||||||
|
<plugin |
||||||
|
id="com.irtsaintexupery.xtext.pseim.pattern.ui" |
||||||
|
download-size="0" |
||||||
|
install-size="0" |
||||||
|
version="0.0.0" |
||||||
|
unpack="false"/> |
||||||
|
|
||||||
|
<plugin |
||||||
|
id="com.irtsaintexupery.pseim" |
||||||
|
download-size="0" |
||||||
|
install-size="0" |
||||||
|
version="0.0.0" |
||||||
|
unpack="false"/> |
||||||
|
|
||||||
|
<plugin |
||||||
|
id="com.irtsaintexupery.xtext.pseim.ui" |
||||||
|
download-size="0" |
||||||
|
install-size="0" |
||||||
|
version="0.0.0" |
||||||
|
unpack="false"/> |
||||||
|
|
||||||
|
<plugin |
||||||
|
id="com.irtsaintexupery.pseim.editor" |
||||||
|
download-size="0" |
||||||
|
install-size="0" |
||||||
|
version="0.0.0" |
||||||
|
unpack="false"/> |
||||||
|
|
||||||
|
<plugin |
||||||
|
id="com.irtsaintexupery.pseim.edit" |
||||||
|
download-size="0" |
||||||
|
install-size="0" |
||||||
|
version="0.0.0" |
||||||
|
unpack="false"/> |
||||||
|
|
||||||
|
<plugin |
||||||
|
id="com.irtsaintexupery.xtext.pseim.pattern.ide" |
||||||
|
download-size="0" |
||||||
|
install-size="0" |
||||||
|
version="0.0.0" |
||||||
|
unpack="false"/> |
||||||
|
|
||||||
|
<plugin |
||||||
|
id="com.irtsaintexupery.xtext.pseim" |
||||||
|
download-size="0" |
||||||
|
install-size="0" |
||||||
|
version="0.0.0" |
||||||
|
unpack="false"/> |
||||||
|
|
||||||
|
<plugin |
||||||
|
id="com.irtsaintexupery.xtext.pseim.pattern" |
||||||
|
download-size="0" |
||||||
|
install-size="0" |
||||||
|
version="0.0.0" |
||||||
|
unpack="false"/> |
||||||
|
|
||||||
|
</feature> |
@ -0,0 +1,7 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<classpath> |
||||||
|
<classpathentry kind="src" path="src-gen"/> |
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> |
||||||
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> |
||||||
|
<classpathentry kind="output" path="bin"/> |
||||||
|
</classpath> |
@ -0,0 +1,28 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<projectDescription> |
||||||
|
<name>com.irtsaintexupery.pseim.edit</name> |
||||||
|
<comment></comment> |
||||||
|
<projects> |
||||||
|
</projects> |
||||||
|
<buildSpec> |
||||||
|
<buildCommand> |
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name> |
||||||
|
<arguments> |
||||||
|
</arguments> |
||||||
|
</buildCommand> |
||||||
|
<buildCommand> |
||||||
|
<name>org.eclipse.pde.ManifestBuilder</name> |
||||||
|
<arguments> |
||||||
|
</arguments> |
||||||
|
</buildCommand> |
||||||
|
<buildCommand> |
||||||
|
<name>org.eclipse.pde.SchemaBuilder</name> |
||||||
|
<arguments> |
||||||
|
</arguments> |
||||||
|
</buildCommand> |
||||||
|
</buildSpec> |
||||||
|
<natures> |
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature> |
||||||
|
<nature>org.eclipse.pde.PluginNature</nature> |
||||||
|
</natures> |
||||||
|
</projectDescription> |
@ -0,0 +1,17 @@ |
|||||||
|
Manifest-Version: 1.0 |
||||||
|
Bundle-ManifestVersion: 2 |
||||||
|
Bundle-Name: %pluginName |
||||||
|
Bundle-SymbolicName: com.irtsaintexupery.pseim.edit;singleton:=true |
||||||
|
Bundle-Version: 1.0.0.qualifier |
||||||
|
Bundle-ClassPath: . |
||||||
|
Bundle-Activator: com.irtsaintexupery.pseim.pseim.provider.PseimEditPlugin$Implementation |
||||||
|
Bundle-Vendor: %providerName |
||||||
|
Bundle-Localization: plugin |
||||||
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 |
||||||
|
Export-Package: com.irtsaintexupery.pseim.seim.provider, |
||||||
|
com.irtsaintexupery.pseim.pseim.provider |
||||||
|
Require-Bundle: org.eclipse.core.runtime, |
||||||
|
com.irtsaintexupery.pseim;visibility:=reexport, |
||||||
|
org.eclipse.emf.edit;visibility:=reexport, |
||||||
|
com.irtsaintexupery.pseim.edit;visibility:=reexport |
||||||
|
Bundle-ActivationPolicy: lazy |
@ -0,0 +1,10 @@ |
|||||||
|
# |
||||||
|
|
||||||
|
bin.includes = .,\ |
||||||
|
icons/,\ |
||||||
|
META-INF/,\ |
||||||
|
plugin.xml,\ |
||||||
|
plugin.properties |
||||||
|
jars.compile.order = . |
||||||
|
source.. = src-gen/ |
||||||
|
output.. = bin/ |
After Width: | Height: | Size: 223 B |
After Width: | Height: | Size: 223 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 882 B |
After Width: | Height: | Size: 882 B |
After Width: | Height: | Size: 900 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 898 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 889 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 878 B |
@ -0,0 +1,105 @@ |
|||||||
|
# |
||||||
|
|
||||||
|
pluginName = PSEIM Edit Support |
||||||
|
providerName = IRT AESE (IRT Saint Exupéry) |
||||||
|
|
||||||
|
_UI_CreateChild_text = {0} |
||||||
|
_UI_CreateChild_text2 = {1} {0} |
||||||
|
_UI_CreateChild_text3 = {1} |
||||||
|
_UI_CreateChild_tooltip = Create New {0} Under {1} Feature |
||||||
|
_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. |
||||||
|
_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. |
||||||
|
|
||||||
|
_UI_PropertyDescriptor_description = The {0} of the {1} |
||||||
|
|
||||||
|
_UI_Component_type = Component |
||||||
|
_UI_Port_type = Port |
||||||
|
_UI_Link_type = Link |
||||||
|
_UI_GraphElement_type = Graph Element |
||||||
|
_UI_Property_type = Property |
||||||
|
_UI_BasicProperty_type = Basic Property |
||||||
|
_UI_IntegerProperty_type = Integer Property |
||||||
|
_UI_StringProperty_type = String Property |
||||||
|
_UI_BooleanProperty_type = Boolean Property |
||||||
|
_UI_ReferenceProperty_type = Reference Property |
||||||
|
_UI_PropertyHolder_type = Property Holder |
||||||
|
_UI_NamedElement_type = Named Element |
||||||
|
_UI_IdentifiedElement_type = Identified Element |
||||||
|
_UI_Model_type = Model |
||||||
|
_UI_BorderElement_type = Border Element |
||||||
|
_UI_Element_type = Element |
||||||
|
_UI_Unknown_type = Object |
||||||
|
|
||||||
|
_UI_Unknown_datatype= Value |
||||||
|
|
||||||
|
_UI_Component_content_feature = Content |
||||||
|
_UI_Port_direction_feature = Direction |
||||||
|
_UI_Link_src_feature = Src |
||||||
|
_UI_Link_dst_feature = Dst |
||||||
|
_UI_Property_key_feature = Key |
||||||
|
_UI_IntegerProperty_value_feature = Value |
||||||
|
_UI_StringProperty_value_feature = Value |
||||||
|
_UI_BooleanProperty_value_feature = Value |
||||||
|
_UI_ReferenceProperty_ref_feature = Ref |
||||||
|
_UI_PropertyHolder_properties_feature = Properties |
||||||
|
_UI_NamedElement_name_feature = Name |
||||||
|
_UI_IdentifiedElement_uid_feature = Uid |
||||||
|
_UI_Model_modelElements_feature = Model Elements |
||||||
|
_UI_Unknown_feature = Unspecified |
||||||
|
|
||||||
|
_UI_PortDirection_UNSPECIFIED_literal = UNSPECIFIED |
||||||
|
_UI_PortDirection_IN_literal = IN |
||||||
|
_UI_PortDirection_OUT_literal = OUT |
||||||
|
_UI_PortDirection_INOUT_literal = INOUT |
||||||
|
_UI_Library_type = Library |
||||||
|
_UI_Pattern_type = Pattern |
||||||
|
_UI_CardinalityElement_type = Cardinality Element |
||||||
|
_UI_PatternComponent_type = Pattern Component |
||||||
|
_UI_PatternPort_type = Pattern Port |
||||||
|
_UI_PatternLink_type = Pattern Link |
||||||
|
_UI_MultiplicityElement_type = Multiplicity Element |
||||||
|
_UI_Library_name_feature = Name |
||||||
|
_UI_Library_patterns_feature = Patterns |
||||||
|
_UI_Pattern_typeHS_feature = Type HS |
||||||
|
_UI_Pattern_typeFailure_feature = Type Failure |
||||||
|
_UI_Pattern_alsoKnownAs_feature = Also Known As |
||||||
|
_UI_Pattern_usedTactics_feature = Used Tactics |
||||||
|
_UI_Pattern_context_feature = Context |
||||||
|
_UI_Pattern_domain_feature = Domain |
||||||
|
_UI_Pattern_isSingleChannel_feature = Is Single Channel |
||||||
|
_UI_Pattern_interfaceElements_feature = Interface Elements |
||||||
|
_UI_Pattern_cardinalityElements_feature = Cardinality Elements |
||||||
|
_UI_CardinalityElement_calculatedVia_feature = Calculated Via |
||||||
|
_UI_PatternComponent_mergeContent_feature = Merge Content |
||||||
|
_UI_PatternPort_dir_feature = Dir |
||||||
|
_UI_PatternLink_linkType_feature = Link Type |
||||||
|
_UI_PatternLink_element_feature = Element |
||||||
|
_UI_MultiplicityElement_multiplicityValue_feature = Multiplicity Value |
||||||
|
_UI_MultiplicityElement_cardinalityElement_feature = Cardinality Element |
||||||
|
_UI_IdentifiedElement_identifiedAs_feature = Identified As |
||||||
|
_UI_PatternTypeHS_Hardware_literal = Hardware |
||||||
|
_UI_PatternTypeHS_Software_literal = Software |
||||||
|
_UI_PatternTypeFailureMode_Fail_safe_literal = Fail_safe |
||||||
|
_UI_PatternTypeFailureMode_Fail_over_literal = Fail_over |
||||||
|
_UI_SafetyTactic_Simplicity_literal = Simplicity |
||||||
|
_UI_SafetyTactic_Substitution_literal = Substitution |
||||||
|
_UI_SafetyTactic_Sanity_Check_literal = Sanity_Check |
||||||
|
_UI_SafetyTactic_Condition_Monitoring_literal = Condition_Monitoring |
||||||
|
_UI_SafetyTactic_Comparison_literal = Comparison |
||||||
|
_UI_SafetyTactic_Diverse_Redundancy_literal = Diverse_Redundancy |
||||||
|
_UI_SafetyTactic_Replication_Redundancy_literal = Replication_Redundancy |
||||||
|
_UI_SafetyTactic_Repair_literal = Repair |
||||||
|
_UI_SafetyTactic_Degradation_literal = Degradation |
||||||
|
_UI_SafetyTactic_Voting_literal = Voting |
||||||
|
_UI_SafetyTactic_Override_literal = Override |
||||||
|
_UI_SafetyTactic_Barrier_literal = Barrier |
||||||
|
_UI_SafetyTactic_Heartbeat_literal = Heartbeat |
||||||
|
_UI_LinkType_TRANSPOSE_literal = TRANSPOSE |
||||||
|
_UI_LinkType_IDENTITY_literal = IDENTITY |
||||||
|
_UI_LinkType_SHIFT_literal = SHIFT |
||||||
|
_UI_LinkType_FIRST_literal = FIRST |
||||||
|
_UI_LinkType_ROTATE_literal = ROTATE |
||||||
|
_UI_PatternPortDirection_UNSPECIFIED_literal = UNSPECIFIED |
||||||
|
_UI_PatternPortDirection_IN_literal = IN |
||||||
|
_UI_PatternPortDirection_OUT_literal = OUT |
||||||
|
_UI_PatternPortDirection_INOUT_literal = INOUT |
@ -0,0 +1,35 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<?eclipse version="3.0"?> |
||||||
|
|
||||||
|
<!-- |
||||||
|
--> |
||||||
|
|
||||||
|
<plugin> |
||||||
|
|
||||||
|
<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories"> |
||||||
|
<!-- @generated seim --> |
||||||
|
<factory |
||||||
|
uri="http://www.irt-saintexupery.com/seim/0.1" |
||||||
|
class="com.irtsaintexupery.pseim.seim.provider.SeimItemProviderAdapterFactory" |
||||||
|
supportedTypes= |
||||||
|
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider |
||||||
|
org.eclipse.emf.edit.provider.IStructuredItemContentProvider |
||||||
|
org.eclipse.emf.edit.provider.ITreeItemContentProvider |
||||||
|
org.eclipse.emf.edit.provider.IItemLabelProvider |
||||||
|
org.eclipse.emf.edit.provider.IItemPropertySource"/> |
||||||
|
</extension> |
||||||
|
|
||||||
|
<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories"> |
||||||
|
<!-- @generated pseim --> |
||||||
|
<factory |
||||||
|
uri="http://www.irt-saintexupery.com/pseim/0.1" |
||||||
|
class="com.irtsaintexupery.pseim.pseim.provider.PseimItemProviderAdapterFactory" |
||||||
|
supportedTypes= |
||||||
|
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider |
||||||
|
org.eclipse.emf.edit.provider.IStructuredItemContentProvider |
||||||
|
org.eclipse.emf.edit.provider.ITreeItemContentProvider |
||||||
|
org.eclipse.emf.edit.provider.IItemLabelProvider |
||||||
|
org.eclipse.emf.edit.provider.IItemPropertySource"/> |
||||||
|
</extension> |
||||||
|
|
||||||
|
</plugin> |
@ -0,0 +1,237 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.pseim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.pseim.CardinalityElement; |
||||||
|
import com.irtsaintexupery.pseim.pseim.PseimPackage; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.SeimFactory; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimPackage; |
||||||
|
|
||||||
|
import java.util.Collection; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.AdapterFactory; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
import org.eclipse.emf.ecore.EStructuralFeature; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
||||||
|
import org.eclipse.emf.edit.provider.ViewerNotification; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.pseim.CardinalityElement} object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class CardinalityElementItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, |
||||||
|
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { |
||||||
|
/** |
||||||
|
* This constructs an instance from a factory and a notifier. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public CardinalityElementItemProvider(AdapterFactory adapterFactory) { |
||||||
|
super(adapterFactory); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the property descriptors for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
||||||
|
if (itemPropertyDescriptors == null) { |
||||||
|
super.getPropertyDescriptors(object); |
||||||
|
|
||||||
|
addUidPropertyDescriptor(object); |
||||||
|
addNamePropertyDescriptor(object); |
||||||
|
addCalculatedViaPropertyDescriptor(object); |
||||||
|
} |
||||||
|
return itemPropertyDescriptors; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Uid feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addUidPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_uid_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_uid_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
SeimPackage.Literals.IDENTIFIED_ELEMENT__UID, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Name feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addNamePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_NamedElement_name_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", |
||||||
|
"_UI_NamedElement_type"), |
||||||
|
SeimPackage.Literals.NAMED_ELEMENT__NAME, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Calculated Via feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addCalculatedViaPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors.add(createItemPropertyDescriptor( |
||||||
|
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), |
||||||
|
getString("_UI_CardinalityElement_calculatedVia_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_CardinalityElement_calculatedVia_feature", |
||||||
|
"_UI_CardinalityElement_type"), |
||||||
|
PseimPackage.Literals.CARDINALITY_ELEMENT__CALCULATED_VIA, true, false, true, null, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an |
||||||
|
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or |
||||||
|
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { |
||||||
|
if (childrenFeatures == null) { |
||||||
|
super.getChildrenFeatures(object); |
||||||
|
childrenFeatures.add(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES); |
||||||
|
} |
||||||
|
return childrenFeatures; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected EStructuralFeature getChildFeature(Object object, Object child) { |
||||||
|
// Check the type of the specified child object and return the proper feature to use for
|
||||||
|
// adding (see {@link AddCommand}) it as a child.
|
||||||
|
|
||||||
|
return super.getChildFeature(object, child); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns CardinalityElement.gif. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object getImage(Object object) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/CardinalityElement")); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the label text for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getText(Object object) { |
||||||
|
String label = ((CardinalityElement) object).getName(); |
||||||
|
return label == null || label.length() == 0 ? getString("_UI_CardinalityElement_type") |
||||||
|
: getString("_UI_CardinalityElement_type") + " " + label; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This handles model notifications by calling {@link #updateChildren} to update any cached |
||||||
|
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void notifyChanged(Notification notification) { |
||||||
|
updateChildren(notification); |
||||||
|
|
||||||
|
switch (notification.getFeatureID(CardinalityElement.class)) { |
||||||
|
case PseimPackage.CARDINALITY_ELEMENT__UID: |
||||||
|
case PseimPackage.CARDINALITY_ELEMENT__NAME: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
||||||
|
return; |
||||||
|
case PseimPackage.CARDINALITY_ELEMENT__PROPERTIES: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); |
||||||
|
return; |
||||||
|
} |
||||||
|
super.notifyChanged(notification); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
||||||
|
* that can be created under this object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
||||||
|
super.collectNewChildDescriptors(newChildDescriptors, object); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createIntegerProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createStringProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createBooleanProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createReferenceProperty())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the resource locator for this item provider's resources. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getResourceLocator() { |
||||||
|
return PseimEditPlugin.INSTANCE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,211 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.pseim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.pseim.Library; |
||||||
|
import com.irtsaintexupery.pseim.pseim.PseimFactory; |
||||||
|
import com.irtsaintexupery.pseim.pseim.PseimPackage; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.SeimPackage; |
||||||
|
import java.util.Collection; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.AdapterFactory; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
import org.eclipse.emf.ecore.EStructuralFeature; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
||||||
|
import org.eclipse.emf.edit.provider.ViewerNotification; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.pseim.Library} object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class LibraryItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, |
||||||
|
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { |
||||||
|
/** |
||||||
|
* This constructs an instance from a factory and a notifier. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public LibraryItemProvider(AdapterFactory adapterFactory) { |
||||||
|
super(adapterFactory); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the property descriptors for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
||||||
|
if (itemPropertyDescriptors == null) { |
||||||
|
super.getPropertyDescriptors(object); |
||||||
|
|
||||||
|
addUidPropertyDescriptor(object); |
||||||
|
addNamePropertyDescriptor(object); |
||||||
|
} |
||||||
|
return itemPropertyDescriptors; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Uid feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addUidPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_uid_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_uid_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
SeimPackage.Literals.IDENTIFIED_ELEMENT__UID, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Name feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addNamePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_NamedElement_name_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", |
||||||
|
"_UI_NamedElement_type"), |
||||||
|
SeimPackage.Literals.NAMED_ELEMENT__NAME, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an |
||||||
|
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or |
||||||
|
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { |
||||||
|
if (childrenFeatures == null) { |
||||||
|
super.getChildrenFeatures(object); |
||||||
|
childrenFeatures.add(PseimPackage.Literals.LIBRARY__PATTERNS); |
||||||
|
} |
||||||
|
return childrenFeatures; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected EStructuralFeature getChildFeature(Object object, Object child) { |
||||||
|
// Check the type of the specified child object and return the proper feature to use for
|
||||||
|
// adding (see {@link AddCommand}) it as a child.
|
||||||
|
|
||||||
|
return super.getChildFeature(object, child); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns Library.gif. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object getImage(Object object) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/Library")); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the label text for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getText(Object object) { |
||||||
|
String label = ((Library) object).getName(); |
||||||
|
return label == null || label.length() == 0 ? getString("_UI_Library_type") |
||||||
|
: getString("_UI_Library_type") + " " + label; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This handles model notifications by calling {@link #updateChildren} to update any cached |
||||||
|
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void notifyChanged(Notification notification) { |
||||||
|
updateChildren(notification); |
||||||
|
|
||||||
|
switch (notification.getFeatureID(Library.class)) { |
||||||
|
case PseimPackage.LIBRARY__UID: |
||||||
|
case PseimPackage.LIBRARY__NAME: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
||||||
|
return; |
||||||
|
case PseimPackage.LIBRARY__PATTERNS: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); |
||||||
|
return; |
||||||
|
} |
||||||
|
super.notifyChanged(notification); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
||||||
|
* that can be created under this object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
||||||
|
super.collectNewChildDescriptors(newChildDescriptors, object); |
||||||
|
|
||||||
|
newChildDescriptors.add( |
||||||
|
createChildParameter(PseimPackage.Literals.LIBRARY__PATTERNS, PseimFactory.eINSTANCE.createPattern())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the resource locator for this item provider's resources. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getResourceLocator() { |
||||||
|
return PseimEditPlugin.INSTANCE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,310 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.pseim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.pseim.PatternComponent; |
||||||
|
import com.irtsaintexupery.pseim.pseim.PseimFactory; |
||||||
|
import com.irtsaintexupery.pseim.pseim.PseimPackage; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.SeimFactory; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimPackage; |
||||||
|
|
||||||
|
import java.util.Collection; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.AdapterFactory; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
import org.eclipse.emf.ecore.EStructuralFeature; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
||||||
|
import org.eclipse.emf.edit.provider.ViewerNotification; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.pseim.PatternComponent} object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class PatternComponentItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, |
||||||
|
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { |
||||||
|
/** |
||||||
|
* This constructs an instance from a factory and a notifier. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public PatternComponentItemProvider(AdapterFactory adapterFactory) { |
||||||
|
super(adapterFactory); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the property descriptors for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
||||||
|
if (itemPropertyDescriptors == null) { |
||||||
|
super.getPropertyDescriptors(object); |
||||||
|
|
||||||
|
addMultiplicityValuePropertyDescriptor(object); |
||||||
|
addCardinalityElementPropertyDescriptor(object); |
||||||
|
addIdentifiedAsPropertyDescriptor(object); |
||||||
|
addUidPropertyDescriptor(object); |
||||||
|
addNamePropertyDescriptor(object); |
||||||
|
addMergeContentPropertyDescriptor(object); |
||||||
|
} |
||||||
|
return itemPropertyDescriptors; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Multiplicity Value feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addMultiplicityValuePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors.add(createItemPropertyDescriptor( |
||||||
|
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), |
||||||
|
getString("_UI_MultiplicityElement_multiplicityValue_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_multiplicityValue_feature", |
||||||
|
"_UI_MultiplicityElement_type"), |
||||||
|
PseimPackage.Literals.MULTIPLICITY_ELEMENT__MULTIPLICITY_VALUE, true, false, false, |
||||||
|
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Cardinality Element feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addCardinalityElementPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors.add(createItemPropertyDescriptor( |
||||||
|
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), |
||||||
|
getString("_UI_MultiplicityElement_cardinalityElement_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_cardinalityElement_feature", |
||||||
|
"_UI_MultiplicityElement_type"), |
||||||
|
PseimPackage.Literals.MULTIPLICITY_ELEMENT__CARDINALITY_ELEMENT, true, false, true, null, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Identified As feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addIdentifiedAsPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_identifiedAs_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_identifiedAs_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
PseimPackage.Literals.IDENTIFIED_ELEMENT__IDENTIFIED_AS, true, false, true, null, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Uid feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addUidPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_uid_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_uid_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
SeimPackage.Literals.IDENTIFIED_ELEMENT__UID, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Name feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addNamePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_NamedElement_name_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", |
||||||
|
"_UI_NamedElement_type"), |
||||||
|
SeimPackage.Literals.NAMED_ELEMENT__NAME, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Merge Content feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addMergeContentPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_PatternComponent_mergeContent_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_PatternComponent_mergeContent_feature", |
||||||
|
"_UI_PatternComponent_type"), |
||||||
|
PseimPackage.Literals.PATTERN_COMPONENT__MERGE_CONTENT, true, false, false, |
||||||
|
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an |
||||||
|
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or |
||||||
|
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { |
||||||
|
if (childrenFeatures == null) { |
||||||
|
super.getChildrenFeatures(object); |
||||||
|
childrenFeatures.add(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES); |
||||||
|
childrenFeatures.add(SeimPackage.Literals.COMPONENT__CONTENT); |
||||||
|
} |
||||||
|
return childrenFeatures; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected EStructuralFeature getChildFeature(Object object, Object child) { |
||||||
|
// Check the type of the specified child object and return the proper feature to use for
|
||||||
|
// adding (see {@link AddCommand}) it as a child.
|
||||||
|
|
||||||
|
return super.getChildFeature(object, child); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns PatternComponent.gif. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object getImage(Object object) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternComponent")); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the label text for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getText(Object object) { |
||||||
|
String label = ((PatternComponent) object).getName(); |
||||||
|
return label == null || label.length() == 0 ? getString("_UI_PatternComponent_type") |
||||||
|
: getString("_UI_PatternComponent_type") + " " + label; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This handles model notifications by calling {@link #updateChildren} to update any cached |
||||||
|
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void notifyChanged(Notification notification) { |
||||||
|
updateChildren(notification); |
||||||
|
|
||||||
|
switch (notification.getFeatureID(PatternComponent.class)) { |
||||||
|
case PseimPackage.PATTERN_COMPONENT__MULTIPLICITY_VALUE: |
||||||
|
case PseimPackage.PATTERN_COMPONENT__UID: |
||||||
|
case PseimPackage.PATTERN_COMPONENT__NAME: |
||||||
|
case PseimPackage.PATTERN_COMPONENT__MERGE_CONTENT: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
||||||
|
return; |
||||||
|
case PseimPackage.PATTERN_COMPONENT__PROPERTIES: |
||||||
|
case PseimPackage.PATTERN_COMPONENT__CONTENT: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); |
||||||
|
return; |
||||||
|
} |
||||||
|
super.notifyChanged(notification); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
||||||
|
* that can be created under this object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
||||||
|
super.collectNewChildDescriptors(newChildDescriptors, object); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createIntegerProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createStringProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createBooleanProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createReferenceProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.COMPONENT__CONTENT, |
||||||
|
PseimFactory.eINSTANCE.createPatternComponent())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.COMPONENT__CONTENT, |
||||||
|
PseimFactory.eINSTANCE.createPatternPort())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.COMPONENT__CONTENT, |
||||||
|
PseimFactory.eINSTANCE.createPatternLink())); |
||||||
|
|
||||||
|
newChildDescriptors.add( |
||||||
|
createChildParameter(SeimPackage.Literals.COMPONENT__CONTENT, SeimFactory.eINSTANCE.createComponent())); |
||||||
|
|
||||||
|
newChildDescriptors |
||||||
|
.add(createChildParameter(SeimPackage.Literals.COMPONENT__CONTENT, SeimFactory.eINSTANCE.createPort())); |
||||||
|
|
||||||
|
newChildDescriptors |
||||||
|
.add(createChildParameter(SeimPackage.Literals.COMPONENT__CONTENT, SeimFactory.eINSTANCE.createLink())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the resource locator for this item provider's resources. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getResourceLocator() { |
||||||
|
return PseimEditPlugin.INSTANCE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,319 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.pseim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.pseim.Pattern; |
||||||
|
import com.irtsaintexupery.pseim.pseim.PseimFactory; |
||||||
|
import com.irtsaintexupery.pseim.pseim.PseimPackage; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.SeimPackage; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.provider.ModelItemProvider; |
||||||
|
|
||||||
|
import java.util.Collection; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.AdapterFactory; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
import org.eclipse.emf.ecore.EStructuralFeature; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ViewerNotification; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.pseim.Pattern} object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class PatternItemProvider extends ModelItemProvider { |
||||||
|
/** |
||||||
|
* This constructs an instance from a factory and a notifier. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public PatternItemProvider(AdapterFactory adapterFactory) { |
||||||
|
super(adapterFactory); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the property descriptors for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
||||||
|
if (itemPropertyDescriptors == null) { |
||||||
|
super.getPropertyDescriptors(object); |
||||||
|
|
||||||
|
addTypeHSPropertyDescriptor(object); |
||||||
|
addTypeFailurePropertyDescriptor(object); |
||||||
|
addAlsoKnownAsPropertyDescriptor(object); |
||||||
|
addUsedTacticsPropertyDescriptor(object); |
||||||
|
addContextPropertyDescriptor(object); |
||||||
|
addDomainPropertyDescriptor(object); |
||||||
|
addIsSingleChannelPropertyDescriptor(object); |
||||||
|
addInterfaceElementsPropertyDescriptor(object); |
||||||
|
} |
||||||
|
return itemPropertyDescriptors; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Type HS feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addTypeHSPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Pattern_typeHS_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Pattern_typeHS_feature", |
||||||
|
"_UI_Pattern_type"), |
||||||
|
PseimPackage.Literals.PATTERN__TYPE_HS, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Type Failure feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addTypeFailurePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Pattern_typeFailure_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Pattern_typeFailure_feature", |
||||||
|
"_UI_Pattern_type"), |
||||||
|
PseimPackage.Literals.PATTERN__TYPE_FAILURE, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Also Known As feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addAlsoKnownAsPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Pattern_alsoKnownAs_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Pattern_alsoKnownAs_feature", |
||||||
|
"_UI_Pattern_type"), |
||||||
|
PseimPackage.Literals.PATTERN__ALSO_KNOWN_AS, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Used Tactics feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addUsedTacticsPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Pattern_usedTactics_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Pattern_usedTactics_feature", |
||||||
|
"_UI_Pattern_type"), |
||||||
|
PseimPackage.Literals.PATTERN__USED_TACTICS, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Context feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addContextPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Pattern_context_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Pattern_context_feature", |
||||||
|
"_UI_Pattern_type"), |
||||||
|
PseimPackage.Literals.PATTERN__CONTEXT, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Domain feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addDomainPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Pattern_domain_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Pattern_domain_feature", |
||||||
|
"_UI_Pattern_type"), |
||||||
|
PseimPackage.Literals.PATTERN__DOMAIN, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Is Single Channel feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addIsSingleChannelPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Pattern_isSingleChannel_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Pattern_isSingleChannel_feature", |
||||||
|
"_UI_Pattern_type"), |
||||||
|
PseimPackage.Literals.PATTERN__IS_SINGLE_CHANNEL, true, false, false, |
||||||
|
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Interface Elements feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addInterfaceElementsPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Pattern_interfaceElements_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Pattern_interfaceElements_feature", |
||||||
|
"_UI_Pattern_type"), |
||||||
|
PseimPackage.Literals.PATTERN__INTERFACE_ELEMENTS, true, false, true, null, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an |
||||||
|
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or |
||||||
|
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { |
||||||
|
if (childrenFeatures == null) { |
||||||
|
super.getChildrenFeatures(object); |
||||||
|
childrenFeatures.add(PseimPackage.Literals.PATTERN__CARDINALITY_ELEMENTS); |
||||||
|
} |
||||||
|
return childrenFeatures; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected EStructuralFeature getChildFeature(Object object, Object child) { |
||||||
|
// Check the type of the specified child object and return the proper feature to use for
|
||||||
|
// adding (see {@link AddCommand}) it as a child.
|
||||||
|
|
||||||
|
return super.getChildFeature(object, child); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns Pattern.gif. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object getImage(Object object) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/Pattern")); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the label text for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getText(Object object) { |
||||||
|
String label = ((Pattern) object).getName(); |
||||||
|
return label == null || label.length() == 0 ? getString("_UI_Pattern_type") |
||||||
|
: getString("_UI_Pattern_type") + " " + label; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This handles model notifications by calling {@link #updateChildren} to update any cached |
||||||
|
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void notifyChanged(Notification notification) { |
||||||
|
updateChildren(notification); |
||||||
|
|
||||||
|
switch (notification.getFeatureID(Pattern.class)) { |
||||||
|
case PseimPackage.PATTERN__TYPE_HS: |
||||||
|
case PseimPackage.PATTERN__TYPE_FAILURE: |
||||||
|
case PseimPackage.PATTERN__ALSO_KNOWN_AS: |
||||||
|
case PseimPackage.PATTERN__USED_TACTICS: |
||||||
|
case PseimPackage.PATTERN__CONTEXT: |
||||||
|
case PseimPackage.PATTERN__DOMAIN: |
||||||
|
case PseimPackage.PATTERN__IS_SINGLE_CHANNEL: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
||||||
|
return; |
||||||
|
case PseimPackage.PATTERN__CARDINALITY_ELEMENTS: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); |
||||||
|
return; |
||||||
|
} |
||||||
|
super.notifyChanged(notification); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
||||||
|
* that can be created under this object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
||||||
|
super.collectNewChildDescriptors(newChildDescriptors, object); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.MODEL__MODEL_ELEMENTS, |
||||||
|
PseimFactory.eINSTANCE.createPatternComponent())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.MODEL__MODEL_ELEMENTS, |
||||||
|
PseimFactory.eINSTANCE.createPatternLink())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(PseimPackage.Literals.PATTERN__CARDINALITY_ELEMENTS, |
||||||
|
PseimFactory.eINSTANCE.createCardinalityElement())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the resource locator for this item provider's resources. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getResourceLocator() { |
||||||
|
return PseimEditPlugin.INSTANCE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,301 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.pseim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.pseim.PatternLink; |
||||||
|
import com.irtsaintexupery.pseim.pseim.PseimPackage; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.SeimFactory; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimPackage; |
||||||
|
|
||||||
|
import java.util.Collection; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.AdapterFactory; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
import org.eclipse.emf.ecore.EStructuralFeature; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
||||||
|
import org.eclipse.emf.edit.provider.ViewerNotification; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.pseim.PatternLink} object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class PatternLinkItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, |
||||||
|
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { |
||||||
|
/** |
||||||
|
* This constructs an instance from a factory and a notifier. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public PatternLinkItemProvider(AdapterFactory adapterFactory) { |
||||||
|
super(adapterFactory); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the property descriptors for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
||||||
|
if (itemPropertyDescriptors == null) { |
||||||
|
super.getPropertyDescriptors(object); |
||||||
|
|
||||||
|
addIdentifiedAsPropertyDescriptor(object); |
||||||
|
addUidPropertyDescriptor(object); |
||||||
|
addNamePropertyDescriptor(object); |
||||||
|
addSrcPropertyDescriptor(object); |
||||||
|
addDstPropertyDescriptor(object); |
||||||
|
addLinkTypePropertyDescriptor(object); |
||||||
|
addElementPropertyDescriptor(object); |
||||||
|
} |
||||||
|
return itemPropertyDescriptors; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Identified As feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addIdentifiedAsPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_identifiedAs_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_identifiedAs_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
PseimPackage.Literals.IDENTIFIED_ELEMENT__IDENTIFIED_AS, true, false, true, null, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Uid feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addUidPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_uid_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_uid_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
SeimPackage.Literals.IDENTIFIED_ELEMENT__UID, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Name feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addNamePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_NamedElement_name_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", |
||||||
|
"_UI_NamedElement_type"), |
||||||
|
SeimPackage.Literals.NAMED_ELEMENT__NAME, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Src feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addSrcPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Link_src_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Link_src_feature", "_UI_Link_type"), |
||||||
|
SeimPackage.Literals.LINK__SRC, true, false, true, null, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Dst feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addDstPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Link_dst_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Link_dst_feature", "_UI_Link_type"), |
||||||
|
SeimPackage.Literals.LINK__DST, true, false, true, null, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Link Type feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addLinkTypePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_PatternLink_linkType_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_PatternLink_linkType_feature", |
||||||
|
"_UI_PatternLink_type"), |
||||||
|
PseimPackage.Literals.PATTERN_LINK__LINK_TYPE, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Element feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addElementPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_PatternLink_element_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_PatternLink_element_feature", |
||||||
|
"_UI_PatternLink_type"), |
||||||
|
PseimPackage.Literals.PATTERN_LINK__ELEMENT, true, false, true, null, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an |
||||||
|
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or |
||||||
|
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { |
||||||
|
if (childrenFeatures == null) { |
||||||
|
super.getChildrenFeatures(object); |
||||||
|
childrenFeatures.add(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES); |
||||||
|
} |
||||||
|
return childrenFeatures; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected EStructuralFeature getChildFeature(Object object, Object child) { |
||||||
|
// Check the type of the specified child object and return the proper feature to use for
|
||||||
|
// adding (see {@link AddCommand}) it as a child.
|
||||||
|
|
||||||
|
return super.getChildFeature(object, child); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns PatternLink.gif. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object getImage(Object object) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternLink")); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the label text for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getText(Object object) { |
||||||
|
String label = ((PatternLink) object).getName(); |
||||||
|
return label == null || label.length() == 0 ? getString("_UI_PatternLink_type") |
||||||
|
: getString("_UI_PatternLink_type") + " " + label; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This handles model notifications by calling {@link #updateChildren} to update any cached |
||||||
|
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void notifyChanged(Notification notification) { |
||||||
|
updateChildren(notification); |
||||||
|
|
||||||
|
switch (notification.getFeatureID(PatternLink.class)) { |
||||||
|
case PseimPackage.PATTERN_LINK__UID: |
||||||
|
case PseimPackage.PATTERN_LINK__NAME: |
||||||
|
case PseimPackage.PATTERN_LINK__LINK_TYPE: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
||||||
|
return; |
||||||
|
case PseimPackage.PATTERN_LINK__PROPERTIES: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); |
||||||
|
return; |
||||||
|
} |
||||||
|
super.notifyChanged(notification); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
||||||
|
* that can be created under this object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
||||||
|
super.collectNewChildDescriptors(newChildDescriptors, object); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createIntegerProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createStringProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createBooleanProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createReferenceProperty())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the resource locator for this item provider's resources. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getResourceLocator() { |
||||||
|
return PseimEditPlugin.INSTANCE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,316 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.pseim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.pseim.PatternPort; |
||||||
|
import com.irtsaintexupery.pseim.pseim.PseimPackage; |
||||||
|
import com.irtsaintexupery.pseim.seim.PortDirection; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimFactory; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimPackage; |
||||||
|
|
||||||
|
import java.util.Collection; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.AdapterFactory; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
import org.eclipse.emf.ecore.EStructuralFeature; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
||||||
|
import org.eclipse.emf.edit.provider.ViewerNotification; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.pseim.PatternPort} object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class PatternPortItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, |
||||||
|
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { |
||||||
|
/** |
||||||
|
* This constructs an instance from a factory and a notifier. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public PatternPortItemProvider(AdapterFactory adapterFactory) { |
||||||
|
super(adapterFactory); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the property descriptors for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
||||||
|
if (itemPropertyDescriptors == null) { |
||||||
|
super.getPropertyDescriptors(object); |
||||||
|
|
||||||
|
addMultiplicityValuePropertyDescriptor(object); |
||||||
|
addCardinalityElementPropertyDescriptor(object); |
||||||
|
addIdentifiedAsPropertyDescriptor(object); |
||||||
|
addUidPropertyDescriptor(object); |
||||||
|
addNamePropertyDescriptor(object); |
||||||
|
addDirectionPropertyDescriptor(object); |
||||||
|
addDirPropertyDescriptor(object); |
||||||
|
} |
||||||
|
return itemPropertyDescriptors; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Multiplicity Value feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addMultiplicityValuePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors.add(createItemPropertyDescriptor( |
||||||
|
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), |
||||||
|
getString("_UI_MultiplicityElement_multiplicityValue_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_multiplicityValue_feature", |
||||||
|
"_UI_MultiplicityElement_type"), |
||||||
|
PseimPackage.Literals.MULTIPLICITY_ELEMENT__MULTIPLICITY_VALUE, true, false, false, |
||||||
|
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Cardinality Element feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addCardinalityElementPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors.add(createItemPropertyDescriptor( |
||||||
|
((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), |
||||||
|
getString("_UI_MultiplicityElement_cardinalityElement_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_cardinalityElement_feature", |
||||||
|
"_UI_MultiplicityElement_type"), |
||||||
|
PseimPackage.Literals.MULTIPLICITY_ELEMENT__CARDINALITY_ELEMENT, true, false, true, null, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Identified As feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addIdentifiedAsPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_identifiedAs_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_identifiedAs_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
PseimPackage.Literals.IDENTIFIED_ELEMENT__IDENTIFIED_AS, true, false, true, null, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Uid feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addUidPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_uid_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_uid_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
SeimPackage.Literals.IDENTIFIED_ELEMENT__UID, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Name feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addNamePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_NamedElement_name_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", |
||||||
|
"_UI_NamedElement_type"), |
||||||
|
SeimPackage.Literals.NAMED_ELEMENT__NAME, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Direction feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addDirectionPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Port_direction_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Port_direction_feature", "_UI_Port_type"), |
||||||
|
SeimPackage.Literals.PORT__DIRECTION, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Dir feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addDirPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_PatternPort_dir_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_PatternPort_dir_feature", |
||||||
|
"_UI_PatternPort_type"), |
||||||
|
PseimPackage.Literals.PATTERN_PORT__DIR, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an |
||||||
|
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or |
||||||
|
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { |
||||||
|
if (childrenFeatures == null) { |
||||||
|
super.getChildrenFeatures(object); |
||||||
|
childrenFeatures.add(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES); |
||||||
|
} |
||||||
|
return childrenFeatures; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected EStructuralFeature getChildFeature(Object object, Object child) { |
||||||
|
// Check the type of the specified child object and return the proper feature to use for
|
||||||
|
// adding (see {@link AddCommand}) it as a child.
|
||||||
|
|
||||||
|
return super.getChildFeature(object, child); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns PatternPort.gif. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated NOT |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object getImage(Object object) { |
||||||
|
PatternPort port = (PatternPort) object; |
||||||
|
if (port.getDirection() == PortDirection.IN) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/IPort")); |
||||||
|
} else if (port.getDirection() == PortDirection.OUT) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/OPort")); |
||||||
|
} else if (port.getDirection() == PortDirection.INOUT) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/IOPort")); |
||||||
|
} else if (port.getDirection() == PortDirection.UNSPECIFIED) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/UndefPort")); |
||||||
|
} |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternPort")); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the label text for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getText(Object object) { |
||||||
|
String label = ((PatternPort) object).getName(); |
||||||
|
return label == null || label.length() == 0 ? getString("_UI_PatternPort_type") |
||||||
|
: getString("_UI_PatternPort_type") + " " + label; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This handles model notifications by calling {@link #updateChildren} to update any cached |
||||||
|
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void notifyChanged(Notification notification) { |
||||||
|
updateChildren(notification); |
||||||
|
|
||||||
|
switch (notification.getFeatureID(PatternPort.class)) { |
||||||
|
case PseimPackage.PATTERN_PORT__MULTIPLICITY_VALUE: |
||||||
|
case PseimPackage.PATTERN_PORT__UID: |
||||||
|
case PseimPackage.PATTERN_PORT__NAME: |
||||||
|
case PseimPackage.PATTERN_PORT__DIRECTION: |
||||||
|
case PseimPackage.PATTERN_PORT__DIR: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
||||||
|
return; |
||||||
|
case PseimPackage.PATTERN_PORT__PROPERTIES: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); |
||||||
|
return; |
||||||
|
} |
||||||
|
super.notifyChanged(notification); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
||||||
|
* that can be created under this object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
||||||
|
super.collectNewChildDescriptors(newChildDescriptors, object); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createIntegerProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createStringProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createBooleanProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createReferenceProperty())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the resource locator for this item provider's resources. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getResourceLocator() { |
||||||
|
return PseimEditPlugin.INSTANCE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,99 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.pseim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.provider.SeimEditPlugin; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.EMFPlugin; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the central singleton for the Pseim edit plugin. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public final class PseimEditPlugin extends EMFPlugin { |
||||||
|
/** |
||||||
|
* Keep track of the singleton. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public static final PseimEditPlugin INSTANCE = new PseimEditPlugin(); |
||||||
|
|
||||||
|
/** |
||||||
|
* Keep track of the singleton. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
private static Implementation plugin; |
||||||
|
|
||||||
|
/** |
||||||
|
* Create the instance. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public PseimEditPlugin() { |
||||||
|
super(new ResourceLocator[] { SeimEditPlugin.INSTANCE, }); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the singleton instance of the Eclipse plugin. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @return the singleton instance. |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getPluginResourceLocator() { |
||||||
|
return plugin; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the singleton instance of the Eclipse plugin. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @return the singleton instance. |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public static Implementation getPlugin() { |
||||||
|
return plugin; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* The actual implementation of the Eclipse <b>Plugin</b>. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public static class Implementation extends EclipsePlugin { |
||||||
|
/** |
||||||
|
* Creates an instance. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public Implementation() { |
||||||
|
super(); |
||||||
|
|
||||||
|
// Remember the static instance.
|
||||||
|
//
|
||||||
|
plugin = this; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,336 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.pseim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.pseim.util.PseimAdapterFactory; |
||||||
|
|
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.Collection; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.Adapter; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
import org.eclipse.emf.common.notify.Notifier; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ChangeNotifier; |
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.ComposedAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IChangeNotifier; |
||||||
|
import org.eclipse.emf.edit.provider.IDisposable; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.INotifyChangedListener; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the factory that is used to provide the interfaces needed to support Viewers. |
||||||
|
* The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. |
||||||
|
* The adapters also support Eclipse property sheets. |
||||||
|
* Note that most of the adapters are shared among multiple instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class PseimItemProviderAdapterFactory extends PseimAdapterFactory |
||||||
|
implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { |
||||||
|
/** |
||||||
|
* This keeps track of the root adapter factory that delegates to this adapter factory. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected ComposedAdapterFactory parentAdapterFactory; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected IChangeNotifier changeNotifier = new ChangeNotifier(); |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected Collection<Object> supportedTypes = new ArrayList<Object>(); |
||||||
|
|
||||||
|
/** |
||||||
|
* This constructs an instance. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public PseimItemProviderAdapterFactory() { |
||||||
|
supportedTypes.add(IEditingDomainItemProvider.class); |
||||||
|
supportedTypes.add(IStructuredItemContentProvider.class); |
||||||
|
supportedTypes.add(ITreeItemContentProvider.class); |
||||||
|
supportedTypes.add(IItemLabelProvider.class); |
||||||
|
supportedTypes.add(IItemPropertySource.class); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.pseim.Library} instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected LibraryItemProvider libraryItemProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This creates an adapter for a {@link com.irtsaintexupery.pseim.pseim.Library}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter createLibraryAdapter() { |
||||||
|
if (libraryItemProvider == null) { |
||||||
|
libraryItemProvider = new LibraryItemProvider(this); |
||||||
|
} |
||||||
|
|
||||||
|
return libraryItemProvider; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.pseim.Pattern} instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected PatternItemProvider patternItemProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This creates an adapter for a {@link com.irtsaintexupery.pseim.pseim.Pattern}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter createPatternAdapter() { |
||||||
|
if (patternItemProvider == null) { |
||||||
|
patternItemProvider = new PatternItemProvider(this); |
||||||
|
} |
||||||
|
|
||||||
|
return patternItemProvider; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.pseim.CardinalityElement} instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected CardinalityElementItemProvider cardinalityElementItemProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This creates an adapter for a {@link com.irtsaintexupery.pseim.pseim.CardinalityElement}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter createCardinalityElementAdapter() { |
||||||
|
if (cardinalityElementItemProvider == null) { |
||||||
|
cardinalityElementItemProvider = new CardinalityElementItemProvider(this); |
||||||
|
} |
||||||
|
|
||||||
|
return cardinalityElementItemProvider; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.pseim.PatternComponent} instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected PatternComponentItemProvider patternComponentItemProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This creates an adapter for a {@link com.irtsaintexupery.pseim.pseim.PatternComponent}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter createPatternComponentAdapter() { |
||||||
|
if (patternComponentItemProvider == null) { |
||||||
|
patternComponentItemProvider = new PatternComponentItemProvider(this); |
||||||
|
} |
||||||
|
|
||||||
|
return patternComponentItemProvider; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.pseim.PatternPort} instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected PatternPortItemProvider patternPortItemProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This creates an adapter for a {@link com.irtsaintexupery.pseim.pseim.PatternPort}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter createPatternPortAdapter() { |
||||||
|
if (patternPortItemProvider == null) { |
||||||
|
patternPortItemProvider = new PatternPortItemProvider(this); |
||||||
|
} |
||||||
|
|
||||||
|
return patternPortItemProvider; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.pseim.PatternLink} instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected PatternLinkItemProvider patternLinkItemProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This creates an adapter for a {@link com.irtsaintexupery.pseim.pseim.PatternLink}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter createPatternLinkAdapter() { |
||||||
|
if (patternLinkItemProvider == null) { |
||||||
|
patternLinkItemProvider = new PatternLinkItemProvider(this); |
||||||
|
} |
||||||
|
|
||||||
|
return patternLinkItemProvider; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the root adapter factory that contains this factory. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public ComposeableAdapterFactory getRootAdapterFactory() { |
||||||
|
return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This sets the composed adapter factory that contains this factory. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { |
||||||
|
this.parentAdapterFactory = parentAdapterFactory; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public boolean isFactoryForType(Object type) { |
||||||
|
return supportedTypes.contains(type) || super.isFactoryForType(type); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This implementation substitutes the factory itself as the key for the adapter. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter adapt(Notifier notifier, Object type) { |
||||||
|
return super.adapt(notifier, this); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object adapt(Object object, Object type) { |
||||||
|
if (isFactoryForType(type)) { |
||||||
|
Object adapter = super.adapt(object, type); |
||||||
|
if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) { |
||||||
|
return adapter; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a listener. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public void addListener(INotifyChangedListener notifyChangedListener) { |
||||||
|
changeNotifier.addListener(notifyChangedListener); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This removes a listener. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public void removeListener(INotifyChangedListener notifyChangedListener) { |
||||||
|
changeNotifier.removeListener(notifyChangedListener); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public void fireNotifyChanged(Notification notification) { |
||||||
|
changeNotifier.fireNotifyChanged(notification); |
||||||
|
|
||||||
|
if (parentAdapterFactory != null) { |
||||||
|
parentAdapterFactory.fireNotifyChanged(notification); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This disposes all of the item providers created by this factory. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public void dispose() { |
||||||
|
if (libraryItemProvider != null) |
||||||
|
libraryItemProvider.dispose(); |
||||||
|
if (patternItemProvider != null) |
||||||
|
patternItemProvider.dispose(); |
||||||
|
if (cardinalityElementItemProvider != null) |
||||||
|
cardinalityElementItemProvider.dispose(); |
||||||
|
if (patternComponentItemProvider != null) |
||||||
|
patternComponentItemProvider.dispose(); |
||||||
|
if (patternPortItemProvider != null) |
||||||
|
patternPortItemProvider.dispose(); |
||||||
|
if (patternLinkItemProvider != null) |
||||||
|
patternLinkItemProvider.dispose(); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,202 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
* Pierre Virelizier (IRT Saint Exupéry) |
||||||
|
* Julien Baclet (IRT Saint Exupéry) |
||||||
|
* Pierre Gaufillet (IRT Saint Exupéry) |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.seim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.BooleanProperty; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimPackage; |
||||||
|
|
||||||
|
import java.util.Collection; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.AdapterFactory; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
||||||
|
import org.eclipse.emf.edit.provider.ViewerNotification; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.seim.BooleanProperty} object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class BooleanPropertyItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, |
||||||
|
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { |
||||||
|
/** |
||||||
|
* This constructs an instance from a factory and a notifier. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public BooleanPropertyItemProvider(AdapterFactory adapterFactory) { |
||||||
|
super(adapterFactory); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the property descriptors for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
||||||
|
if (itemPropertyDescriptors == null) { |
||||||
|
super.getPropertyDescriptors(object); |
||||||
|
|
||||||
|
addUidPropertyDescriptor(object); |
||||||
|
addKeyPropertyDescriptor(object); |
||||||
|
addValuePropertyDescriptor(object); |
||||||
|
} |
||||||
|
return itemPropertyDescriptors; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Uid feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addUidPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_uid_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_uid_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
SeimPackage.Literals.IDENTIFIED_ELEMENT__UID, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Key feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addKeyPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Property_key_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Property_key_feature", |
||||||
|
"_UI_Property_type"), |
||||||
|
SeimPackage.Literals.PROPERTY__KEY, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Value feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addValuePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_BooleanProperty_value_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_BooleanProperty_value_feature", |
||||||
|
"_UI_BooleanProperty_type"), |
||||||
|
SeimPackage.Literals.BOOLEAN_PROPERTY__VALUE, true, false, false, |
||||||
|
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns BooleanProperty.gif. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object getImage(Object object) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/BooleanProperty")); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected boolean shouldComposeCreationImage() { |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the label text for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getText(Object object) { |
||||||
|
String label = ((BooleanProperty) object).getUid(); |
||||||
|
return label == null || label.length() == 0 ? getString("_UI_BooleanProperty_type") |
||||||
|
: getString("_UI_BooleanProperty_type") + " " + label; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This handles model notifications by calling {@link #updateChildren} to update any cached |
||||||
|
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void notifyChanged(Notification notification) { |
||||||
|
updateChildren(notification); |
||||||
|
|
||||||
|
switch (notification.getFeatureID(BooleanProperty.class)) { |
||||||
|
case SeimPackage.BOOLEAN_PROPERTY__UID: |
||||||
|
case SeimPackage.BOOLEAN_PROPERTY__KEY: |
||||||
|
case SeimPackage.BOOLEAN_PROPERTY__VALUE: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
||||||
|
return; |
||||||
|
} |
||||||
|
super.notifyChanged(notification); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
||||||
|
* that can be created under this object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
||||||
|
super.collectNewChildDescriptors(newChildDescriptors, object); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the resource locator for this item provider's resources. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getResourceLocator() { |
||||||
|
return SeimEditPlugin.INSTANCE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,243 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
* Pierre Virelizier (IRT Saint Exupéry) |
||||||
|
* Julien Baclet (IRT Saint Exupéry) |
||||||
|
* Pierre Gaufillet (IRT Saint Exupéry) |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.seim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.Component; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimFactory; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimPackage; |
||||||
|
|
||||||
|
import java.util.Collection; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.AdapterFactory; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
import org.eclipse.emf.ecore.EStructuralFeature; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
||||||
|
import org.eclipse.emf.edit.provider.ViewerNotification; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.seim.Component} object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class ComponentItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, |
||||||
|
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { |
||||||
|
/** |
||||||
|
* This constructs an instance from a factory and a notifier. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public ComponentItemProvider(AdapterFactory adapterFactory) { |
||||||
|
super(adapterFactory); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the property descriptors for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
||||||
|
if (itemPropertyDescriptors == null) { |
||||||
|
super.getPropertyDescriptors(object); |
||||||
|
|
||||||
|
addUidPropertyDescriptor(object); |
||||||
|
addNamePropertyDescriptor(object); |
||||||
|
} |
||||||
|
return itemPropertyDescriptors; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Uid feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addUidPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_uid_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_uid_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
SeimPackage.Literals.IDENTIFIED_ELEMENT__UID, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Name feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addNamePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_NamedElement_name_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", |
||||||
|
"_UI_NamedElement_type"), |
||||||
|
SeimPackage.Literals.NAMED_ELEMENT__NAME, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an |
||||||
|
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or |
||||||
|
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { |
||||||
|
if (childrenFeatures == null) { |
||||||
|
super.getChildrenFeatures(object); |
||||||
|
childrenFeatures.add(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES); |
||||||
|
childrenFeatures.add(SeimPackage.Literals.COMPONENT__CONTENT); |
||||||
|
} |
||||||
|
return childrenFeatures; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected EStructuralFeature getChildFeature(Object object, Object child) { |
||||||
|
// Check the type of the specified child object and return the proper feature to use for
|
||||||
|
// adding (see {@link AddCommand}) it as a child.
|
||||||
|
|
||||||
|
return super.getChildFeature(object, child); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns Component.gif. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object getImage(Object object) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/Component")); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected boolean shouldComposeCreationImage() { |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the label text for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getText(Object object) { |
||||||
|
String label = ((Component) object).getName(); |
||||||
|
return label == null || label.length() == 0 ? getString("_UI_Component_type") |
||||||
|
: getString("_UI_Component_type") + " " + label; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This handles model notifications by calling {@link #updateChildren} to update any cached |
||||||
|
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void notifyChanged(Notification notification) { |
||||||
|
updateChildren(notification); |
||||||
|
|
||||||
|
switch (notification.getFeatureID(Component.class)) { |
||||||
|
case SeimPackage.COMPONENT__UID: |
||||||
|
case SeimPackage.COMPONENT__NAME: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
||||||
|
return; |
||||||
|
case SeimPackage.COMPONENT__PROPERTIES: |
||||||
|
case SeimPackage.COMPONENT__CONTENT: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); |
||||||
|
return; |
||||||
|
} |
||||||
|
super.notifyChanged(notification); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
||||||
|
* that can be created under this object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
||||||
|
super.collectNewChildDescriptors(newChildDescriptors, object); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createIntegerProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createStringProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createBooleanProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createReferenceProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add( |
||||||
|
createChildParameter(SeimPackage.Literals.COMPONENT__CONTENT, SeimFactory.eINSTANCE.createComponent())); |
||||||
|
|
||||||
|
newChildDescriptors |
||||||
|
.add(createChildParameter(SeimPackage.Literals.COMPONENT__CONTENT, SeimFactory.eINSTANCE.createPort())); |
||||||
|
|
||||||
|
newChildDescriptors |
||||||
|
.add(createChildParameter(SeimPackage.Literals.COMPONENT__CONTENT, SeimFactory.eINSTANCE.createLink())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the resource locator for this item provider's resources. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getResourceLocator() { |
||||||
|
return SeimEditPlugin.INSTANCE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,202 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
* Pierre Virelizier (IRT Saint Exupéry) |
||||||
|
* Julien Baclet (IRT Saint Exupéry) |
||||||
|
* Pierre Gaufillet (IRT Saint Exupéry) |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.seim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.IntegerProperty; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimPackage; |
||||||
|
|
||||||
|
import java.util.Collection; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.AdapterFactory; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
||||||
|
import org.eclipse.emf.edit.provider.ViewerNotification; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.seim.IntegerProperty} object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class IntegerPropertyItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, |
||||||
|
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { |
||||||
|
/** |
||||||
|
* This constructs an instance from a factory and a notifier. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public IntegerPropertyItemProvider(AdapterFactory adapterFactory) { |
||||||
|
super(adapterFactory); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the property descriptors for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
||||||
|
if (itemPropertyDescriptors == null) { |
||||||
|
super.getPropertyDescriptors(object); |
||||||
|
|
||||||
|
addUidPropertyDescriptor(object); |
||||||
|
addKeyPropertyDescriptor(object); |
||||||
|
addValuePropertyDescriptor(object); |
||||||
|
} |
||||||
|
return itemPropertyDescriptors; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Uid feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addUidPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_uid_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_uid_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
SeimPackage.Literals.IDENTIFIED_ELEMENT__UID, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Key feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addKeyPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Property_key_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Property_key_feature", |
||||||
|
"_UI_Property_type"), |
||||||
|
SeimPackage.Literals.PROPERTY__KEY, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Value feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addValuePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IntegerProperty_value_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IntegerProperty_value_feature", |
||||||
|
"_UI_IntegerProperty_type"), |
||||||
|
SeimPackage.Literals.INTEGER_PROPERTY__VALUE, true, false, false, |
||||||
|
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns IntegerProperty.gif. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object getImage(Object object) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/IntegerProperty")); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected boolean shouldComposeCreationImage() { |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the label text for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getText(Object object) { |
||||||
|
String label = ((IntegerProperty) object).getUid(); |
||||||
|
return label == null || label.length() == 0 ? getString("_UI_IntegerProperty_type") |
||||||
|
: getString("_UI_IntegerProperty_type") + " " + label; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This handles model notifications by calling {@link #updateChildren} to update any cached |
||||||
|
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void notifyChanged(Notification notification) { |
||||||
|
updateChildren(notification); |
||||||
|
|
||||||
|
switch (notification.getFeatureID(IntegerProperty.class)) { |
||||||
|
case SeimPackage.INTEGER_PROPERTY__UID: |
||||||
|
case SeimPackage.INTEGER_PROPERTY__KEY: |
||||||
|
case SeimPackage.INTEGER_PROPERTY__VALUE: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
||||||
|
return; |
||||||
|
} |
||||||
|
super.notifyChanged(notification); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
||||||
|
* that can be created under this object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
||||||
|
super.collectNewChildDescriptors(newChildDescriptors, object); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the resource locator for this item provider's resources. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getResourceLocator() { |
||||||
|
return SeimEditPlugin.INSTANCE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,262 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
* Pierre Virelizier (IRT Saint Exupéry) |
||||||
|
* Julien Baclet (IRT Saint Exupéry) |
||||||
|
* Pierre Gaufillet (IRT Saint Exupéry) |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.seim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.Link; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimFactory; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimPackage; |
||||||
|
|
||||||
|
import java.util.Collection; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.AdapterFactory; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
import org.eclipse.emf.ecore.EStructuralFeature; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
||||||
|
import org.eclipse.emf.edit.provider.ViewerNotification; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.seim.Link} object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class LinkItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, |
||||||
|
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { |
||||||
|
/** |
||||||
|
* This constructs an instance from a factory and a notifier. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public LinkItemProvider(AdapterFactory adapterFactory) { |
||||||
|
super(adapterFactory); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the property descriptors for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
||||||
|
if (itemPropertyDescriptors == null) { |
||||||
|
super.getPropertyDescriptors(object); |
||||||
|
|
||||||
|
addUidPropertyDescriptor(object); |
||||||
|
addNamePropertyDescriptor(object); |
||||||
|
addSrcPropertyDescriptor(object); |
||||||
|
addDstPropertyDescriptor(object); |
||||||
|
} |
||||||
|
return itemPropertyDescriptors; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Uid feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addUidPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_uid_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_uid_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
SeimPackage.Literals.IDENTIFIED_ELEMENT__UID, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Name feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addNamePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_NamedElement_name_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", |
||||||
|
"_UI_NamedElement_type"), |
||||||
|
SeimPackage.Literals.NAMED_ELEMENT__NAME, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Src feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addSrcPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Link_src_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Link_src_feature", "_UI_Link_type"), |
||||||
|
SeimPackage.Literals.LINK__SRC, true, false, true, null, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Dst feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addDstPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Link_dst_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Link_dst_feature", "_UI_Link_type"), |
||||||
|
SeimPackage.Literals.LINK__DST, true, false, true, null, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an |
||||||
|
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or |
||||||
|
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { |
||||||
|
if (childrenFeatures == null) { |
||||||
|
super.getChildrenFeatures(object); |
||||||
|
childrenFeatures.add(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES); |
||||||
|
} |
||||||
|
return childrenFeatures; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected EStructuralFeature getChildFeature(Object object, Object child) { |
||||||
|
// Check the type of the specified child object and return the proper feature to use for
|
||||||
|
// adding (see {@link AddCommand}) it as a child.
|
||||||
|
|
||||||
|
return super.getChildFeature(object, child); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns Link.gif. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object getImage(Object object) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/Link")); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected boolean shouldComposeCreationImage() { |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the label text for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getText(Object object) { |
||||||
|
String label = ((Link) object).getName(); |
||||||
|
return label == null || label.length() == 0 ? getString("_UI_Link_type") |
||||||
|
: getString("_UI_Link_type") + " " + label; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This handles model notifications by calling {@link #updateChildren} to update any cached |
||||||
|
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void notifyChanged(Notification notification) { |
||||||
|
updateChildren(notification); |
||||||
|
|
||||||
|
switch (notification.getFeatureID(Link.class)) { |
||||||
|
case SeimPackage.LINK__UID: |
||||||
|
case SeimPackage.LINK__NAME: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
||||||
|
return; |
||||||
|
case SeimPackage.LINK__PROPERTIES: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); |
||||||
|
return; |
||||||
|
} |
||||||
|
super.notifyChanged(notification); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
||||||
|
* that can be created under this object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
||||||
|
super.collectNewChildDescriptors(newChildDescriptors, object); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createIntegerProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createStringProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createBooleanProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createReferenceProperty())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the resource locator for this item provider's resources. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getResourceLocator() { |
||||||
|
return SeimEditPlugin.INSTANCE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,240 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
* Pierre Virelizier (IRT Saint Exupéry) |
||||||
|
* Julien Baclet (IRT Saint Exupéry) |
||||||
|
* Pierre Gaufillet (IRT Saint Exupéry) |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.seim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.Model; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimFactory; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimPackage; |
||||||
|
|
||||||
|
import java.util.Collection; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.AdapterFactory; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
import org.eclipse.emf.ecore.EStructuralFeature; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
||||||
|
import org.eclipse.emf.edit.provider.ViewerNotification; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.seim.Model} object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class ModelItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, |
||||||
|
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { |
||||||
|
/** |
||||||
|
* This constructs an instance from a factory and a notifier. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public ModelItemProvider(AdapterFactory adapterFactory) { |
||||||
|
super(adapterFactory); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the property descriptors for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
||||||
|
if (itemPropertyDescriptors == null) { |
||||||
|
super.getPropertyDescriptors(object); |
||||||
|
|
||||||
|
addUidPropertyDescriptor(object); |
||||||
|
addNamePropertyDescriptor(object); |
||||||
|
} |
||||||
|
return itemPropertyDescriptors; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Uid feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addUidPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_uid_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_uid_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
SeimPackage.Literals.IDENTIFIED_ELEMENT__UID, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Name feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addNamePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_NamedElement_name_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", |
||||||
|
"_UI_NamedElement_type"), |
||||||
|
SeimPackage.Literals.NAMED_ELEMENT__NAME, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an |
||||||
|
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or |
||||||
|
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { |
||||||
|
if (childrenFeatures == null) { |
||||||
|
super.getChildrenFeatures(object); |
||||||
|
childrenFeatures.add(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES); |
||||||
|
childrenFeatures.add(SeimPackage.Literals.MODEL__MODEL_ELEMENTS); |
||||||
|
} |
||||||
|
return childrenFeatures; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected EStructuralFeature getChildFeature(Object object, Object child) { |
||||||
|
// Check the type of the specified child object and return the proper feature to use for
|
||||||
|
// adding (see {@link AddCommand}) it as a child.
|
||||||
|
|
||||||
|
return super.getChildFeature(object, child); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns Model.gif. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object getImage(Object object) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/Model")); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected boolean shouldComposeCreationImage() { |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the label text for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getText(Object object) { |
||||||
|
String label = ((Model) object).getName(); |
||||||
|
return label == null || label.length() == 0 ? getString("_UI_Model_type") |
||||||
|
: getString("_UI_Model_type") + " " + label; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This handles model notifications by calling {@link #updateChildren} to update any cached |
||||||
|
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void notifyChanged(Notification notification) { |
||||||
|
updateChildren(notification); |
||||||
|
|
||||||
|
switch (notification.getFeatureID(Model.class)) { |
||||||
|
case SeimPackage.MODEL__UID: |
||||||
|
case SeimPackage.MODEL__NAME: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
||||||
|
return; |
||||||
|
case SeimPackage.MODEL__PROPERTIES: |
||||||
|
case SeimPackage.MODEL__MODEL_ELEMENTS: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); |
||||||
|
return; |
||||||
|
} |
||||||
|
super.notifyChanged(notification); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
||||||
|
* that can be created under this object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
||||||
|
super.collectNewChildDescriptors(newChildDescriptors, object); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createIntegerProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createStringProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createBooleanProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createReferenceProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.MODEL__MODEL_ELEMENTS, |
||||||
|
SeimFactory.eINSTANCE.createComponent())); |
||||||
|
|
||||||
|
newChildDescriptors.add( |
||||||
|
createChildParameter(SeimPackage.Literals.MODEL__MODEL_ELEMENTS, SeimFactory.eINSTANCE.createLink())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the resource locator for this item provider's resources. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getResourceLocator() { |
||||||
|
return SeimEditPlugin.INSTANCE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,260 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
* Pierre Virelizier (IRT Saint Exupéry) |
||||||
|
* Julien Baclet (IRT Saint Exupéry) |
||||||
|
* Pierre Gaufillet (IRT Saint Exupéry) |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.seim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.Port; |
||||||
|
import com.irtsaintexupery.pseim.seim.PortDirection; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimFactory; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimPackage; |
||||||
|
|
||||||
|
import java.util.Collection; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.AdapterFactory; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
import org.eclipse.emf.ecore.EStructuralFeature; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
||||||
|
import org.eclipse.emf.edit.provider.ViewerNotification; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.seim.Port} object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class PortItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, |
||||||
|
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { |
||||||
|
/** |
||||||
|
* This constructs an instance from a factory and a notifier. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public PortItemProvider(AdapterFactory adapterFactory) { |
||||||
|
super(adapterFactory); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the property descriptors for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
||||||
|
if (itemPropertyDescriptors == null) { |
||||||
|
super.getPropertyDescriptors(object); |
||||||
|
|
||||||
|
addUidPropertyDescriptor(object); |
||||||
|
addNamePropertyDescriptor(object); |
||||||
|
addDirectionPropertyDescriptor(object); |
||||||
|
} |
||||||
|
return itemPropertyDescriptors; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Uid feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addUidPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_uid_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_uid_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
SeimPackage.Literals.IDENTIFIED_ELEMENT__UID, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Name feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addNamePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_NamedElement_name_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", |
||||||
|
"_UI_NamedElement_type"), |
||||||
|
SeimPackage.Literals.NAMED_ELEMENT__NAME, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Direction feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addDirectionPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Port_direction_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Port_direction_feature", "_UI_Port_type"), |
||||||
|
SeimPackage.Literals.PORT__DIRECTION, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an |
||||||
|
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or |
||||||
|
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { |
||||||
|
if (childrenFeatures == null) { |
||||||
|
super.getChildrenFeatures(object); |
||||||
|
childrenFeatures.add(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES); |
||||||
|
} |
||||||
|
return childrenFeatures; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected EStructuralFeature getChildFeature(Object object, Object child) { |
||||||
|
// Check the type of the specified child object and return the proper feature to use for
|
||||||
|
// adding (see {@link AddCommand}) it as a child.
|
||||||
|
|
||||||
|
return super.getChildFeature(object, child); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns Port.gif. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated NOT |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object getImage(Object object) { |
||||||
|
Port port = (Port) object; |
||||||
|
if (port.getDirection() == PortDirection.IN) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/IPort")); |
||||||
|
} else if (port.getDirection() == PortDirection.OUT) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/OPort")); |
||||||
|
} else if (port.getDirection() == PortDirection.INOUT) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/IOPort")); |
||||||
|
} else if (port.getDirection() == PortDirection.UNSPECIFIED) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/UndefPort")); |
||||||
|
} |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/Port")); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected boolean shouldComposeCreationImage() { |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the label text for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getText(Object object) { |
||||||
|
String label = ((Port) object).getName(); |
||||||
|
return label == null || label.length() == 0 ? getString("_UI_Port_type") |
||||||
|
: getString("_UI_Port_type") + " " + label; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This handles model notifications by calling {@link #updateChildren} to update any cached |
||||||
|
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void notifyChanged(Notification notification) { |
||||||
|
updateChildren(notification); |
||||||
|
|
||||||
|
switch (notification.getFeatureID(Port.class)) { |
||||||
|
case SeimPackage.PORT__UID: |
||||||
|
case SeimPackage.PORT__NAME: |
||||||
|
case SeimPackage.PORT__DIRECTION: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
||||||
|
return; |
||||||
|
case SeimPackage.PORT__PROPERTIES: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); |
||||||
|
return; |
||||||
|
} |
||||||
|
super.notifyChanged(notification); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
||||||
|
* that can be created under this object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
||||||
|
super.collectNewChildDescriptors(newChildDescriptors, object); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createIntegerProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createStringProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createBooleanProperty())); |
||||||
|
|
||||||
|
newChildDescriptors.add(createChildParameter(SeimPackage.Literals.PROPERTY_HOLDER__PROPERTIES, |
||||||
|
SeimFactory.eINSTANCE.createReferenceProperty())); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the resource locator for this item provider's resources. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getResourceLocator() { |
||||||
|
return SeimEditPlugin.INSTANCE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,200 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
* Pierre Virelizier (IRT Saint Exupéry) |
||||||
|
* Julien Baclet (IRT Saint Exupéry) |
||||||
|
* Pierre Gaufillet (IRT Saint Exupéry) |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.seim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.ReferenceProperty; |
||||||
|
import com.irtsaintexupery.pseim.seim.SeimPackage; |
||||||
|
|
||||||
|
import java.util.Collection; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.AdapterFactory; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
||||||
|
import org.eclipse.emf.edit.provider.ViewerNotification; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.seim.ReferenceProperty} object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class ReferencePropertyItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, |
||||||
|
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { |
||||||
|
/** |
||||||
|
* This constructs an instance from a factory and a notifier. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public ReferencePropertyItemProvider(AdapterFactory adapterFactory) { |
||||||
|
super(adapterFactory); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the property descriptors for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
||||||
|
if (itemPropertyDescriptors == null) { |
||||||
|
super.getPropertyDescriptors(object); |
||||||
|
|
||||||
|
addUidPropertyDescriptor(object); |
||||||
|
addKeyPropertyDescriptor(object); |
||||||
|
addRefPropertyDescriptor(object); |
||||||
|
} |
||||||
|
return itemPropertyDescriptors; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Uid feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addUidPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_uid_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_uid_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
SeimPackage.Literals.IDENTIFIED_ELEMENT__UID, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Key feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addKeyPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Property_key_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Property_key_feature", |
||||||
|
"_UI_Property_type"), |
||||||
|
SeimPackage.Literals.PROPERTY__KEY, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Ref feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addRefPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_ReferenceProperty_ref_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_ReferenceProperty_ref_feature", |
||||||
|
"_UI_ReferenceProperty_type"), |
||||||
|
SeimPackage.Literals.REFERENCE_PROPERTY__REF, true, false, true, null, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns ReferenceProperty.gif. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object getImage(Object object) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/ReferenceProperty")); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected boolean shouldComposeCreationImage() { |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the label text for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getText(Object object) { |
||||||
|
String label = ((ReferenceProperty) object).getUid(); |
||||||
|
return label == null || label.length() == 0 ? getString("_UI_ReferenceProperty_type") |
||||||
|
: getString("_UI_ReferenceProperty_type") + " " + label; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This handles model notifications by calling {@link #updateChildren} to update any cached |
||||||
|
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void notifyChanged(Notification notification) { |
||||||
|
updateChildren(notification); |
||||||
|
|
||||||
|
switch (notification.getFeatureID(ReferenceProperty.class)) { |
||||||
|
case SeimPackage.REFERENCE_PROPERTY__UID: |
||||||
|
case SeimPackage.REFERENCE_PROPERTY__KEY: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
||||||
|
return; |
||||||
|
} |
||||||
|
super.notifyChanged(notification); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
||||||
|
* that can be created under this object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
||||||
|
super.collectNewChildDescriptors(newChildDescriptors, object); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the resource locator for this item provider's resources. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getResourceLocator() { |
||||||
|
return SeimEditPlugin.INSTANCE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,100 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
* Pierre Virelizier (IRT Saint Exupéry) |
||||||
|
* Julien Baclet (IRT Saint Exupéry) |
||||||
|
* Pierre Gaufillet (IRT Saint Exupéry) |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.seim.provider; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.EMFPlugin; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the central singleton for the Seim edit plugin. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public final class SeimEditPlugin extends EMFPlugin { |
||||||
|
/** |
||||||
|
* Keep track of the singleton. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public static final SeimEditPlugin INSTANCE = new SeimEditPlugin(); |
||||||
|
|
||||||
|
/** |
||||||
|
* Keep track of the singleton. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
private static Implementation plugin; |
||||||
|
|
||||||
|
/** |
||||||
|
* Create the instance. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public SeimEditPlugin() { |
||||||
|
super(new ResourceLocator[] {}); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the singleton instance of the Eclipse plugin. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @return the singleton instance. |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getPluginResourceLocator() { |
||||||
|
return plugin; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the singleton instance of the Eclipse plugin. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @return the singleton instance. |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public static Implementation getPlugin() { |
||||||
|
return plugin; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* The actual implementation of the Eclipse <b>Plugin</b>. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public static class Implementation extends EclipsePlugin { |
||||||
|
/** |
||||||
|
* Creates an instance. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public Implementation() { |
||||||
|
super(); |
||||||
|
|
||||||
|
// Remember the static instance.
|
||||||
|
//
|
||||||
|
plugin = this; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,389 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
* Pierre Virelizier (IRT Saint Exupéry) |
||||||
|
* Julien Baclet (IRT Saint Exupéry) |
||||||
|
* Pierre Gaufillet (IRT Saint Exupéry) |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.seim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.util.SeimAdapterFactory; |
||||||
|
|
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.Collection; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.Adapter; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
import org.eclipse.emf.common.notify.Notifier; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ChangeNotifier; |
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.ComposedAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IChangeNotifier; |
||||||
|
import org.eclipse.emf.edit.provider.IDisposable; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.INotifyChangedListener; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the factory that is used to provide the interfaces needed to support Viewers. |
||||||
|
* The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. |
||||||
|
* The adapters also support Eclipse property sheets. |
||||||
|
* Note that most of the adapters are shared among multiple instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class SeimItemProviderAdapterFactory extends SeimAdapterFactory |
||||||
|
implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { |
||||||
|
/** |
||||||
|
* This keeps track of the root adapter factory that delegates to this adapter factory. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected ComposedAdapterFactory parentAdapterFactory; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected IChangeNotifier changeNotifier = new ChangeNotifier(); |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected Collection<Object> supportedTypes = new ArrayList<Object>(); |
||||||
|
|
||||||
|
/** |
||||||
|
* This constructs an instance. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public SeimItemProviderAdapterFactory() { |
||||||
|
supportedTypes.add(IEditingDomainItemProvider.class); |
||||||
|
supportedTypes.add(IStructuredItemContentProvider.class); |
||||||
|
supportedTypes.add(ITreeItemContentProvider.class); |
||||||
|
supportedTypes.add(IItemLabelProvider.class); |
||||||
|
supportedTypes.add(IItemPropertySource.class); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.seim.Component} instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected ComponentItemProvider componentItemProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This creates an adapter for a {@link com.irtsaintexupery.pseim.seim.Component}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter createComponentAdapter() { |
||||||
|
if (componentItemProvider == null) { |
||||||
|
componentItemProvider = new ComponentItemProvider(this); |
||||||
|
} |
||||||
|
|
||||||
|
return componentItemProvider; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.seim.Port} instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected PortItemProvider portItemProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This creates an adapter for a {@link com.irtsaintexupery.pseim.seim.Port}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter createPortAdapter() { |
||||||
|
if (portItemProvider == null) { |
||||||
|
portItemProvider = new PortItemProvider(this); |
||||||
|
} |
||||||
|
|
||||||
|
return portItemProvider; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.seim.Link} instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected LinkItemProvider linkItemProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This creates an adapter for a {@link com.irtsaintexupery.pseim.seim.Link}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter createLinkAdapter() { |
||||||
|
if (linkItemProvider == null) { |
||||||
|
linkItemProvider = new LinkItemProvider(this); |
||||||
|
} |
||||||
|
|
||||||
|
return linkItemProvider; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.seim.IntegerProperty} instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected IntegerPropertyItemProvider integerPropertyItemProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This creates an adapter for a {@link com.irtsaintexupery.pseim.seim.IntegerProperty}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter createIntegerPropertyAdapter() { |
||||||
|
if (integerPropertyItemProvider == null) { |
||||||
|
integerPropertyItemProvider = new IntegerPropertyItemProvider(this); |
||||||
|
} |
||||||
|
|
||||||
|
return integerPropertyItemProvider; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.seim.StringProperty} instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected StringPropertyItemProvider stringPropertyItemProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This creates an adapter for a {@link com.irtsaintexupery.pseim.seim.StringProperty}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter createStringPropertyAdapter() { |
||||||
|
if (stringPropertyItemProvider == null) { |
||||||
|
stringPropertyItemProvider = new StringPropertyItemProvider(this); |
||||||
|
} |
||||||
|
|
||||||
|
return stringPropertyItemProvider; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.seim.BooleanProperty} instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected BooleanPropertyItemProvider booleanPropertyItemProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This creates an adapter for a {@link com.irtsaintexupery.pseim.seim.BooleanProperty}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter createBooleanPropertyAdapter() { |
||||||
|
if (booleanPropertyItemProvider == null) { |
||||||
|
booleanPropertyItemProvider = new BooleanPropertyItemProvider(this); |
||||||
|
} |
||||||
|
|
||||||
|
return booleanPropertyItemProvider; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.seim.ReferenceProperty} instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected ReferencePropertyItemProvider referencePropertyItemProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This creates an adapter for a {@link com.irtsaintexupery.pseim.seim.ReferenceProperty}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter createReferencePropertyAdapter() { |
||||||
|
if (referencePropertyItemProvider == null) { |
||||||
|
referencePropertyItemProvider = new ReferencePropertyItemProvider(this); |
||||||
|
} |
||||||
|
|
||||||
|
return referencePropertyItemProvider; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.seim.Model} instances. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected ModelItemProvider modelItemProvider; |
||||||
|
|
||||||
|
/** |
||||||
|
* This creates an adapter for a {@link com.irtsaintexupery.pseim.seim.Model}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter createModelAdapter() { |
||||||
|
if (modelItemProvider == null) { |
||||||
|
modelItemProvider = new ModelItemProvider(this); |
||||||
|
} |
||||||
|
|
||||||
|
return modelItemProvider; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the root adapter factory that contains this factory. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public ComposeableAdapterFactory getRootAdapterFactory() { |
||||||
|
return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This sets the composed adapter factory that contains this factory. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { |
||||||
|
this.parentAdapterFactory = parentAdapterFactory; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public boolean isFactoryForType(Object type) { |
||||||
|
return supportedTypes.contains(type) || super.isFactoryForType(type); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This implementation substitutes the factory itself as the key for the adapter. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Adapter adapt(Notifier notifier, Object type) { |
||||||
|
return super.adapt(notifier, this); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object adapt(Object object, Object type) { |
||||||
|
if (isFactoryForType(type)) { |
||||||
|
Object adapter = super.adapt(object, type); |
||||||
|
if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) { |
||||||
|
return adapter; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a listener. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public void addListener(INotifyChangedListener notifyChangedListener) { |
||||||
|
changeNotifier.addListener(notifyChangedListener); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This removes a listener. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public void removeListener(INotifyChangedListener notifyChangedListener) { |
||||||
|
changeNotifier.removeListener(notifyChangedListener); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public void fireNotifyChanged(Notification notification) { |
||||||
|
changeNotifier.fireNotifyChanged(notification); |
||||||
|
|
||||||
|
if (parentAdapterFactory != null) { |
||||||
|
parentAdapterFactory.fireNotifyChanged(notification); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This disposes all of the item providers created by this factory. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public void dispose() { |
||||||
|
if (componentItemProvider != null) |
||||||
|
componentItemProvider.dispose(); |
||||||
|
if (portItemProvider != null) |
||||||
|
portItemProvider.dispose(); |
||||||
|
if (linkItemProvider != null) |
||||||
|
linkItemProvider.dispose(); |
||||||
|
if (integerPropertyItemProvider != null) |
||||||
|
integerPropertyItemProvider.dispose(); |
||||||
|
if (stringPropertyItemProvider != null) |
||||||
|
stringPropertyItemProvider.dispose(); |
||||||
|
if (booleanPropertyItemProvider != null) |
||||||
|
booleanPropertyItemProvider.dispose(); |
||||||
|
if (referencePropertyItemProvider != null) |
||||||
|
referencePropertyItemProvider.dispose(); |
||||||
|
if (modelItemProvider != null) |
||||||
|
modelItemProvider.dispose(); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,202 @@ |
|||||||
|
/******************************************************************************* |
||||||
|
* Copyright (c) 2018 IRT AESE (IRT Saint Exupéry). |
||||||
|
* All rights reserved. This program and the accompanying materials |
||||||
|
* are made available under the terms of the Eclipse Public License v2.0 |
||||||
|
* which accompanies this distribution, and is available at |
||||||
|
* https://www.eclipse.org/legal/epl-2.0
|
||||||
|
* |
||||||
|
* Contributors: |
||||||
|
* Arnaud Dieumegard (IRT Saint Exupéry) - initial API and implementation |
||||||
|
* Pierre Virelizier (IRT Saint Exupéry) |
||||||
|
* Julien Baclet (IRT Saint Exupéry) |
||||||
|
* Pierre Gaufillet (IRT Saint Exupéry) |
||||||
|
*******************************************************************************/ |
||||||
|
/** |
||||||
|
*/ |
||||||
|
package com.irtsaintexupery.pseim.seim.provider; |
||||||
|
|
||||||
|
import com.irtsaintexupery.pseim.seim.SeimPackage; |
||||||
|
import com.irtsaintexupery.pseim.seim.StringProperty; |
||||||
|
|
||||||
|
import java.util.Collection; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.notify.AdapterFactory; |
||||||
|
import org.eclipse.emf.common.notify.Notification; |
||||||
|
|
||||||
|
import org.eclipse.emf.common.util.ResourceLocator; |
||||||
|
|
||||||
|
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; |
||||||
|
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemLabelProvider; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.IItemPropertySource; |
||||||
|
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; |
||||||
|
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; |
||||||
|
import org.eclipse.emf.edit.provider.ItemProviderAdapter; |
||||||
|
import org.eclipse.emf.edit.provider.ViewerNotification; |
||||||
|
|
||||||
|
/** |
||||||
|
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.seim.StringProperty} object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public class StringPropertyItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, |
||||||
|
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { |
||||||
|
/** |
||||||
|
* This constructs an instance from a factory and a notifier. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
public StringPropertyItemProvider(AdapterFactory adapterFactory) { |
||||||
|
super(adapterFactory); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the property descriptors for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
||||||
|
if (itemPropertyDescriptors == null) { |
||||||
|
super.getPropertyDescriptors(object); |
||||||
|
|
||||||
|
addUidPropertyDescriptor(object); |
||||||
|
addKeyPropertyDescriptor(object); |
||||||
|
addValuePropertyDescriptor(object); |
||||||
|
} |
||||||
|
return itemPropertyDescriptors; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Uid feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addUidPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_IdentifiedElement_uid_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_IdentifiedElement_uid_feature", |
||||||
|
"_UI_IdentifiedElement_type"), |
||||||
|
SeimPackage.Literals.IDENTIFIED_ELEMENT__UID, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Key feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addKeyPropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_Property_key_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_Property_key_feature", |
||||||
|
"_UI_Property_type"), |
||||||
|
SeimPackage.Literals.PROPERTY__KEY, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds a property descriptor for the Value feature. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
protected void addValuePropertyDescriptor(Object object) { |
||||||
|
itemPropertyDescriptors |
||||||
|
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), |
||||||
|
getResourceLocator(), getString("_UI_StringProperty_value_feature"), |
||||||
|
getString("_UI_PropertyDescriptor_description", "_UI_StringProperty_value_feature", |
||||||
|
"_UI_StringProperty_type"), |
||||||
|
SeimPackage.Literals.STRING_PROPERTY__VALUE, true, false, false, |
||||||
|
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns StringProperty.gif. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public Object getImage(Object object) { |
||||||
|
return overlayImage(object, getResourceLocator().getImage("full/obj16/StringProperty")); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected boolean shouldComposeCreationImage() { |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This returns the label text for the adapted class. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public String getText(Object object) { |
||||||
|
String label = ((StringProperty) object).getUid(); |
||||||
|
return label == null || label.length() == 0 ? getString("_UI_StringProperty_type") |
||||||
|
: getString("_UI_StringProperty_type") + " " + label; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This handles model notifications by calling {@link #updateChildren} to update any cached |
||||||
|
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public void notifyChanged(Notification notification) { |
||||||
|
updateChildren(notification); |
||||||
|
|
||||||
|
switch (notification.getFeatureID(StringProperty.class)) { |
||||||
|
case SeimPackage.STRING_PROPERTY__UID: |
||||||
|
case SeimPackage.STRING_PROPERTY__KEY: |
||||||
|
case SeimPackage.STRING_PROPERTY__VALUE: |
||||||
|
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); |
||||||
|
return; |
||||||
|
} |
||||||
|
super.notifyChanged(notification); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children |
||||||
|
* that can be created under this object. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { |
||||||
|
super.collectNewChildDescriptors(newChildDescriptors, object); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Return the resource locator for this item provider's resources. |
||||||
|
* <!-- begin-user-doc --> |
||||||
|
* <!-- end-user-doc --> |
||||||
|
* @generated |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public ResourceLocator getResourceLocator() { |
||||||
|
return SeimEditPlugin.INSTANCE; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<classpath> |
||||||
|
<classpathentry kind="src" path="src-gen"/> |
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> |
||||||
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> |
||||||
|
<classpathentry kind="output" path="bin"/> |
||||||
|
</classpath> |
@ -0,0 +1,28 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<projectDescription> |
||||||
|
<name>com.irtsaintexupery.pseim.editor</name> |
||||||
|
<comment></comment> |
||||||
|
<projects> |
||||||
|
</projects> |
||||||
|
<buildSpec> |
||||||
|
<buildCommand> |
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name> |
||||||
|
<arguments> |
||||||
|
</arguments> |
||||||
|
</buildCommand> |
||||||
|
<buildCommand> |
||||||
|
<name>org.eclipse.pde.ManifestBuilder</name> |
||||||
|
<arguments> |
||||||
|
</arguments> |
||||||
|
</buildCommand> |
||||||
|
<buildCommand> |
||||||
|
<name>org.eclipse.pde.SchemaBuilder</name> |
||||||
|
<arguments> |
||||||
|
</arguments> |
||||||
|
</buildCommand> |
||||||
|
</buildSpec> |
||||||
|
<natures> |
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature> |
||||||
|
<nature>org.eclipse.pde.PluginNature</nature> |
||||||
|
</natures> |
||||||
|
</projectDescription> |
@ -0,0 +1,19 @@ |
|||||||
|
Manifest-Version: 1.0 |
||||||
|
Bundle-ManifestVersion: 2 |
||||||
|
Bundle-Name: %pluginName |
||||||
|
Bundle-SymbolicName: com.irtsaintexupery.pseim.editor;singleton:=true |
||||||
|
Bundle-Version: 1.0.0.qualifier |
||||||
|
Bundle-ClassPath: . |
||||||
|
Bundle-Activator: com.irtsaintexupery.pseim.pseim.presentation.PseimEditorPlugin$Implementation |
||||||
|
Bundle-Vendor: %providerName |
||||||
|
Bundle-Localization: plugin |
||||||
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 |
||||||
|
Export-Package: com.irtsaintexupery.pseim.seim.presentation, |
||||||
|
com.irtsaintexupery.pseim.pseim.presentation |
||||||
|
Require-Bundle: org.eclipse.core.runtime, |
||||||
|
org.eclipse.core.resources;visibility:=reexport, |
||||||
|
com.irtsaintexupery.pseim.edit;visibility:=reexport, |
||||||
|
org.eclipse.emf.ecore.xmi;visibility:=reexport, |
||||||
|
org.eclipse.emf.edit.ui;visibility:=reexport, |
||||||
|
org.eclipse.ui.ide;visibility:=reexport |
||||||
|
Bundle-ActivationPolicy: lazy |
@ -0,0 +1,10 @@ |
|||||||
|
# |
||||||
|
|
||||||
|
bin.includes = .,\ |
||||||
|
icons/,\ |
||||||
|
META-INF/,\ |
||||||
|
plugin.xml,\ |
||||||
|
plugin.properties |
||||||
|
jars.compile.order = . |
||||||
|
source.. = src-gen/ |
||||||
|
output.. = bin |
After Width: | Height: | Size: 346 B |
After Width: | Height: | Size: 346 B |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.4 KiB |