Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
af3
kernel
Commits
c9cee5c6
Commit
c9cee5c6
authored
8 years ago
by
Johannes Eder
Browse files
Options
Downloads
Patches
Plain Diff
deployment synthesis results can now be visualized in a spider chart
refs 2530
parent
059a1160
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.fortiss.tooling.spiderchart.ui/trunk/src/org/fortiss/tooling/spiderchart/util/ChartUtil.java
+12
-9
12 additions, 9 deletions
...k/src/org/fortiss/tooling/spiderchart/util/ChartUtil.java
with
12 additions
and
9 deletions
org.fortiss.tooling.spiderchart.ui/trunk/src/org/fortiss/tooling/spiderchart/util/ChartUtil.java
+
12
−
9
View file @
c9cee5c6
...
...
@@ -31,11 +31,10 @@ public final class ChartUtil {
/**
* Returns the array of string represented constants of any Enum
*/
public
static
<
E
extends
Enum
<
E
>>
List
<
String
>
enumConstants
(
final
Class
<
E
>
value
)
{
public
static
<
E
extends
Enum
<
E
>>
List
<
String
>
enumConstants
(
final
Class
<
E
>
value
)
{
final
String
[]
constants
=
new
String
[
value
.
getEnumConstants
().
length
];
int
i
=
0
;
for
(
final
Enum
<
E
>
enumVal
:
value
.
getEnumConstants
())
{
for
(
final
Enum
<
E
>
enumVal
:
value
.
getEnumConstants
())
{
constants
[
i
++]
=
enumVal
.
name
();
}
return
Arrays
.
asList
(
constants
);
...
...
@@ -44,7 +43,7 @@ public final class ChartUtil {
/** Returns the primitive double array from wrapper double array */
public
static
double
[]
toDoublePrimitiveArray
(
final
Double
[]
wrappedArray
)
{
final
double
[]
array
=
new
double
[
wrappedArray
.
length
];
for
(
int
i
=
0
;
i
<
wrappedArray
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
wrappedArray
.
length
;
i
++)
{
array
[
i
]
=
wrappedArray
[
i
].
intValue
();
}
return
array
;
...
...
@@ -57,12 +56,16 @@ public final class ChartUtil {
final
double
[]
wrappedValues
=
new
double
[
values
.
length
];
int
i
=
0
;
for
(
final
Object
value
:
values
)
{
if
(
value
instanceof
Double
)
{
wrappedValues
[
i
++]
=
(
double
)
value
;
for
(
final
Object
value
:
values
)
{
if
(
value
instanceof
Double
||
value
instanceof
Integer
)
{
wrappedValues
[
i
++]
=
(
double
)
value
;
}
if
(
value
instanceof
Enum
<?>)
{
final
Enum
<?>
enumConst
=
(
Enum
<?>)
value
;
if
(
value
instanceof
Long
)
{
Long
l
=
new
Long
((
long
)
value
);
wrappedValues
[
i
++]
=
l
.
doubleValue
();
}
if
(
value
instanceof
Enum
<?>)
{
final
Enum
<?>
enumConst
=
(
Enum
<?>)
value
;
wrappedValues
[
i
++]
=
enumConst
.
ordinal
()
+
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment