From 566f4760058a673210e14edb2ba3253ebd88e915 Mon Sep 17 00:00:00 2001 From: alsazonova Date: Wed, 7 Oct 2020 17:20:38 -0400 Subject: [PATCH 1/3] Add icon for flow implementation. Display proper icon based on selected specification implementation: display flow path, sink or source --- .../icons/full/obj16/FlowImplementation.gif | Bin 129 -> 70 bytes .../icons/full/obj16/FlowSink.gif | Bin 872 -> 73 bytes .../FlowImplementationItemProvider.java | 20 +++++++++++++++- .../FlowSpecificationItemProvider.java | 22 ++++++++++++++++-- 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/core/org.osate.aadl2.edit/icons/full/obj16/FlowImplementation.gif b/core/org.osate.aadl2.edit/icons/full/obj16/FlowImplementation.gif index badaab0664ae45de5d990f64638197daeabf31bf..46f86b0fdcb3b0ae2b16f6d26f2a42f4d4f2d692 100644 GIT binary patch literal 70 zcmZ?wbh9u|6krfwn8*MET#O9=|NjRv6o0aCGB7YR=zv5)@(fJkbNW}F=2$CNGC52+ TpLtL7gVI|b)1Fm|GFSru49^ly literal 129 zcmZ?wbhEHb6krfw*vtS14M4Jip`qcxfddT<4GjN*-2XuK|Nmgt|Nmcq|33QW&HVfK zD=%GA{K>+|z`)6%1JVgHgMmfQ;H2m3y%w*(d{g0nSm?Ull=W6hg4cqDUv2b0PE)&T WR^GExlV5i^W2f7Zi9*7R4Auasq%#Zv diff --git a/core/org.osate.aadl2.edit/icons/full/obj16/FlowSink.gif b/core/org.osate.aadl2.edit/icons/full/obj16/FlowSink.gif index 3cce98144683ca8bf471986f88c6b4dfb25109c0..2e9860681b6d514a917a66df09138d17c1f8671a 100644 GIT binary patch literal 73 zcmZ?wbh9u|6krfwn8*ME|Ns97(+r9~Sva{Em>6_GT#!5ilhl;{m8akG$#wN#V#~QV UXZGoo`6-^yI+wi)VqmZa0BZvk82|tP literal 872 zcmW+!v5FW(6r2N#Gd3YM77=o-D~L>^*oZ>nK?Do8H)0;zO2Bp@U_`%Qz{0|6tKc7` zun?wwKj2S@jpN>JvFtL-&b*mcxriLQc))`m z@;&_X`u)#d{`Ttm<(uz(dHL1Vs~_LE`sDHD$6x>X%Ukc?`Squle?NS2 S@9m%OU;pv@U(YWt@X`PN>XgF( diff --git a/core/org.osate.aadl2.edit/src/org/osate/aadl2/provider/FlowImplementationItemProvider.java b/core/org.osate.aadl2.edit/src/org/osate/aadl2/provider/FlowImplementationItemProvider.java index 16e839c170a..a6eb063af32 100644 --- a/core/org.osate.aadl2.edit/src/org/osate/aadl2/provider/FlowImplementationItemProvider.java +++ b/core/org.osate.aadl2.edit/src/org/osate/aadl2/provider/FlowImplementationItemProvider.java @@ -36,6 +36,7 @@ import org.osate.aadl2.Aadl2Factory; import org.osate.aadl2.Aadl2Package; import org.osate.aadl2.FlowImplementation; +import org.osate.aadl2.impl.FlowImplementationImpl; /** * This is the item provider adapter for a {@link org.osate.aadl2.FlowImplementation} object. @@ -60,6 +61,7 @@ public FlowImplementationItemProvider(AdapterFactory adapterFactory) { * * @generated */ + @Override public List getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); @@ -110,6 +112,7 @@ protected void addSpecificationPropertyDescriptor(Object object) { * * @generated */ + @Override public Collection getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); @@ -125,6 +128,7 @@ public Collection getChildrenFeatures(Object objec * * @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. @@ -136,9 +140,19 @@ protected EStructuralFeature getChildFeature(Object object, Object child) { * This returns FlowImplementation.gif. * * - * @generated + * @generated NOT */ + @Override public Object getImage(Object object) { + if (((FlowImplementationImpl) object).getInEnd() == null + && ((FlowImplementationImpl) object).getOutEnd() == null) { + return null; + } else if (((FlowImplementationImpl) object).getInEnd() == null) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/FlowSource")); + } else if (((FlowImplementationImpl) object).getOutEnd() == null) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/FlowSink")); + } + return overlayImage(object, getResourceLocator().getImage("full/obj16/FlowImplementation")); } @@ -164,6 +178,7 @@ protected void addKindPropertyDescriptor(Object object) { * * @generated */ + @Override public String getText(Object object) { String label = ((FlowImplementation) object).getName(); return label == null || label.length() == 0 ? getString("_UI_FlowImplementation_type") @@ -177,6 +192,7 @@ public String getText(Object object) { * * @generated */ + @Override public void notifyChanged(Notification notification) { updateChildren(notification); @@ -200,6 +216,7 @@ public void notifyChanged(Notification notification) { * * @generated */ + @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); @@ -219,6 +236,7 @@ protected void collectNewChildDescriptors(Collection newChildDescriptors * * @generated */ + @Override public String getCreateChildText(Object owner, Object feature, Object child, Collection selection) { Object childFeature = feature; Object childObject = child; diff --git a/core/org.osate.aadl2.edit/src/org/osate/aadl2/provider/FlowSpecificationItemProvider.java b/core/org.osate.aadl2.edit/src/org/osate/aadl2/provider/FlowSpecificationItemProvider.java index e8fee0ea3b5..0cdfc490e12 100644 --- a/core/org.osate.aadl2.edit/src/org/osate/aadl2/provider/FlowSpecificationItemProvider.java +++ b/core/org.osate.aadl2.edit/src/org/osate/aadl2/provider/FlowSpecificationItemProvider.java @@ -36,6 +36,7 @@ import org.osate.aadl2.Aadl2Factory; import org.osate.aadl2.Aadl2Package; import org.osate.aadl2.FlowSpecification; +import org.osate.aadl2.impl.FlowSpecificationImpl; /** * This is the item provider adapter for a {@link org.osate.aadl2.FlowSpecification} object. @@ -60,6 +61,7 @@ public FlowSpecificationItemProvider(AdapterFactory adapterFactory) { * * @generated */ + @Override public List getPropertyDescriptors(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); @@ -126,6 +128,7 @@ protected void addKindPropertyDescriptor(Object object) { * * @generated */ + @Override public Collection getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); @@ -140,6 +143,7 @@ public Collection getChildrenFeatures(Object objec * * @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. @@ -166,10 +170,20 @@ protected void addRefinedPropertyDescriptor(Object object) { * This returns FlowSpecification.gif. * * - * @generated + * @generated NOT */ + @Override public Object getImage(Object object) { - return overlayImage(object, getResourceLocator().getImage("full/obj16/FlowSpecification")); + if (((FlowSpecificationImpl) object).getAllInEnd() == null + && ((FlowSpecificationImpl) object).getAllOutEnd() == null) { + return null; + } else if (((FlowSpecificationImpl) object).getAllInEnd() == null) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/FlowSource")); + } else if (((FlowSpecificationImpl) object).getAllOutEnd() == null) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/FlowSink")); + } + + return overlayImage(object, getResourceLocator().getImage("full/obj16/FlowPath")); } /** @@ -178,6 +192,7 @@ public Object getImage(Object object) { * * @generated */ + @Override public String getText(Object object) { String label = ((FlowSpecification) object).getName(); return label == null || label.length() == 0 ? getString("_UI_FlowSpecification_type") @@ -191,6 +206,7 @@ public String getText(Object object) { * * @generated */ + @Override public void notifyChanged(Notification notification) { updateChildren(notification); @@ -213,6 +229,7 @@ public void notifyChanged(Notification notification) { * * @generated */ + @Override protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); @@ -229,6 +246,7 @@ protected void collectNewChildDescriptors(Collection newChildDescriptors * * @generated */ + @Override public String getCreateChildText(Object owner, Object feature, Object child, Collection selection) { Object childFeature = feature; Object childObject = child; From 6a84b9de34cd5fd5ce1520bdabe793f3974a822c Mon Sep 17 00:00:00 2001 From: Anna Sazonova Date: Thu, 15 Oct 2020 13:00:13 -0400 Subject: [PATCH 2/3] Add letter I to flow path, flow sink and flow source images --- .../icons/full/obj16/FlowPath.gif | Bin 84 -> 73 bytes .../icons/full/obj16/FlowSink.gif | Bin 73 -> 76 bytes .../icons/full/obj16/FlowSource.gif | Bin 87 -> 76 bytes .../provider/FlowImplementationItemProvider.java | 2 +- 4 files changed, 1 insertion(+), 1 deletion(-) diff --git a/core/org.osate.aadl2.edit/icons/full/obj16/FlowPath.gif b/core/org.osate.aadl2.edit/icons/full/obj16/FlowPath.gif index 7c162b1de1aba36c89bb5be21d51f98c4bb81ab4..d939e0142dacaf43158bd0201f6a9c58805aa687 100644 GIT binary patch literal 73 zcmZ?wbh9u|6krfwn8*ME|Ns97(+r9~Sva{Em>6_GT#!5ilhl;{m29uyiu7azh2_s( T@cVzJlX~CN&SkHn7#OSpWTX`1 literal 84 zcmZ?wbhEHb6krfwXkcUjg8%>jEB+I7E=o--Nlj5G&n(GMaQE~LU{L(Y!pOzI$e;sK j1X9kxB-Ycv^7LE&WQL+3=1upk(<(zBc}xpnWUvMR)$9>4xUHzBXa_-HUeL7`+is!S=Wv_x57_0#f4G*#a diff --git a/core/org.osate.aadl2.edit/icons/full/obj16/FlowSource.gif b/core/org.osate.aadl2.edit/icons/full/obj16/FlowSource.gif index 8aa66c663a370586e8954693162b6845f8726245..e67c32c6610c1dc946d107dbb3cc0f43a70a43a9 100644 GIT binary patch literal 76 zcmZ?wbh9u|6krfwn8*ME|Ns97(+r9~Sva{Em>6_GT#!5ilkAlKm29uyio{GlsjEB+I7E=o--Nlj5G&n(GMaQE~LU{L(Y!pOzI$e;sK m1X9kxB-zuy^7LCixvpNR-3?dw{N~QRpfdGY=Q3|b25SI4I2$Ga diff --git a/core/org.osate.aadl2.edit/src/org/osate/aadl2/provider/FlowImplementationItemProvider.java b/core/org.osate.aadl2.edit/src/org/osate/aadl2/provider/FlowImplementationItemProvider.java index a6eb063af32..2ce5f2b455c 100644 --- a/core/org.osate.aadl2.edit/src/org/osate/aadl2/provider/FlowImplementationItemProvider.java +++ b/core/org.osate.aadl2.edit/src/org/osate/aadl2/provider/FlowImplementationItemProvider.java @@ -153,7 +153,7 @@ public Object getImage(Object object) { return overlayImage(object, getResourceLocator().getImage("full/obj16/FlowSink")); } - return overlayImage(object, getResourceLocator().getImage("full/obj16/FlowImplementation")); + return overlayImage(object, getResourceLocator().getImage("full/obj16/FlowPath")); } /** From 49b697ed1e1db408d21078628db493e4f178861c Mon Sep 17 00:00:00 2001 From: Anna Sazonova Date: Mon, 26 Oct 2020 13:15:21 -0400 Subject: [PATCH 3/3] Use separate icons for flow specification sink/path/source and flow implementation sink/path/source. Add icon for end to end flow --- .../icons/full/obj16/EndToEndFlow.gif | Bin 129 -> 72 bytes .../icons/full/obj16/FlowPath.gif | Bin 73 -> 84 bytes .../icons/full/obj16/FlowPathImplementation.gif | Bin 0 -> 73 bytes .../icons/full/obj16/FlowSink.gif | Bin 76 -> 73 bytes .../icons/full/obj16/FlowSinkImplementation.gif | Bin 0 -> 76 bytes .../icons/full/obj16/FlowSource.gif | Bin 76 -> 87 bytes .../full/obj16/FlowSourceImplementation.gif | Bin 0 -> 76 bytes .../provider/FlowImplementationItemProvider.java | 6 +++--- 8 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 core/org.osate.aadl2.edit/icons/full/obj16/FlowPathImplementation.gif create mode 100644 core/org.osate.aadl2.edit/icons/full/obj16/FlowSinkImplementation.gif create mode 100644 core/org.osate.aadl2.edit/icons/full/obj16/FlowSourceImplementation.gif diff --git a/core/org.osate.aadl2.edit/icons/full/obj16/EndToEndFlow.gif b/core/org.osate.aadl2.edit/icons/full/obj16/EndToEndFlow.gif index 10d222998af0a3a571390bae7e117c9964ec1562..2882c541b7fc2f04f837701ab4051ce4bdda1387 100644 GIT binary patch literal 72 zcmZ?wbh9u|6krfwn8*ME|Ns97(+r9~Sva{Em>6_GT#!5iljM~Cm8akG&Fcsb;^Mur Sr#!duyr|c+&Sid#4AuZeXcH*_ literal 129 zcmZ?wbhEHb6krfw*vtS14M4Jip`qcxfddT<4GjN*-2XuK|Nmgte-L}loH+*$H~@j- zPZmZ722KVYkWP>p3@myECp}m1wRrvIn+pHKLf7r4thZ7UycR6{YNPjYn%Y&f@}8BN S{JP5-JKc^<6cT1+um%9FH!q$5 diff --git a/core/org.osate.aadl2.edit/icons/full/obj16/FlowPath.gif b/core/org.osate.aadl2.edit/icons/full/obj16/FlowPath.gif index d939e0142dacaf43158bd0201f6a9c58805aa687..7c162b1de1aba36c89bb5be21d51f98c4bb81ab4 100644 GIT binary patch literal 84 zcmZ?wbhEHb6krfwXkcUjg8%>jEB+I7E=o--Nlj5G&n(GMaQE~LU{L(Y!pOzI$e;sK j1X9kxB-Ycv^7LE&WQL+3=1upk(<(zBc}xpnWUvMR)$6_GT#!5ilhl;{m29uyiu7azh2_s( T@cVzJlX~CN&SkHn7#OSpWTX`1 diff --git a/core/org.osate.aadl2.edit/icons/full/obj16/FlowPathImplementation.gif b/core/org.osate.aadl2.edit/icons/full/obj16/FlowPathImplementation.gif new file mode 100644 index 0000000000000000000000000000000000000000..d939e0142dacaf43158bd0201f6a9c58805aa687 GIT binary patch literal 73 zcmZ?wbh9u|6krfwn8*ME|Ns97(+r9~Sva{Em>6_GT#!5ilhl;{m29uyiu7azh2_s( T@cVzJlX~CN&SkHn7#OSpWTX`1 literal 0 HcmV?d00001 diff --git a/core/org.osate.aadl2.edit/icons/full/obj16/FlowSink.gif b/core/org.osate.aadl2.edit/icons/full/obj16/FlowSink.gif index c086d857fbc96de1d4182f7e7e354b97c420b7f4..2e9860681b6d514a917a66df09138d17c1f8671a 100644 GIT binary patch delta 34 qcmebAoS-8sHKl*$>9>4xUHzBXa_-HUeL7`+is!S=Wv_x57_0#f4G*#a delta 37 vcmV+=0NVdaOpq)f9h8r$2kY$=lyps&;I$g~4}QibX%Qxn=gPM3+ZF&jH);_I diff --git a/core/org.osate.aadl2.edit/icons/full/obj16/FlowSinkImplementation.gif b/core/org.osate.aadl2.edit/icons/full/obj16/FlowSinkImplementation.gif new file mode 100644 index 0000000000000000000000000000000000000000..c086d857fbc96de1d4182f7e7e354b97c420b7f4 GIT binary patch literal 76 zcmZ?wbh9u|6krfwn8*ME|Ns97(+r9~Sva{Em>6_GT#!5ilkAlKmF%zIicBf-o%Ud> X)DQl;V``a#Y7?HH+V<|Y7=twcq%{_9 literal 0 HcmV?d00001 diff --git a/core/org.osate.aadl2.edit/icons/full/obj16/FlowSource.gif b/core/org.osate.aadl2.edit/icons/full/obj16/FlowSource.gif index e67c32c6610c1dc946d107dbb3cc0f43a70a43a9..8aa66c663a370586e8954693162b6845f8726245 100644 GIT binary patch literal 87 zcmZ?wbhEHb6krfwXkcUjg8%>jEB+I7E=o--Nlj5G&n(GMaQE~LU{L(Y!pOzI$e;sK m1X9kxB-zuy^7LCixvpNR-3?dw{N~QRpfdGY=Q3|b25SI4I2$Ga literal 76 zcmZ?wbh9u|6krfwn8*ME|Ns97(+r9~Sva{Em>6_GT#!5ilkAlKm29uyio{Gls6_GT#!5ilkAlKm29uyio{Gls