Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WebGUI
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kieker
WebGUI
Commits
c63f4227
Commit
c63f4227
authored
12 years ago
by
Nils Christian Ehmke
Browse files
Options
Downloads
Patches
Plain Diff
#622
parent
d08754d7
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
Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentAnalysisEditorBean.java
+43
-31
43 additions, 31 deletions
...a/kieker/webgui/beans/view/CurrentAnalysisEditorBean.java
with
43 additions
and
31 deletions
Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentAnalysisEditorBean.java
+
43
−
31
View file @
c63f4227
...
...
@@ -879,17 +879,23 @@ public final class CurrentAnalysisEditorBean {
* The class of the repository to be added.
*/
public
void
addRepository
(
final
Class
<
AbstractRepository
>
clazz
)
{
// Create a new instance for the model
final
MIRepository
repository
=
this
.
factory
.
createRepository
();
repository
.
setClassname
(
clazz
.
getName
());
repository
.
setName
(
clazz
.
getSimpleName
());
try
{
// Create a new instance for the model
final
MIRepository
repository
=
this
.
factory
.
createRepository
();
repository
.
setClassname
(
clazz
.
getName
());
repository
.
setName
(
clazz
.
getSimpleName
());
this
.
fillProperties
(
clazz
,
repository
);
synchronized
(
this
)
{
// Add it to the project - and to the graph
this
.
project
.
getRepositories
().
add
(
repository
);
this
.
currentAnalysisEditorGraphBean
.
addRepository
(
repository
);
this
.
currentAnalysisEditorGraphBean
.
refreshGraph
();
this
.
fillProperties
(
clazz
,
repository
);
synchronized
(
this
)
{
// Add it to the project - and to the graph
this
.
project
.
getRepositories
().
add
(
repository
);
this
.
currentAnalysisEditorGraphBean
.
addRepository
(
repository
);
this
.
currentAnalysisEditorGraphBean
.
refreshGraph
();
}
}
catch
(
final
NoClassDefFoundError
ex
)
{
// This exception can occur if (for example) a class is missing
CurrentAnalysisEditorBean
.
showMessage
(
FacesMessage
.
SEVERITY_ERROR
,
"An error occured during the creation of the repository. Check the dependencies."
);
CurrentAnalysisEditorBean
.
LOG
.
error
(
"An error occured during the creation of the repository. Check the dependencies."
,
ex
);
}
}
...
...
@@ -900,31 +906,37 @@ public final class CurrentAnalysisEditorBean {
* The class of the plugin to be added. This can be both, a filter or a reader.
*/
public
void
addPlugin
(
final
Class
<
AbstractPlugin
>
clazz
)
{
// Create a new instance for the model
final
MIPlugin
plugin
;
if
(
this
.
classAndMethodContainer
.
getAbstractReaderPluginClass
().
isAssignableFrom
(
clazz
))
{
plugin
=
this
.
factory
.
createReader
();
}
else
{
plugin
=
this
.
factory
.
createFilter
();
}
plugin
.
setClassname
(
clazz
.
getName
());
plugin
.
setName
(
clazz
.
getSimpleName
());
try
{
// Create a new instance for the model
final
MIPlugin
plugin
;
if
(
this
.
classAndMethodContainer
.
getAbstractReaderPluginClass
().
isAssignableFrom
(
clazz
))
{
plugin
=
this
.
factory
.
createReader
();
}
else
{
plugin
=
this
.
factory
.
createFilter
();
}
plugin
.
setClassname
(
clazz
.
getName
());
plugin
.
setName
(
clazz
.
getSimpleName
());
this
.
fillProperties
(
clazz
,
plugin
);
this
.
fillPorts
(
clazz
,
plugin
);
this
.
fillDisplays
(
clazz
,
plugin
);
this
.
fillProperties
(
clazz
,
plugin
);
this
.
fillPorts
(
clazz
,
plugin
);
this
.
fillDisplays
(
clazz
,
plugin
);
synchronized
(
this
)
{
// Add it to the project
this
.
project
.
getPlugins
().
add
(
plugin
);
synchronized
(
this
)
{
// Add it to the project
this
.
project
.
getPlugins
().
add
(
plugin
);
// Add the element to the graph
if
(
plugin
instanceof
MIReader
)
{
this
.
currentAnalysisEditorGraphBean
.
addReader
((
MIReader
)
plugin
);
}
else
{
this
.
currentAnalysisEditorGraphBean
.
addFilter
((
MIFilter
)
plugin
);
// Add the element to the graph
if
(
plugin
instanceof
MIReader
)
{
this
.
currentAnalysisEditorGraphBean
.
addReader
((
MIReader
)
plugin
);
}
else
{
this
.
currentAnalysisEditorGraphBean
.
addFilter
((
MIFilter
)
plugin
);
}
this
.
currentAnalysisEditorGraphBean
.
refreshGraph
();
}
this
.
currentAnalysisEditorGraphBean
.
refreshGraph
();
}
catch
(
final
NoClassDefFoundError
ex
)
{
// This exception can occur if (for example) a class is missing
CurrentAnalysisEditorBean
.
showMessage
(
FacesMessage
.
SEVERITY_ERROR
,
"An error occured during the creation of the plugin. Check the dependencies."
);
CurrentAnalysisEditorBean
.
LOG
.
error
(
"An error occured during the creation of the plugin. Check the dependencies."
,
ex
);
}
}
...
...
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