}
}
}
- if (str.indexOf(":", pos+1) > -1) {
- String x = str.substring(pos+1, end);
+ if (str.indexOf(":", pos) > -1) {
+ String x = str.substring(pos, end);
if (!x.isEmpty()) {
String[] parts = x.split(":");
if (parts.length == 3) {
if (context != null) {
Map<String,List<List<Object>>> from = context.getData();
for (Map.Entry<String, List<List<Object>>> entry : from.entrySet()) {
+ String key = entry.getKey();
+ Object existing = getValue(key);
+ Object newValue = context.getValue(key);
+ // Do not merge duplicates!
+ if (newValue != null && newValue.equals(existing))
+ continue;
List<List<Object>> rows = ensureRowsAvailable(entry.getKey());
rows.addAll(entry.getValue());
}
"""Returns all diagrams of the given model."""
diagramsOf :: Model -> <ReadGraph> [Diagram]
-diagramsOf model = recurse
- DIA.Diagram
- (configurationOf model)
+diagramsOf model = diagramsUnder $ configurationOf model
+
+"""
+Returns all diagrams under the specified diagram folder.
+The parameter can also be the configuration root `configurationOf`
+in which case this function returns the same as `diagramsOf model`.
+"""
+diagramsUnder :: DiagramFolder -> <ReadGraph> [Resource]
+diagramsUnder folder = recurse DIA.Diagram folder
where
recurse t r = do
cs = children r