Skip to content
Snippets Groups Projects
Commit 90429dbd authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Replaced the kieker-jar with a newer version; Made sure that the model mapping...

Replaced the kieker-jar with a newer version; Made sure that the model mapping is stored within the analysis controller bean.
parent 09cd500c
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -21,13 +21,18 @@ package kieker.webgui.beans.session;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import kieker.analysis.AnalysisController;
import kieker.analysis.exception.AnalysisConfigurationException;
import kieker.analysis.model.analysisMetaModel.MIPlugin;
import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.analysis.model.analysisMetaModel.MIRepository;
import kieker.analysis.plugin.AbstractPlugin;
import kieker.analysis.repository.AbstractRepository;
import kieker.common.logging.Log;
import kieker.common.logging.LogFactory;
import kieker.common.logging.LogImplWebguiLogging;
......@@ -50,6 +55,8 @@ public class AnalysisControllerBean {
* The controller instance stored within this bean.
*/
private AnalysisController controller;
private HashMap<MIPlugin, AbstractPlugin> pluginMap;
private HashMap<MIRepository, AbstractRepository> repositoryMap;
/**
* Creates a new instance of this class.
......@@ -86,17 +93,12 @@ public class AnalysisControllerBean {
public void instantiate(final MIProject mProject) {
if (mProject != null) {
try {
// Create a temporary file and store the model instance in it.
final File tempFile = File.createTempFile("java", ".tmp");
AnalysisController.saveToFile(tempFile, mProject);
// Try to create the controller.
this.controller = new AnalysisController(tempFile, PluginClassLoader.getInstance());
// Don't forget to remove the temporary file.
if (!tempFile.delete()) {
AnalysisControllerBean.LOG.warn("Could not remove temporary file.");
}
} catch (final IOException ex) {
AnalysisControllerBean.LOG.error("Could not create analysis controller.", ex);
final AnalysisController.AnalysisControllerWithMapping controllerAndMapping = AnalysisController.createAnalysisController(mProject, PluginClassLoader.getInstance());
// Extract everything that is necessary.
this.controller = controllerAndMapping.getController();
this.pluginMap = controllerAndMapping.getPluginMap();
this.repositoryMap = controllerAndMapping.getRepositoryMap();
} catch (final NullPointerException ex) {
AnalysisControllerBean.LOG.error("Could not create analysis controller.", ex);
} catch (final AnalysisConfigurationException ex) {
......
......@@ -153,7 +153,7 @@
</p:column>
<p:column headerText="Value" style="width:125px">
<p:cellEditor >
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{property.value}" rendered="#{not stringBean.checkString(property)}"/>
<h:outputText value="#{selectedPluginBean.plugin.name}" rendered="#{stringBean.checkString(property)}"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment