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

Minor modifications for quality reasons; Updated the kieker-jar

parent 052ac553
No related branches found
No related tags found
No related merge requests found
<FindBugsFilter> <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> </FindBugsFilter>
\ No newline at end of file
No preview for this file type
...@@ -262,7 +262,7 @@ ...@@ -262,7 +262,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId> <artifactId>maven-checkstyle-plugin</artifactId>
<version>2.9</version> <version>2.9.1</version>
<configuration> <configuration>
<configLocation>config/quality-config/cs-conf.xml</configLocation> <configLocation>config/quality-config/cs-conf.xml</configLocation>
</configuration> </configuration>
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId> <artifactId>maven-pmd-plugin</artifactId>
<version>2.7</version> <version>2.7.1</version>
<configuration> <configuration>
<rulesets> <rulesets>
<ruleset> <ruleset>
......
...@@ -1029,14 +1029,35 @@ public final class CurrentWorkSpaceProjectBean { ...@@ -1029,14 +1029,35 @@ public final class CurrentWorkSpaceProjectBean {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(severity, "", msg)); 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) { public int getPluginID(final MIPlugin plugin) {
return this.pluginMap.get(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) { public int getRepositoryID(final MIRepository repository) {
return this.repositoryMap.get(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) { public int getPortID(final MIPort port) {
return this.portMap.get(port); return this.portMap.get(port);
} }
......
...@@ -203,20 +203,9 @@ public final class ACManager { // NOCS (Class Data Abstraction Coupling) ...@@ -203,20 +203,9 @@ public final class ACManager { // NOCS (Class Data Abstraction Coupling)
final AnalysisControllerWithMapping controller = AnalysisController.createAnalysisController(modelProject, classLoader); final AnalysisControllerWithMapping controller = AnalysisController.createAnalysisController(modelProject, classLoader);
// Create the necessary threads for the analysis // Create the necessary threads for the analysis
final Thread runningThread = new Thread() { final Thread runningThread = new ControllerRunningThread(controller);
@Override runningThread.start();
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 UpdateDisplaysThread displayThread = new UpdateDisplaysThread(controller.getPluginMap(), modelProject); final UpdateDisplaysThread displayThread = new UpdateDisplaysThread(controller.getPluginMap(), modelProject);
// Put everything into our container // Put everything into our container
newController.setFst(controller.getController()); newController.setFst(controller.getController());
...@@ -308,6 +297,40 @@ public final class ACManager { // NOCS (Class Data Abstraction Coupling) ...@@ -308,6 +297,40 @@ public final class ACManager { // NOCS (Class Data Abstraction Coupling)
return result; 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 * 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. * thread is being called, it will be terminated.
......
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