diff --git a/Kieker.WebGUI/lib/kieker-1.5-SNAPSHOT.jar b/Kieker.WebGUI/lib/kieker-1.5-SNAPSHOT.jar index bbf0160287027f47194aa0881d03837987e060b9..d9e9232a10df7d5afcab7041813eed0a78218ce1 100644 Binary files a/Kieker.WebGUI/lib/kieker-1.5-SNAPSHOT.jar and b/Kieker.WebGUI/lib/kieker-1.5-SNAPSHOT.jar differ diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/AnalysisControllerBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/AnalysisControllerBean.java index 27fa01575ab309887b836afe420ee94c26b64d88..39fa77cd0a180b47d0b6415c8a46799ece09ad3e 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/AnalysisControllerBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/AnalysisControllerBean.java @@ -21,11 +21,15 @@ package kieker.webgui.beans.session; import java.io.File; import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import kieker.analysis.AnalysisController; +import kieker.analysis.exception.AnalysisConfigurationException; import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.common.logging.Log; import kieker.common.logging.LogFactory; @@ -98,6 +102,8 @@ public class AnalysisControllerBean { AnalysisControllerBean.LOG.error("Could not create analysis controller.", ex); } catch (final NullPointerException ex) { AnalysisControllerBean.LOG.error("Could not create analysis controller.", ex); + } catch (final AnalysisConfigurationException ex) { + AnalysisControllerBean.LOG.error("Could not create analysis controller.", ex); } } } @@ -109,7 +115,13 @@ public class AnalysisControllerBean { final Thread thread = new Thread() { @Override public void run() { - AnalysisControllerBean.this.controller.run(); + try { + AnalysisControllerBean.this.controller.run(); + } catch (final IllegalStateException ex) { + AnalysisControllerBean.LOG.error("Could not start the analysis controller.", ex); + } catch (final AnalysisConfigurationException ex) { + AnalysisControllerBean.LOG.error("Could not start the analysis controller.", ex); + } } }; thread.start(); diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/SelectedMainProjectBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/SelectedMainProjectBean.java index 326a18da25f72b6d24377fc47404e120c5c1a48a..f9e4ffc6804fc6db3d984104df457dab93d73fe5 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/SelectedMainProjectBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/SelectedMainProjectBean.java @@ -36,8 +36,8 @@ import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import javax.faces.context.FacesContext; -import kieker.analysis.model.analysisMetaModel.MIAnalysisPlugin; import kieker.analysis.model.analysisMetaModel.MIDependency; +import kieker.analysis.model.analysisMetaModel.MIFilter; import kieker.analysis.model.analysisMetaModel.MIInputPort; import kieker.analysis.model.analysisMetaModel.MIOutputPort; import kieker.analysis.model.analysisMetaModel.MIPlugin; @@ -57,7 +57,6 @@ import kieker.webgui.common.PluginClassLoader; import kieker.webgui.common.PluginFinder; import org.eclipse.emf.common.util.EList; -import org.primefaces.event.DragDropEvent; /** * This session bean stores the currently selected main project of the user and provides different methods to access and manipulate the properties of this project. @@ -286,11 +285,11 @@ public class SelectedMainProjectBean { final MAnalysisMetaModelFactory factory = new MAnalysisMetaModelFactory(); - if (mPlugin instanceof MIAnalysisPlugin) { + if (mPlugin instanceof MIFilter) { for (final String inputPortName : inputPortNames) { final MIInputPort mInputPort = factory.createInputPort(); mInputPort.setName(inputPortName); - mInputPort.setParent((MIAnalysisPlugin) mPlugin); + mInputPort.setParent((MIFilter) mPlugin); } } @@ -317,7 +316,7 @@ public class SelectedMainProjectBean { if (AbstractReaderPlugin.class.isAssignableFrom(pluginClass)) { mPlugin = factory.createReader(); } else { - mPlugin = factory.createAnalysisPlugin(); + mPlugin = factory.createFilter(); } mPlugin.setClassname(pluginClass.getCanonicalName()); diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/FileManager.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/FileManager.java index 5d7eac783cf07e28d9e06fbc627ebf4426f70999..5ed7d01e8eaa8554d5809b194cd267390105026a 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/FileManager.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/FileManager.java @@ -31,6 +31,7 @@ import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext; import kieker.analysis.AnalysisController; +import kieker.analysis.exception.AnalysisConfigurationException; import kieker.analysis.model.analysisMetaModel.MIDependency; import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory; @@ -142,10 +143,17 @@ public final class FileManager { final File fileProject = new File(dirProject, projectName + FileManager.EXTENSION); try { final AnalysisController controller = new AnalysisController(project, PluginClassLoader.getInstance()); - if (controller.saveToFile(fileProject)) { + try { + controller.saveToFile(fileProject); FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "", "Project saved: " + project.getName())); return true; + } catch (final IOException ex) { + FileManager.LOG.error("Could not save project '" + projectName + "'.", ex); + } catch (final AnalysisConfigurationException ex) { + FileManager.LOG.error("Could not save project '" + projectName + "'.", ex); } + } catch (final AnalysisConfigurationException ex) { + FileManager.LOG.error("Could not save project '" + projectName + "'.", ex); } catch (final NullPointerException ex) { FileManager.LOG.error("Could not save project '" + projectName + "'.", ex); } @@ -205,9 +213,12 @@ public final class FileManager { /* * Try to load the project. */ - final MIProject project = AnalysisController.loadFromFile(projectFile); - if (project != null) { + MIProject project; + try { + project = AnalysisController.loadFromFile(projectFile); resultList.add(project); + } catch (final IOException ex) { + FileManager.LOG.error("Could not load project.", ex); } } } @@ -365,7 +376,11 @@ public final class FileManager { final File projectFile = new File(FileManager.PROJECT_DIR + File.separator + projectName + File.separator + projectName + FileManager.EXTENSION); synchronized (this) { if (projectFile.isFile()) { - return AnalysisController.loadFromFile(projectFile); + try { + return AnalysisController.loadFromFile(projectFile); + } catch (final IOException ex) { + FileManager.LOG.error("Could not load project.", ex); + } } } return null; diff --git a/Kieker.WebGUI/src/main/webapp/handleAnalysis.xhtml b/Kieker.WebGUI/src/main/webapp/handleAnalysis.xhtml index 32ce4d6a37a2586c55b17b7c799fa3c054b2d4e9..f13d15b677fdc7db94a6938c5f7cfc38a8aff92f 100644 --- a/Kieker.WebGUI/src/main/webapp/handleAnalysis.xhtml +++ b/Kieker.WebGUI/src/main/webapp/handleAnalysis.xhtml @@ -64,7 +64,6 @@ </c:choose> <p:poll interval="2" update=":analysisForm:analysisStateText :analysisForm:startAnalysisButton :analysisForm:stopAnalysisButton"/> </h:form> - </p:layoutUnit> </c:otherwise>