Skip to content

Commit 785aa0f

Browse files
author
David Baum
committed
small bug fixes
1 parent 17c7b99 commit 785aa0f

6 files changed

Lines changed: 12 additions & 30 deletions

File tree

generator2/org.getaviz.generator/.project

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@
1010
<arguments>
1111
</arguments>
1212
</buildCommand>
13-
<buildCommand>
14-
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
15-
<triggers>full,incremental,</triggers>
16-
<arguments>
17-
<dictionary>
18-
<key>LaunchConfigHandle</key>
19-
<value>&lt;project&gt;/.externalToolBuilders/org.eclipse.xtext.ui.shared.xtextBuilder.launch</value>
20-
</dictionary>
21-
</arguments>
22-
</buildCommand>
2313
<buildCommand>
2414
<name>org.eclipse.jdt.core.javabuilder</name>
2515
<arguments>

generator2/org.getaviz.generator/src/org/getaviz/generator/city/m2m/City2City.xtend

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class City2City {
2929
var Node model
3030

3131
new () {
32-
log.info("CityModification started")
32+
log.info("City2City started")
3333
graph = Database::getInstance(config.databaseName)
3434
var tx = graph.beginTx
3535
try {
@@ -113,7 +113,7 @@ class City2City {
113113
} finally {
114114
tx.close
115115
}
116-
log.info("CityModification finished")
116+
log.info("City2City finished")
117117
}
118118

119119
def private void setDistrictAttributes(Path districtPath) {

generator2/org.getaviz.generator/src/org/getaviz/generator/jqa/JQA2JSON.xtend

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class JQA2JSON {
193193
194194
def private toMetaDataAnnotation(Node annotation) {
195195
var belongsTo = ""
196-
val parent = annotation.getRelationships(Direction.INCOMING, Rels.CONTAINS, Rels.DECLARES).head
196+
val parent = annotation.getRelationships(Direction.INCOMING, Rels.CONTAINS, Rels.DECLARES).filter[hasProperty("Package")].head
197197
if(parent !== null) {
198198
belongsTo = parent.startNode.getProperty("hash") as String
199199
}
@@ -300,8 +300,12 @@ class JQA2JSON {
300300
def private getParameters(Node method) {
301301
val parameterList = newArrayList
302302
val list = method.getRelationships(Rels.HAS, Direction.OUTGOING).map[endNode];
303-
list.filter[hasLabel(Labels.Parameter)].sortBy[p|p.getProperty("index") as Integer].forEach[p|
304-
parameterList += p.getSingleRelationship(Rels.OF_TYPE, Direction.OUTGOING).endNode.getProperty("name") as String
303+
list.filter[hasLabel(Labels.Parameter)].sortBy[p|p.getProperty("index", 0) as Integer].forEach[p|
304+
try {
305+
parameterList += p.getSingleRelationship(Rels.OF_TYPE, Direction.OUTGOING).endNode.getProperty("name") as String
306+
} catch (NullPointerException e) {
307+
308+
}
305309
]
306310
return parameterList.removeBrackets
307311
}

generator2/org.getaviz.generator/src/org/getaviz/generator/jqa/JQAEnhancement.xtend

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class JQAEnhancement {
5656
graph.traversalDescription.depthFirst.relationships(Rels.CONTAINS, Direction.OUTGOING).relationships(
5757
Rels.DECLARES, Direction.OUTGOING).uniqueness(Uniqueness.NONE).evaluator(evaluator).traverse(package).
5858
nodes.forEach [
59-
// log.debug(id)
6059
var fqn = getProperty("fqn", "") as String
6160
if (fqn.empty) {
6261
val container = getSingleRelationship(Rels.DECLARES, Direction.INCOMING).startNode
@@ -80,9 +79,7 @@ class JQAEnhancement {
8079
}
8180
setProperty("fqn", fqn)
8281
}
83-
// fqn = fqn.replace("$", ".")
84-
var hash = getProperty("hash", "") as String
85-
if (hash.empty) {
82+
if (!hasProperty("hash")) {
8683
setProperty("hash", createHash(fqn))
8784
}
8885
]

generator2/org.getaviz.generator/src/org/getaviz/generator/jqa/JQAEvaluator.xtend

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,6 @@ class JQAEvaluator implements Evaluator {
6565
} else {
6666
return Evaluation.INCLUDE_AND_CONTINUE
6767
}
68-
69-
// val result = graph.execute(
70-
// "MATCH (m1:Method)<-[:DECLARES]-(c:Type)-[:EXTENDS]->(p:Type)-[:DECLARES]->(m2) WHERE ID(m1) = " +
71-
// node.id + " AND m1.signature = m2.signature RETURN m1")
72-
// if (result === null) {
73-
// return Evaluation.INCLUDE_AND_CONTINUE
74-
// } else {
75-
// return Evaluation.EXCLUDE_AND_CONTINUE
76-
// }
7768
}
7869
}
7970
return Evaluation.EXCLUDE_AND_PRUNE

generator2/org.getaviz.generator/src/org/getaviz/generator/rd/m2m/RD2RD.xtend

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class RD2RD {
3131
RGBColor[] NS_colors
3232

3333
new() {
34-
log.info("RDModifikation started")
34+
log.info("RD2RD started")
3535
var tx = graph.beginTx
3636
try {
3737
var result = graph.execute(
@@ -91,7 +91,7 @@ class RD2RD {
9191
} finally {
9292
tx.close
9393
}
94-
log.info("RDModifikation finished")
94+
log.info("RD2RD finished")
9595
}
9696

9797
def private setNamespaceColor(Node namespaceDisk) {

0 commit comments

Comments
 (0)