ea 0.6.81 → 0.6.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f49b146105c3770154c2e142bd0e762a5a055ba6ecdaebeb5fc0a69dc8bda54d
|
|
4
|
+
data.tar.gz: 6e9f3d7a47493dafca74ce0f5b6a97974e1ec6f7260945af4863ae605b7d3825
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d7d3b746d276197b249cba7a087f015a439c8644ee2a6b719e55122a28d3c36a56f90e5db6ba8d695bb21543022bade8c5534f69c3b49a91d5a9542715211c2b
|
|
7
|
+
data.tar.gz: 00b735266e78b014d1bf128a353aea5563b90b2a4f5b861cf4eed1ca934d18d340429af54c36d7ac51229f37cf9c1bc5d4974181af4333daa27ba102ed96ba1f
|
|
@@ -30,6 +30,7 @@ module Ea
|
|
|
30
30
|
attribute :line_color, :integer
|
|
31
31
|
attribute :line_width, :integer
|
|
32
32
|
attribute :hidden, :boolean
|
|
33
|
+
attribute :is_substitutable, :boolean, default: false
|
|
33
34
|
attribute :label_boxes, :hash, default: -> { {} }
|
|
34
35
|
attribute :ghost_labels, GhostLabel, collection: true, initialize_empty: true
|
|
35
36
|
# True when the t_diagramlinks.Geometry string carries explicit
|
|
@@ -59,6 +60,7 @@ module Ea
|
|
|
59
60
|
map "sourceElementRef", to: :source_element_ref
|
|
60
61
|
map "targetElementRef", to: :target_element_ref
|
|
61
62
|
map "sourceDuid", to: :source_duid
|
|
63
|
+
map "isSubstitutable", to: :is_substitutable
|
|
62
64
|
map "targetDuid", to: :target_duid
|
|
63
65
|
map "sourceEdge", to: :source_edge
|
|
64
66
|
map "targetEdge", to: :target_edge
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "set"
|
|
4
|
+
|
|
3
5
|
module Ea
|
|
4
6
|
module Sources
|
|
5
7
|
module Qea
|
|
@@ -10,6 +12,20 @@ module Ea
|
|
|
10
12
|
class DiagramBuilder
|
|
11
13
|
attr_reader :database
|
|
12
14
|
|
|
15
|
+
# Generalizations whose EA CustomProperties carry
|
|
16
|
+
# isSubstitutable draw '{isSubstitutable=false}' at the label
|
|
17
|
+
# seat (t_xref 'connector property' rows keyed by connector
|
|
18
|
+
# guid; VALU 0/empty both mean false).
|
|
19
|
+
def substitutable_connector?(conn)
|
|
20
|
+
@substitutable_guids ||= database.collections[:xrefs]
|
|
21
|
+
.select do |x|
|
|
22
|
+
x.xref_type == "connector property" &&
|
|
23
|
+
x.name == "CustomProperties" &&
|
|
24
|
+
x.description.to_s.include?("isSubstitutable")
|
|
25
|
+
end.map(&:client).to_set
|
|
26
|
+
@substitutable_guids.include?(conn.ea_guid)
|
|
27
|
+
end
|
|
28
|
+
|
|
13
29
|
def initialize(database)
|
|
14
30
|
@database = database
|
|
15
31
|
end
|
|
@@ -188,6 +204,7 @@ module Ea
|
|
|
188
204
|
target_stereotype: conn.deststereotype,
|
|
189
205
|
waypoints: waypoints,
|
|
190
206
|
label_boxes: {},
|
|
207
|
+
is_substitutable: substitutable_connector?(conn),
|
|
191
208
|
# Only the Dependency family carries EA's double-back
|
|
192
209
|
# "M t L s M t" byte form; regenerated generalizations
|
|
193
210
|
# and associations draw as plain source-first lines
|
|
@@ -249,6 +266,7 @@ module Ea
|
|
|
249
266
|
connector_type: conn.connector_type,
|
|
250
267
|
waypoints: waypoints,
|
|
251
268
|
label_boxes: {},
|
|
269
|
+
is_substitutable: substitutable_connector?(conn),
|
|
252
270
|
style: { direct: true },
|
|
253
271
|
hidden: false,
|
|
254
272
|
has_geometry_offsets: false
|
|
@@ -384,7 +402,8 @@ module Ea
|
|
|
384
402
|
DiagramStyleParser.parse(link_row.style),
|
|
385
403
|
hidden: hidden?(link_row),
|
|
386
404
|
ghost_labels: ghost_labels_for(connector, diagram_row, link_row),
|
|
387
|
-
has_geometry_offsets: geometry_has_offsets?(link_row.geometry)
|
|
405
|
+
has_geometry_offsets: geometry_has_offsets?(link_row.geometry),
|
|
406
|
+
is_substitutable: substitutable_connector?(connector)
|
|
388
407
|
)
|
|
389
408
|
end
|
|
390
409
|
|
|
@@ -62,6 +62,14 @@ module Ea
|
|
|
62
62
|
# Returns the midpoint label content: stereotype if
|
|
63
63
|
# present, else the relationship Name.
|
|
64
64
|
def midpoint_content(connector)
|
|
65
|
+
# Generalizations carrying EA's isSubstitutable
|
|
66
|
+
# CustomProperty draw the constraint at the label seat.
|
|
67
|
+
if connector.respond_to?(:is_substitutable) &&
|
|
68
|
+
connector.is_substitutable &&
|
|
69
|
+
stereotype_label(connector).nil?
|
|
70
|
+
return "{isSubstitutable=false}"
|
|
71
|
+
end
|
|
72
|
+
|
|
65
73
|
stereotype = stereotype_label(connector)
|
|
66
74
|
return stereotype if stereotype
|
|
67
75
|
|
data/lib/ea/version.rb
CHANGED