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

Updated the kieker-jar; Updated primefaces (3.4.1 -> 3.4.2); Used the new...

Updated the kieker-jar; Updated primefaces (3.4.1 -> 3.4.2); Used the new AnalysisComponent within the code
parent c5297a1d
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -147,7 +147,7 @@
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.4.1</version>
<version>3.4.2</version>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
......
......@@ -57,6 +57,7 @@ import org.springframework.util.WeakReferenceMonitor.ReleaseListener;
import com.google.common.io.Files;
import kieker.analysis.AnalysisController;
import kieker.analysis.model.analysisMetaModel.MIAnalysisComponent;
import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory;
import kieker.analysis.model.analysisMetaModel.MIDisplay;
import kieker.analysis.model.analysisMetaModel.MIFilter;
......@@ -86,8 +87,6 @@ import kieker.webgui.persistence.impl.util.PluginFinder;
import org.primefaces.model.UploadedFile;
import org.eclipse.emf.ecore.EObject;
/**
* This is an implementation of the {@link IProjectDAO} interface, which uses the file system to store the available projects and everything.
*
......@@ -487,7 +486,7 @@ public class FSProjectDAOImpl implements IProjectDAO, ReleaseListener {
* @throws ComponentInitializationException
* If the properties could not be loaded.
*/
private static void fillProperties(final Class<?> clazz, final EObject component, final ClassAndMethodContainer classAndMethodContainer,
private static void fillProperties(final Class<?> clazz, final MIAnalysisComponent component, final ClassAndMethodContainer classAndMethodContainer,
final Map<String, String> propertyDescriptions) throws ComponentInitializationException {
try {
// Get the default configuration and use it to initialize the model repository
......
......@@ -29,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import kieker.analysis.model.analysisMetaModel.MIAnalysisComponent;
import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory;
import kieker.analysis.model.analysisMetaModel.MIDependency;
import kieker.analysis.model.analysisMetaModel.MIFilter;
......@@ -59,8 +60,6 @@ import org.primefaces.context.RequestContext;
import org.primefaces.event.FileUploadEvent;
import org.primefaces.model.UploadedFile;
import org.eclipse.emf.ecore.EObject;
/**
* The {@link CurrentAnalysisEditorBean} contains the necessary data behind an instance of the analysis editor. It provides various methods to manipulate the current
* project, as the analysis editor is the most important part of the whole application. The connection to the graph within the editor is done via another bean (the
......@@ -78,7 +77,7 @@ public final class CurrentAnalysisEditorBean {
private static final MIAnalysisMetaModelFactory FACTORY = MAnalysisMetaModelFactory.eINSTANCE;
private ComponentListContainer availableComponents;
private EObject selectedComponent;
private MIAnalysisComponent selectedComponent;
private MIProject project;
private String projectName;
private long timeStamp;
......@@ -274,7 +273,7 @@ public final class CurrentAnalysisEditorBean {
*
* @return The currently selected plugin or repository.
*/
public synchronized EObject getSelectedPlugin() {
public synchronized MIAnalysisComponent getSelectedPlugin() {
return this.selectedComponent;
}
......@@ -394,7 +393,7 @@ public final class CurrentAnalysisEditorBean {
* The property name.
* @return A human readable description and a substitution if there is no description.
*/
public synchronized String getDescription(final EObject component, final String property) {
public synchronized String getDescription(final MIAnalysisComponent component, final String property) {
IComponentContainer container = null;
// Find the container which contains the component
......@@ -519,7 +518,7 @@ public final class CurrentAnalysisEditorBean {
* @param node
* The new node to be selected.
*/
public synchronized void nodeSelected(final EObject node) {
public synchronized void nodeSelected(final MIAnalysisComponent node) {
this.selectedComponent = node;
}
......@@ -529,7 +528,7 @@ public final class CurrentAnalysisEditorBean {
* @param node
* The new node to be removed.
*/
public synchronized void nodeRemoved(final EObject node) {
public synchronized void nodeRemoved(final MIAnalysisComponent node) {
// Remove the component from the project
if (node instanceof MIPlugin) {
this.project.getPlugins().remove(node);
......
......@@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import kieker.analysis.model.analysisMetaModel.MIAnalysisComponent;
import kieker.analysis.model.analysisMetaModel.MIFilter;
import kieker.analysis.model.analysisMetaModel.MIInputPort;
import kieker.analysis.model.analysisMetaModel.MIOutputPort;
......@@ -43,7 +44,6 @@ import kieker.webgui.web.beans.session.UserBean;
import org.primefaces.context.RequestContext;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* The {@link CurrentAnalysisEditorGraphBean} contains the necessary data behind an graph of the analysis editor. It provides various methods to manipulate the
......@@ -107,7 +107,9 @@ public final class CurrentAnalysisEditorGraphBean {
private static final Object REPOSITORY_INPUT_PORT = "R";
private final Registry<EObject> componentMap = new Registry<EObject>();
private final Registry<MIRepositoryConnector> repositoryPortMap = new Registry<MIRepositoryConnector>();
private final Registry<MIPort> portMap = new Registry<MIPort>();
private final Registry<MIAnalysisComponent> componentMap = new Registry<MIAnalysisComponent>();
private CurrentAnalysisEditorBean currentAnalysisEditorBean;
private boolean gridEnabled = false;
......@@ -280,7 +282,7 @@ public final class CurrentAnalysisEditorGraphBean {
}
builder.append(String.format(CurrentAnalysisEditorGraphBean.JS_CMD_PORT, CurrentAnalysisEditorGraphBean.simpleEscape(port.getName()),
this.componentMap.get(port), CurrentAnalysisEditorGraphBean.simpleEscape(port.getName())));
this.portMap.get(port), CurrentAnalysisEditorGraphBean.simpleEscape(port.getName())));
}
return builder.toString();
......@@ -306,7 +308,7 @@ public final class CurrentAnalysisEditorGraphBean {
}
builder.append(String.format(CurrentAnalysisEditorGraphBean.JS_CMD_PORT, CurrentAnalysisEditorGraphBean.simpleEscape(port.getName()),
this.componentMap.get(port), CurrentAnalysisEditorGraphBean.simpleEscape(port.getName())));
this.repositoryPortMap.get(port), CurrentAnalysisEditorGraphBean.simpleEscape(port.getName())));
}
return builder.toString();
......@@ -344,7 +346,7 @@ public final class CurrentAnalysisEditorGraphBean {
* @return The ID for the port within the graph
*/
private synchronized String assembleGraphPortID(final MIPlugin plugin, final MIPort port) {
return this.componentMap.get(plugin) + "." + this.componentMap.get(port);
return this.componentMap.get(plugin) + "." + this.portMap.get(port);
}
/**
......@@ -357,7 +359,7 @@ public final class CurrentAnalysisEditorGraphBean {
* @return The ID for the port within the graph
*/
private synchronized Object assembleGraphPortID(final MIPlugin plugin, final MIRepositoryConnector port) {
return this.componentMap.get(plugin) + "." + this.componentMap.get(port);
return this.componentMap.get(plugin) + "." + this.repositoryPortMap.get(port);
}
/**
......@@ -378,23 +380,10 @@ public final class CurrentAnalysisEditorGraphBean {
* The component whose ID should be delivered.
* @return A human readable ID.
*/
private synchronized String assembleGraphString(final EObject component) {
final String name;
final String className;
final String shortName;
// Extract the names
if (component instanceof MIPlugin) {
className = ((MIPlugin) component).getClassname();
name = ((MIPlugin) component).getName();
} else if (component instanceof MIRepository) {
className = ((MIRepository) component).getClassname();
name = ((MIRepository) component).getName();
} else {
// This should not happen
return "";
}
shortName = className.substring(className.lastIndexOf('.') + 1);
private synchronized String assembleGraphString(final MIAnalysisComponent component) {
final String name = component.getName();
final String className = component.getClassname();
final String shortName = className.substring(className.lastIndexOf('.') + 1);
return String.format(CurrentAnalysisEditorGraphBean.JS_CMD_NODE, this.componentMap.get(component),
CurrentAnalysisEditorGraphBean.simpleEscape(name), CurrentAnalysisEditorGraphBean.simpleEscape(shortName),
......@@ -412,7 +401,7 @@ public final class CurrentAnalysisEditorGraphBean {
// Now search the correct node
try {
final EObject selectedNode = this.componentMap.get(Integer.parseInt(clickedNodeID));
final MIAnalysisComponent selectedNode = this.componentMap.get(Integer.parseInt(clickedNodeID));
if ((selectedNode != null) && (this.currentAnalysisEditorBean != null)) {
this.currentAnalysisEditorBean.nodeSelected(selectedNode);
}
......@@ -432,7 +421,7 @@ public final class CurrentAnalysisEditorGraphBean {
final String clickedNodeID = paramMap.get(CurrentAnalysisEditorGraphBean.PARAM_NAME_ID);
// Now search the correct node
try {
final EObject selectedNode = this.componentMap.get(Integer.parseInt(clickedNodeID));
final MIAnalysisComponent selectedNode = this.componentMap.get(Integer.parseInt(clickedNodeID));
if ((selectedNode != null) && (this.currentAnalysisEditorBean != null)) {
this.currentAnalysisEditorBean.nodeRemoved(selectedNode);
}
......@@ -455,18 +444,19 @@ public final class CurrentAnalysisEditorGraphBean {
// Now search the correct components
try {
final EObject sourcePort = this.componentMap.get(Integer.parseInt(sourcePortID));
if (CurrentAnalysisEditorGraphBean.REPOSITORY_INPUT_PORT.equals(targetPortID)) {
// This is a special case: An edge between a filter and a repository
final MIRepositoryConnector sourcePort = this.repositoryPortMap.get(Integer.parseInt(sourcePortID));
final String targetID = paramMap.get(CurrentAnalysisEditorGraphBean.PARAM_NAME_TARGET_PORT_ID).split("\\.")[0];
final EObject targetRepo = this.componentMap.get(Integer.parseInt(targetID));
final MIAnalysisComponent targetRepo = this.componentMap.get(Integer.parseInt(targetID));
if ((sourcePort instanceof MIRepositoryConnector) && (targetRepo instanceof MIRepository) && (this.currentAnalysisEditorBean != null)) {
this.currentAnalysisEditorBean.edgeCreated((MIRepositoryConnector) sourcePort, (MIRepository) targetRepo);
if ((sourcePort != null) && (targetRepo instanceof MIRepository) && (this.currentAnalysisEditorBean != null)) {
this.currentAnalysisEditorBean.edgeCreated(sourcePort, (MIRepository) targetRepo);
}
} else {
// This is the normal case: An edge between two filters
final EObject targetPort = this.componentMap.get(Integer.parseInt(targetPortID));
final MIPort sourcePort = this.portMap.get(Integer.parseInt(sourcePortID));
final MIPort targetPort = this.portMap.get(Integer.parseInt(targetPortID));
if ((sourcePort != null) && (targetPort != null) && (this.currentAnalysisEditorBean != null)) {
this.currentAnalysisEditorBean.edgeCreated((MIOutputPort) sourcePort, (MIInputPort) targetPort);
......@@ -491,17 +481,18 @@ public final class CurrentAnalysisEditorGraphBean {
// Now search the correct components
try {
final EObject sourcePort = this.componentMap.get(Integer.parseInt(sourcePortID));
if (CurrentAnalysisEditorGraphBean.REPOSITORY_INPUT_PORT.equals(targetPortID)) {
// This is a special case: An edge between a filter and a repository
final MIRepositoryConnector sourcePort = this.repositoryPortMap.get(Integer.parseInt(sourcePortID));
final String targetID = paramMap.get(CurrentAnalysisEditorGraphBean.PARAM_NAME_TARGET_PORT_ID).split("\\.")[0];
final EObject targetRepo = this.componentMap.get(Integer.parseInt(targetID));
if ((sourcePort instanceof MIRepositoryConnector) && (targetRepo instanceof MIRepository) && (this.currentAnalysisEditorBean != null)) {
this.currentAnalysisEditorBean.edgeRemoved((MIRepositoryConnector) sourcePort, (MIRepository) targetRepo);
final MIAnalysisComponent targetRepo = this.componentMap.get(Integer.parseInt(targetID));
if ((sourcePort != null) && (targetRepo instanceof MIRepository) && (this.currentAnalysisEditorBean != null)) {
this.currentAnalysisEditorBean.edgeRemoved(sourcePort, (MIRepository) targetRepo);
}
} else {
// This is the normal case: An edge between two filters
final EObject targetPort = this.componentMap.get(Integer.parseInt(targetPortID));
final MIPort sourcePort = this.portMap.get(Integer.parseInt(sourcePortID));
final MIPort targetPort = this.portMap.get(Integer.parseInt(targetPortID));
if ((sourcePort != null) && (targetPort != null) && (this.currentAnalysisEditorBean != null)) {
this.currentAnalysisEditorBean.edgeRemoved((MIOutputPort) sourcePort, (MIInputPort) targetPort);
......@@ -576,7 +567,7 @@ public final class CurrentAnalysisEditorGraphBean {
* @param newName
* The new name of the node.
*/
public synchronized void renameNode(final EObject node, final String newName) {
public synchronized void renameNode(final MIAnalysisComponent node, final String newName) {
final String cmd = String.format(CurrentAnalysisEditorGraphBean.JS_CMD_RENAME_NODE, this.componentMap.get(node),
CurrentAnalysisEditorGraphBean.simpleEscape(newName));
RequestContext.getCurrentInstance().execute(cmd);
......
No preview for this file type
......@@ -17,7 +17,7 @@
# FATAL, ERROR, WARN, INFO, DEBUG
#
#------------------------------------------------------------------------------
log4j.rootCategory=INFO, S
log4j.rootCategory=WARN, S
log4j.logger.com.dappit.Dapper.parser=ERROR
log4j.logger.org.w3c.tidy=FATAL
......
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