Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Florian Grabowski
Informationslandschaften in Minecraft zur Visualisierung von Softwarequalität
Commits
a1e80c61
Commit
a1e80c61
authored
Feb 03, 2022
by
Florian Grabowski
Browse files
Language Changes
parent
b7e294e8
Changes
10
Hide whitespace changes
Inline
Side-by-side
.idea/KPI_Visualizer.iml
View file @
a1e80c61
...
...
@@ -20,6 +20,10 @@
<excludeFolder
url=
"file://$MODULE_DIR$/src/server/logs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/.idea/dataSources"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/target"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/src/server/plugins"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/src/server/world"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/src/server/world_nether"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/src/server/world_the_end"
/>
</content>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
...
...
src/main/java/de/_82grfl1bif/kpiVisualizer/commands/GenerateLayout.java
View file @
a1e80c61
...
...
@@ -82,7 +82,7 @@ public class GenerateLayout implements CommandExecutor {
return
true
;
}
else
{
Bukkit
.
getLogger
().
log
(
Level
.
SEVERE
,
"
Kein Spieler gef
und
en
."
);
Bukkit
.
getLogger
().
log
(
Level
.
SEVERE
,
"
no player fo
und."
);
return
false
;
}
}
...
...
src/main/java/de/_82grfl1bif/kpiVisualizer/commands/SetPreset.java
View file @
a1e80c61
...
...
@@ -42,7 +42,7 @@ public class SetPreset implements CommandExecutor {
t
.
run
();
}
}
else
{
Bukkit
.
getLogger
().
log
(
Level
.
SEVERE
,
"
Kein Spieler gef
und
en
."
);
Bukkit
.
getLogger
().
log
(
Level
.
SEVERE
,
"
no player fo
und."
);
return
false
;
}
return
true
;
...
...
src/main/java/de/_82grfl1bif/kpiVisualizer/data/Klasse.java
View file @
a1e80c61
...
...
@@ -32,15 +32,15 @@ public class Klasse {
public
static
int
variablesMin
=
Integer
.
MAX_VALUE
;
public
static
int
variablesMax
;
public
Duration
bearbeiteteZeit
;
public
static
Duration
bearbeiteteZeit
Min
;
public
static
Duration
bearbeiteteZeit
Max
;
public
Duration
zeitSeitLetzterBearbeitung
;
public
static
Duration
zeitSeitLetzterBearbeitung
Min
;
public
static
Duration
zeitSeitLetzterBearbeitung
Max
;
public
Duration
zeitSeitE
rst
em
Commit
;
public
static
Duration
zeitSeitE
rst
em
CommitMin
;
public
static
Duration
zeitSeitE
rst
em
CommitMax
;
public
Duration
existingTime
;
public
static
Duration
existingTime
Min
;
public
static
Duration
existingTime
Max
;
public
Duration
lastEditingTime
;
public
static
Duration
lastEditingTime
Min
;
public
static
Duration
lastEditingTime
Max
;
public
Duration
fi
rstCommit
Time
;
public
static
Duration
fi
rstCommit
Time
Min
;
public
static
Duration
fi
rstCommit
Time
Max
;
ArrayList
<
LocalDateTime
>
commitTimes
;
public
Klasse
(
int
id
,
String
name
,
String
path
,
int
qloc
,
int
loc
,
int
commits
,
int
functions
,
int
variables
,
int
complexity
,
ArrayList
<
LocalDateTime
>
commitTimes
){
...
...
@@ -68,26 +68,26 @@ public class Klasse {
this
.
name
=
name
;
this
.
path
=
path
;
this
.
commitTimes
=
commitTimes
;
this
.
bearbeiteteZeit
=
(
commitTimes
.
isEmpty
())
?
null
:
Duration
.
between
(
commitTimes
.
get
(
commitTimes
.
size
()-
1
),
commitTimes
.
get
(
0
));
if
(
bearbeiteteZeit
!=
null
)
{
if
(
bearbeiteteZeitMax
==
null
)
bearbeiteteZeit
Max
=
Duration
.
ofMillis
(
Long
.
MIN_VALUE
);
if
(
bearbeiteteZeitMin
==
null
)
bearbeiteteZeit
Min
=
Duration
.
ofMillis
((
Long
.
MAX_VALUE
));
bearbeiteteZeitMax
=
(
bearbeiteteZeitMax
.
toMillis
()
>=
bearbeiteteZeit
.
toMillis
())
?
bearbeiteteZeitMax:
bearbeiteteZeit
;
bearbeiteteZeitMin
=
(
bearbeiteteZeitMin
.
toMillis
()
<=
bearbeiteteZeit
.
toMillis
())
?
bearbeiteteZeitMin:
bearbeiteteZeit
;
this
.
existingTime
=
(
commitTimes
.
isEmpty
())
?
null
:
Duration
.
between
(
commitTimes
.
get
(
commitTimes
.
size
()-
1
),
commitTimes
.
get
(
0
));
if
(
existingTime
!=
null
)
{
if
(
existingTimeMax
==
null
)
existingTime
Max
=
Duration
.
ofMillis
(
Long
.
MIN_VALUE
);
if
(
existingTimeMin
==
null
)
existingTime
Min
=
Duration
.
ofMillis
((
Long
.
MAX_VALUE
));
existingTimeMax
=
(
existingTimeMax
.
toMillis
()
>=
existingTime
.
toMillis
())
?
existingTimeMax
:
existingTime
;
existingTimeMin
=
(
existingTimeMin
.
toMillis
()
<=
existingTime
.
toMillis
())
?
existingTimeMin
:
existingTime
;
}
this
.
zeitSeitLetzterBearbeitung
=
(
commitTimes
.
isEmpty
())
?
null
:
Duration
.
between
(
commitTimes
.
get
(
0
),
LocalDateTime
.
now
());
if
(
zeitSeitLetzterBearbeitung
!=
null
)
{
if
(
zeitSeitLetzterBearbeitungMax
==
null
)
zeitSeitLetzterBearbeitung
Max
=
Duration
.
ofMillis
(
Long
.
MIN_VALUE
);
if
(
zeitSeitLetzterBearbeitungMin
==
null
)
zeitSeitLetzterBearbeitung
Min
=
Duration
.
ofMillis
(
Long
.
MAX_VALUE
);
zeitSeitLetzterBearbeitungMax
=
(
zeitSeitLetzterBearbeitungMax
.
toMillis
()
>=
zeitSeitLetzterBearbeitung
.
toMillis
())
?
zeitSeitLetzterBearbeitungMax:
zeitSeitLetzterBearbeitung
;
zeitSeitLetzterBearbeitungMin
=
(
zeitSeitLetzterBearbeitungMin
.
toMillis
()
<=
zeitSeitLetzterBearbeitung
.
toMillis
())
?
zeitSeitLetzterBearbeitungMin:
zeitSeitLetzterBearbeitung
;
this
.
lastEditingTime
=
(
commitTimes
.
isEmpty
())
?
null
:
Duration
.
between
(
commitTimes
.
get
(
0
),
LocalDateTime
.
now
());
if
(
lastEditingTime
!=
null
)
{
if
(
lastEditingTimeMax
==
null
)
lastEditingTime
Max
=
Duration
.
ofMillis
(
Long
.
MIN_VALUE
);
if
(
lastEditingTimeMin
==
null
)
lastEditingTime
Min
=
Duration
.
ofMillis
(
Long
.
MAX_VALUE
);
lastEditingTimeMax
=
(
lastEditingTimeMax
.
toMillis
()
>=
lastEditingTime
.
toMillis
())
?
lastEditingTimeMax
:
lastEditingTime
;
lastEditingTimeMin
=
(
lastEditingTimeMin
.
toMillis
()
<=
lastEditingTime
.
toMillis
())
?
lastEditingTimeMin
:
lastEditingTime
;
}
this
.
zeitSeitE
rst
em
Commit
=
(
commitTimes
.
isEmpty
())
?
null
:
Duration
.
between
(
commitTimes
.
get
(
commitTimes
.
size
()-
1
),
LocalDateTime
.
now
());
if
(
zeitSeitE
rst
em
Commit
!=
null
)
{
if
(
zeitSeitE
rst
em
CommitMax
==
null
)
zeitSeitE
rst
em
CommitMax
=
Duration
.
ofMillis
(
Long
.
MIN_VALUE
);
if
(
zeitSeitE
rst
em
CommitMin
==
null
)
zeitSeitE
rst
em
CommitMin
=
Duration
.
ofMillis
(
Long
.
MAX_VALUE
);
zeitSeitE
rst
em
CommitMax
=
(
zeitSeitE
rst
em
CommitMax
.
toMillis
()
>=
zeitSeitE
rst
em
Commit
.
toMillis
())
?
zeitSeitE
rst
em
Commit
Max:
zeitSeitE
rst
em
Commit
;
zeitSeitE
rst
em
CommitMin
=
(
zeitSeitE
rst
em
CommitMin
.
toMillis
()
<=
zeitSeitE
rst
em
Commit
.
toMillis
())
?
zeitSeitE
rst
em
Commit
Min:
zeitSeitE
rst
em
Commit
;
this
.
fi
rstCommit
Time
=
(
commitTimes
.
isEmpty
())
?
null
:
Duration
.
between
(
commitTimes
.
get
(
commitTimes
.
size
()-
1
),
LocalDateTime
.
now
());
if
(
fi
rstCommit
Time
!=
null
)
{
if
(
fi
rstCommit
Time
Max
==
null
)
fi
rstCommit
Time
Max
=
Duration
.
ofMillis
(
Long
.
MIN_VALUE
);
if
(
fi
rstCommit
Time
Min
==
null
)
fi
rstCommit
Time
Min
=
Duration
.
ofMillis
(
Long
.
MAX_VALUE
);
fi
rstCommit
Time
Max
=
(
fi
rstCommit
Time
Max
.
toMillis
()
>=
fi
rstCommit
Time
.
toMillis
())
?
fi
rstCommit
TimeMax
:
fi
rstCommit
Time
;
fi
rstCommit
Time
Min
=
(
fi
rstCommit
Time
Min
.
toMillis
()
<=
fi
rstCommit
Time
.
toMillis
())
?
fi
rstCommit
TimeMin
:
fi
rstCommit
Time
;
}
}
...
...
src/main/java/de/_82grfl1bif/kpiVisualizer/layouts/simpleSquare/Quadrat.java
View file @
a1e80c61
...
...
@@ -7,7 +7,7 @@ import java.util.ArrayList;
public
class
Quadrat
extends
Shape
{
private
Boolean
belegt
;
private
Boolean
filled
;
public
Structure
getStructure
()
{
return
structure
;
...
...
@@ -19,9 +19,9 @@ public class Quadrat extends Shape {
this
.
bottomLeftCorner
=
bottomLeftCorner
;
this
.
topRightCorner
=
topRightCorner
;
this
.
xEdgeLength
=
topRightCorner
.
x
-
bottomLeftCorner
.
x
;
this
.
belegt
=
false
;
this
.
filled
=
false
;
if
(
topRightCorner
.
y
-
bottomLeftCorner
.
y
<
3
||
topRightCorner
.
x
-
bottomLeftCorner
.
x
<
3
){
throw
new
IllegalArgumentException
(
"
keine
Quadrate < 3 er
laubt
"
);
throw
new
IllegalArgumentException
(
"
no
Quadrate < 3
p
er
mitted
"
);
}
}
...
...
@@ -29,14 +29,14 @@ public class Quadrat extends Shape {
this
.
xEdgeLength
=
xEdgeLength
;
this
.
bottomLeftCorner
=
bottomLeftCorner
;
this
.
topRightCorner
=
new
Point
(
bottomLeftCorner
.
x
+
xEdgeLength
,
bottomLeftCorner
.
y
+
xEdgeLength
);
this
.
belegt
=
false
;
this
.
filled
=
false
;
if
(
xEdgeLength
<
3
||
topRightCorner
.
x
-
bottomLeftCorner
.
x
<
3
){
throw
new
IllegalArgumentException
(
"
keine
Quadrate < 3 er
laubt
"
+
xEdgeLength
);
throw
new
IllegalArgumentException
(
"
no
Quadrate < 3
p
er
mitted
"
+
xEdgeLength
);
}
}
public
ArrayList
<
Quadrat
>
set
Belegt
(
Structure
structure
)
{
this
.
belegt
=
true
;
public
ArrayList
<
Quadrat
>
set
Filled
(
Structure
structure
)
{
this
.
filled
=
true
;
this
.
structure
=
structure
;
ArrayList
<
Quadrat
>
result
=
new
ArrayList
<>();
if
(
this
.
xEdgeLength
>
structure
.
getWidth
().
x
+
3
){
//if you can split rest into more quads
...
...
@@ -54,8 +54,8 @@ public class Quadrat extends Shape {
return
result
;
}
public
Boolean
get
Belegt
()
{
return
belegt
;
public
Boolean
get
Filled
()
{
return
filled
;
}
public
Point
getWidth
(){
...
...
src/main/java/de/_82grfl1bif/kpiVisualizer/layouts/simpleSquare/SimpleSquareLayout.java
View file @
a1e80c61
...
...
@@ -49,16 +49,16 @@ public class SimpleSquareLayout {
first
=
false
;
this
.
size
=
s
.
getWidth
().
x
;
layout
.
add
(
new
Quadrat
(
new
Point
(
0
,
0
),
s
.
getWidth
().
x
));
layout
.
addAll
(
layout
.
get
(
0
).
set
Belegt
(
s
));
layout
.
addAll
(
layout
.
get
(
0
).
set
Filled
(
s
));
}
else
{
layout
.
sort
(
new
CoordinateYComparator
());
layout
.
sort
(
new
CoordinateXComparator
());
layout
.
sort
(
new
WidthComparator
());
boolean
noneFoundFlag
=
true
;
for
(
int
i
=
0
;
i
<
layout
.
size
();
i
++)
{
if
((
s
.
getWidth
().
x
<=
layout
.
get
(
i
).
getWidth
().
x
)&&(!
layout
.
get
(
i
).
get
Belegt
())&&(
noneFoundFlag
)){
if
((
s
.
getWidth
().
x
<=
layout
.
get
(
i
).
getWidth
().
x
)&&(!
layout
.
get
(
i
).
get
Filled
())&&(
noneFoundFlag
)){
noneFoundFlag
=
false
;
layout
.
addAll
(
layout
.
get
(
i
).
set
Belegt
(
s
));
layout
.
addAll
(
layout
.
get
(
i
).
set
Filled
(
s
));
}
}
if
(
noneFoundFlag
){
...
...
@@ -70,12 +70,12 @@ public class SimpleSquareLayout {
private
void
appendQuad
(
Structure
structure
){
Quadrat
q
=
new
Quadrat
(
new
Point
(
this
.
size
,
0
),
structure
.
getWidth
().
x
);
q
.
set
Belegt
(
structure
);
q
.
set
Filled
(
structure
);
this
.
size
+=
structure
.
getWidth
().
x
;
layout
.
add
(
q
);
layout
.
add
(
new
Quadrat
(
new
Point
(
q
.
bottomLeftCorner
.
y
,
q
.
bottomLeftCorner
.
x
),
new
Point
(
q
.
topRightCorner
.
y
,
q
.
topRightCorner
.
x
)));
// gespiegeltes Quadrat
layout
.
add
(
new
Quadrat
(
new
Point
(
q
.
bottomLeftCorner
.
x
,
q
.
bottomLeftCorner
.
x
),
structure
.
getWidth
().
x
));
// Oberes rechtes Quadrat
if
((
this
.
size
-(
2
*
structure
.
getWidth
().
x
))
>
0
){
//
falls Abstand zwischen den Quadraten ist
.
if
((
this
.
size
-(
2
*
structure
.
getWidth
().
x
))
>
0
){
//
in case there is space between those quads
.
de
.
_82grfl1bif
.
kpiVisualizer
.
layouts
.
simpleSquare
.
Rectangle
rTop
=
new
de
.
_82grfl1bif
.
kpiVisualizer
.
layouts
.
simpleSquare
.
Rectangle
(
structure
.
getWidth
().
x
,(
this
.
size
-
2
*
structure
.
getWidth
().
x
),
new
Point
(
q
.
topRightCorner
.
y
,
q
.
bottomLeftCorner
.
x
));
layout
.
addAll
(
rTop
.
splitToQuads
(
rTop
));
de
.
_82grfl1bif
.
kpiVisualizer
.
layouts
.
simpleSquare
.
Rectangle
rRight
=
new
Rectangle
((
this
.
size
-
2
*
structure
.
getWidth
().
x
),
structure
.
getWidth
().
x
,
new
Point
(
q
.
bottomLeftCorner
.
x
,
q
.
topRightCorner
.
y
));
...
...
@@ -85,12 +85,12 @@ public class SimpleSquareLayout {
public
Point
getCoordinateOf
(
Structure
structure
)
throws
AttributeNotFoundException
{
for
(
Quadrat
q:
this
.
layout
)
{
if
(
q
.
get
Belegt
()){
if
(
q
.
get
Filled
()){
if
(
q
.
getStructure
().
equals
(
structure
)){
return
q
.
bottomLeftCorner
;
}
}
}
throw
new
AttributeNotFoundException
(
"
Diese S
tructure
ist nicht in der Ebene
."
);
throw
new
AttributeNotFoundException
(
"
This s
tructure
couldn't found in the hierarchy
."
);
}
}
src/main/java/de/_82grfl1bif/kpiVisualizer/layouts/treeMap/SquarifiedTreemapLayout.java
View file @
a1e80c61
...
...
@@ -25,7 +25,7 @@ public class SquarifiedTreemapLayout {
ArrayList
<
Row
>
tempRows
=
new
ArrayList
<>();
rows
.
stream
().
filter
(
r
->
r
.
rectangles
.
containsValue
(
foundations
.
get
(
foundations
.
size
()-
1
))).
forEach
(
row
->
tempRows
.
addAll
(
generateSubLayout
(
foundations
.
get
(
foundations
.
size
()-
1
),
new
Rectangle
(
foundations
.
get
(
foundations
.
size
()-
1
).
getArea
(),
row
.
getWidth
(),
row
.
space
.
getOrigin
()))));
rows
.
addAll
(
tempRows
);
//l
etztes
element
bearbeitet und ein
sub
L
ayout
dafür angelegt
.
rows
.
addAll
(
tempRows
);
//l
ast
element
processed and created a
sub
l
ayout.
ArrayList
<
Foundation
>
tempFoundations
=
new
ArrayList
<>();
for
(
Structure
s
:
foundations
.
get
(
foundations
.
size
()
-
1
).
getChildren
())
{
...
...
@@ -34,7 +34,7 @@ public class SquarifiedTreemapLayout {
}
}
foundations
.
remove
(
foundations
.
size
()-
1
);
foundations
.
addAll
(
tempFoundations
);
//all
e Kinder(nur Foundations) des letzten Elements in die Liste geschrieben und das Element entfernt
.
foundations
.
addAll
(
tempFoundations
);
//all
children(just Foundations) added and removed the Foundation
.
}
while
(!
foundations
.
isEmpty
());
}
...
...
@@ -43,11 +43,11 @@ public class SquarifiedTreemapLayout {
ArrayList
<
Row
>
result
=
new
ArrayList
<>();
result
.
add
(
new
Row
(
rectangle
));
for
(
Structure
s
:
foundation
.
getChildren
())
{
if
(!
result
.
get
(
result
.
size
()
-
1
).
checkInsert
(
s
.
getArea
()))
{
//
wenn einfügen in die bestehende Reihe das Seitenverhältnis verschlechtern würd
e.
Row
tempRow
=
new
Row
(
result
.
get
(
result
.
size
()
-
1
).
getLeftover
());
//
erzeige neue Reihe mit dem Rest des alten spaces als space
.
result
.
add
(
tempRow
);
//
füge die neue Reihe ans Ende der Sammlung ein
.
if
(!
result
.
get
(
result
.
size
()
-
1
).
checkInsert
(
s
.
getArea
()))
{
//
in case an insertion would make the ratio wors
e.
Row
tempRow
=
new
Row
(
result
.
get
(
result
.
size
()
-
1
).
getLeftover
());
//
create new Row with the remaining space of the old Row
.
result
.
add
(
tempRow
);
//
put the new Row at the end of the list
.
}
result
.
get
(
result
.
size
()
-
1
).
addRectangle
(
s
.
getArea
(),
s
);
//
füge das Kin
d in
di
e l
etzte Reihe ein, die in der List
e ist.
result
.
get
(
result
.
size
()
-
1
).
addRectangle
(
s
.
getArea
(),
s
);
//
put the chil
d in
th
e l
ast Row of th
e
l
ist.
}
return
result
;
}
...
...
src/main/java/de/_82grfl1bif/kpiVisualizer/structures/Builder.java
View file @
a1e80c61
...
...
@@ -14,7 +14,7 @@ import java.util.Objects;
import
java.util.Random
;
import
java.util.logging.Level
;
@SuppressWarnings
(
"ALL"
)
public
class
Builder
{
Server
server
;
...
...
@@ -115,43 +115,41 @@ public class Builder {
addDescription
(
s
.
getLocation
().
clone
().
add
(
0
,
s
.
getDepth
(),
0
),
s
);
setAllChildren
((
Foundation
)
s
);
}
else
{
//TODO must be revisited to draw rectangular Buildings
float
e
rst
er
Commit
=
((
Building
)
s
).
klasse
.
zeitSeitE
rst
em
Commit
.
toDays
();
float
scale
E
rst
er
Commit
;
if
((
float
)
Klasse
.
zeitSeitE
rst
em
CommitMin
.
toDays
()
==
(
float
)
Klasse
.
zeitSeitE
rst
em
CommitMax
.
toDays
()){
scale
E
rst
er
Commit
=
0
f
;
float
fi
rstCommit
=
((
Building
)
s
).
klasse
.
fi
rstCommit
Time
.
toDays
();
float
scale
Fi
rstCommit
;
if
((
float
)
Klasse
.
fi
rstCommit
Time
Min
.
toDays
()
==
(
float
)
Klasse
.
fi
rstCommit
Time
Max
.
toDays
()){
scale
Fi
rstCommit
=
0
f
;
}
else
{
scale
E
rst
er
Commit
=
((
e
rst
er
Commit
-
(
float
)
Klasse
.
zeitSeitE
rst
em
CommitMin
.
toDays
())
/
((
float
)
Klasse
.
zeitSeitE
rst
em
CommitMax
.
toDays
()
-
(
float
)
Klasse
.
zeitSeitE
rst
em
CommitMin
.
toDays
()));
scale
Fi
rstCommit
=
((
fi
rstCommit
-
(
float
)
Klasse
.
fi
rstCommit
Time
Min
.
toDays
())
/
((
float
)
Klasse
.
fi
rstCommit
Time
Max
.
toDays
()
-
(
float
)
Klasse
.
fi
rstCommit
Time
Min
.
toDays
()));
}
Duration
d
=
((
Building
)
s
).
klasse
.
zeitSeitLetzterBearbeitung
;
float
l
etzterBearbeitung
=
d
.
toDays
();
float
scaleL
etzterBearbeitung
;
if
((
float
)
Klasse
.
zeitSeitLetzterBearbeitung
Min
.
toDays
()
==
(
float
)
Klasse
.
zeitSeitLetzterBearbeitung
Max
.
toDays
()){
scaleL
etzterBearbeitung
=
0
f
;
Duration
d
=
((
Building
)
s
).
klasse
.
lastEditingTime
;
float
l
astCommit
=
d
.
toDays
();
float
scaleL
astCommit
;
if
((
float
)
Klasse
.
lastEditingTime
Min
.
toDays
()
==
(
float
)
Klasse
.
lastEditingTime
Max
.
toDays
()){
scaleL
astCommit
=
0
f
;
}
else
{
scaleL
etzterBearbeitung
=
((
letzterBearbeitung
-
(
float
)
Klasse
.
zeitSeitLetzterBearbeitung
Min
.
toDays
())
/
((
float
)
Klasse
.
zeitSeitLetzterBearbeitung
Max
.
toDays
()
-
(
float
)
Klasse
.
zeitSeitLetzterBearbeitung
Min
.
toDays
()));
scaleL
astCommit
=
((
lastCommit
-
(
float
)
Klasse
.
lastEditingTime
Min
.
toDays
())
/
((
float
)
Klasse
.
lastEditingTime
Max
.
toDays
()
-
(
float
)
Klasse
.
lastEditingTime
Min
.
toDays
()));
}
Material
facadeMaterial
;
if
(
scale
E
rst
er
Commit
<
0.10
){
if
(
scale
Fi
rstCommit
<
0.10
){
facadeMaterial
=
Material
.
WAXED_COPPER_BLOCK
;
}
else
if
(
scale
E
rst
er
Commit
<
0.5
){
}
else
if
(
scale
Fi
rstCommit
<
0.5
){
facadeMaterial
=
Material
.
WAXED_EXPOSED_COPPER
;
}
else
if
(
scale
E
rst
er
Commit
<
0.90
){
}
else
if
(
scale
Fi
rstCommit
<
0.90
){
facadeMaterial
=
Material
.
WAXED_WEATHERED_COPPER
;
}
else
{
facadeMaterial
=
Material
.
WAXED_OXIDIZED_COPPER
;
}
Material
facadeInnerMaterial
;
if
(
scaleL
etzterBearbeitung
<
0.10
){
if
(
scaleL
astCommit
<
0.10
){
facadeInnerMaterial
=
Material
.
WHITE_STAINED_GLASS
;
}
else
if
(
scaleL
etzterBearbeitung
<
0.5
){
}
else
if
(
scaleL
astCommit
<
0.5
){
facadeInnerMaterial
=
Material
.
GLASS
;
}
else
if
(
scaleL
etzterBearbeitung
<
0.90
){
}
else
if
(
scaleL
astCommit
<
0.90
){
facadeInnerMaterial
=
Material
.
BLUE_STAINED_GLASS
;
}
else
{
facadeInnerMaterial
=
Material
.
IRON_BARS
;
}
//System.out.println(letzterBearbeitung);
//System.out.println(scaleLetzterBearbeitung);
this
.
buildBuilding
(
s
.
getLocation
().
clone
().
add
(
1
,
s
.
getDepth
()
+
1
,
1
),
s
.
getWidth
().
x
-
2
,
((
Building
)
s
).
getHeight
()+
1
,
...
...
@@ -208,9 +206,7 @@ public class Builder {
private
void
addDescription
(
Location
startLocation
,
Structure
structure
)
{
if
(
structure
.
getClass
()
==
Foundation
.
class
)
{
//if (!((Foundation) structure).getChildren().stream().anyMatch(s -> s.getClass() == Foundation.class)) {//no foundation in Children
setFoundationSing
(
startLocation
,(
Foundation
)
structure
);
//}
}
else
{
setWallSing
(
startLocation
,
(
Building
)
structure
,
BlockFace
.
NORTH
);
setWallSing
(
startLocation
,
(
Building
)
structure
,
BlockFace
.
EAST
);
...
...
src/main/java/de/_82grfl1bif/kpiVisualizer/structures/Building.java
View file @
a1e80c61
...
...
@@ -16,7 +16,7 @@ public class Building extends Structure{
this
.
height
=
height
;
this
.
material
=
material
;
if
(
this
.
width
.
x
<
5
){
throw
new
IllegalArgumentException
(
"
keine Gebäude kleiner 5 wegen 2 Gehweg
"
);
throw
new
IllegalArgumentException
(
"
no buildings smaller than 5
"
);
}
}
...
...
@@ -28,7 +28,7 @@ public class Building extends Structure{
this
.
name
=
name
;
this
.
height
=
klasse
.
functions
;
if
(
this
.
width
.
x
<
5
||
this
.
width
.
y
<
5
){
throw
new
IllegalArgumentException
(
"
keine Gebäude kleiner 5 wegen 2 Gehweg
"
);
throw
new
IllegalArgumentException
(
"
no buildings smaller than 5
"
);
}
}
...
...
src/main/java/de/_82grfl1bif/kpiVisualizer/structures/Foundation.java
View file @
a1e80c61
...
...
@@ -220,7 +220,6 @@ public class Foundation extends Structure {
allFoundations
.
sort
(
new
DepthComparator
());
Collections
.
reverse
(
allFoundations
);
//higher Depths first
for
(
Foundation
f
:
allFoundations
)
{
//if(!this.equals(f))
f
.
organizeFoundation
();
}
}
else
{
//normal Call and recursion
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment