diff --git a/Kieker.WebGUI/config/quality-config/fb-filter.xml b/Kieker.WebGUI/config/quality-config/fb-filter.xml index 127085de5c2d10a49d0fe465771849f1418dd591..ddc47ee1612eb0114c9777883fc06c2d487ea82a 100644 --- a/Kieker.WebGUI/config/quality-config/fb-filter.xml +++ b/Kieker.WebGUI/config/quality-config/fb-filter.xml @@ -1,4 +1,7 @@ <FindBugsFilter> - <!-- Example: http://findbugs.sourceforge.net/manual/filter.html#d0e2103 --> - + <Match> + <Class name="kieker.webgui.common.FSManager" /> + <Method name="getClassLoader"/> + <Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON" /> + </Match> </FindBugsFilter> \ No newline at end of file diff --git a/Kieker.WebGUI/lib/kieker-1.6-SNAPSHOT_emf.jar b/Kieker.WebGUI/lib/kieker-1.6-SNAPSHOT_emf.jar index ee878afdebfc6da0433f38bbfe1bbb469f026590..a22e9259ac09ea61734a8572dcb7a5ffb51ed708 100644 Binary files a/Kieker.WebGUI/lib/kieker-1.6-SNAPSHOT_emf.jar and b/Kieker.WebGUI/lib/kieker-1.6-SNAPSHOT_emf.jar differ diff --git a/Kieker.WebGUI/pom.xml b/Kieker.WebGUI/pom.xml index 6ec6c8963f91f848effde8d3eff334acd2efb26e..8bbd6c696206530c079e045c7f44992695d21372 100644 --- a/Kieker.WebGUI/pom.xml +++ b/Kieker.WebGUI/pom.xml @@ -262,7 +262,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> - <version>2.9</version> + <version>2.9.1</version> <configuration> <configLocation>config/quality-config/cs-conf.xml</configLocation> </configuration> @@ -296,7 +296,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> - <version>2.7</version> + <version>2.7.1</version> <configuration> <rulesets> <ruleset> diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentWorkSpaceProjectBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentWorkSpaceProjectBean.java index 66cfc5df3a2f579d7b1dbc8880868e9c69ae62a3..5dec3d437ae6cd9dea6184281f6d316b74e13a71 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentWorkSpaceProjectBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentWorkSpaceProjectBean.java @@ -1029,14 +1029,35 @@ public final class CurrentWorkSpaceProjectBean { FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(severity, "", msg)); } + /** + * Delivers the id which the plugin has in the plugin map of this bean. + * + * @param plugin + * The plugin whose id should be delivered. + * @return The id of the plugin. + */ public int getPluginID(final MIPlugin plugin) { return this.pluginMap.get(plugin); } + /** + * Delivers the id which the repository has in the repository map of this bean. + * + * @param repository + * The repository whose id should be delivered. + * @return The id of the repository. + */ public int getRepositoryID(final MIRepository repository) { return this.repositoryMap.get(repository); } + /** + * Delivers the id which the port has in the port map of this bean. + * + * @param port + * The port whose id should be delivered. + * @return The id of the port. + */ public int getPortID(final MIPort port) { return this.portMap.get(port); } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java index 2634ce703dbcb55ea940f164c059c68fc41c6a04..aa73666d729e88c9587786efaa0a7e194b8fde36 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java @@ -203,20 +203,9 @@ public final class ACManager { // NOCS (Class Data Abstraction Coupling) final AnalysisControllerWithMapping controller = AnalysisController.createAnalysisController(modelProject, classLoader); // Create the necessary threads for the analysis - final Thread runningThread = new Thread() { - @Override - public void run() { - try { - controller.getController().run(); - } catch (final IllegalStateException ex) { - ACManager.LOG.error("An error occured while starting the analysis.", ex); - ex.printStackTrace(); - } catch (final AnalysisConfigurationException ex) { - ACManager.LOG.error("An error occured while starting the analysis.", ex); - ex.printStackTrace(); - } - } - }; + final Thread runningThread = new ControllerRunningThread(controller); + runningThread.start(); + final UpdateDisplaysThread displayThread = new UpdateDisplaysThread(controller.getPluginMap(), modelProject); // Put everything into our container newController.setFst(controller.getController()); @@ -308,6 +297,40 @@ public final class ACManager { // NOCS (Class Data Abstraction Coupling) return result; } + /** + * This helper thread is responsible for running an instance of {@link AnalysisControllerWithMapping}. + * + * @author Nils Christian Ehmke + * @version 1.0 + */ + private static class ControllerRunningThread extends Thread { + /** + * The controller managed by this thread. + */ + private final AnalysisControllerWithMapping controller; + + /** + * Default constructor. + * + * @param controller + * The controller to be managed by this thread. + */ + public ControllerRunningThread(final AnalysisControllerWithMapping controller) { + this.controller = controller; + } + + @Override + public void run() { + try { + this.controller.getController().run(); + } catch (final IllegalStateException ex) { + ACManager.LOG.error("An error occured while starting the analysis.", ex); + } catch (final AnalysisConfigurationException ex) { + ACManager.LOG.error("An error occured while starting the analysis.", ex); + } + } + } + /** * This helper thread is used to update the available displays of the given analysis at regular intervals. <b>Important:</b> If the interrupt-method of the * thread is being called, it will be terminated.