From 90348fb9b45934905bb3fa3b0f7a98807fcefb49 Mon Sep 17 00:00:00 2001
From: Nils Christian Ehmke <nie@informatik.uni-kiel.de>
Date: Sat, 21 Jul 2012 17:28:07 +0200
Subject: [PATCH] Moved the loading of the projects to the beans; Added the
 functionality of the top buttons

---
 Kieker.WebGUI/.classpath                      | 30 +++++++++++++++++--
 Kieker.WebGUI/.project                        |  8 ++---
 .../org.eclipse.core.resources.prefs          |  1 +
 .../beans/application/ProjectsBean.java       | 10 +++++++
 .../CurrentAnalysisCockpitProjectBean.java    |  5 ++--
 .../session/CurrentCockpitEditorBean.java     |  5 ++--
 .../beans/session/CurrentControllerBean.java  |  5 ++--
 .../session/CurrentWorkSpaceProjectBean.java  |  5 ++--
 .../src/main/webapp/AnalysisEditor.xhtml      | 10 +++----
 Kieker.WebGUI/src/main/webapp/Cockpit.xhtml   | 10 +++----
 .../src/main/webapp/CockpitEditor.xhtml       | 10 +++----
 .../src/main/webapp/Controller.xhtml          | 12 ++++----
 .../src/main/webapp/ProjectOverview.xhtml     | 18 +++++------
 13 files changed, 84 insertions(+), 45 deletions(-)

diff --git a/Kieker.WebGUI/.classpath b/Kieker.WebGUI/.classpath
index 595a5bf4..658fc2e3 100644
--- a/Kieker.WebGUI/.classpath
+++ b/Kieker.WebGUI/.classpath
@@ -1,7 +1,31 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="src" output="target/classes" path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
 	<classpathentry kind="output" path="target/classes"/>
 </classpath>
diff --git a/Kieker.WebGUI/.project b/Kieker.WebGUI/.project
index 52611306..447a4dc6 100644
--- a/Kieker.WebGUI/.project
+++ b/Kieker.WebGUI/.project
@@ -11,22 +11,22 @@
 			</arguments>
 		</buildCommand>
 		<buildCommand>
-			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<name>net.sourceforge.pmd.eclipse.plugin.pmdBuilder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
-			<name>net.sourceforge.pmd.eclipse.plugin.pmdBuilder</name>
+			<name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
-			<name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
+			<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
-			<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>
diff --git a/Kieker.WebGUI/.settings/org.eclipse.core.resources.prefs b/Kieker.WebGUI/.settings/org.eclipse.core.resources.prefs
index e9441bb1..abdea9ac 100644
--- a/Kieker.WebGUI/.settings/org.eclipse.core.resources.prefs
+++ b/Kieker.WebGUI/.settings/org.eclipse.core.resources.prefs
@@ -1,3 +1,4 @@
 eclipse.preferences.version=1
 encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
 encoding/<project>=UTF-8
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java
index 84dbffee..53ce7d7f 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java
@@ -195,4 +195,14 @@ public final class ProjectsBean {
 	private static void showMessage(final Severity severity, final String msg) {
 		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(severity, "", msg));
 	}
+
+	/**
+	 * Delivers the one and only bean instance of this class.
+	 * 
+	 * @return The bean instance.
+	 */
+	public static ProjectsBean getInstance() {
+		final ELResolver el = FacesContext.getCurrentInstance().getApplication().getELResolver();
+		return (ProjectsBean) el.getValue(FacesContext.getCurrentInstance().getELContext(), null, "projectsBean");
+	}
 }
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisCockpitProjectBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisCockpitProjectBean.java
index e649f888..329c1273 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisCockpitProjectBean.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisCockpitProjectBean.java
@@ -29,6 +29,7 @@ import kieker.analysis.display.Image;
 import kieker.analysis.display.PlainText;
 import kieker.analysis.model.analysisMetaModel.MIProject;
 import kieker.analysis.model.analysisMetaModel.MIView;
+import kieker.webgui.beans.application.ProjectsBean;
 import kieker.webgui.common.ACManager;
 import kieker.webgui.common.Global;
 
@@ -82,10 +83,10 @@ public class CurrentAnalysisCockpitProjectBean {
 	 *            The name of the project.
 	 * @return The name of the page for the cockpit.
 	 */
-	public String setProject(final MIProject newProject, final String newName) {
+	public String setProject(final String newName) {
 		synchronized (this) {
 			// Remember the given parameters
-			this.project = newProject;
+			this.project = ProjectsBean.getInstance().openProject(newName);
 			this.projectName = newName;
 
 			// Now deliver the correct navigation page
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentCockpitEditorBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentCockpitEditorBean.java
index aae4ee4b..178cfda1 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentCockpitEditorBean.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentCockpitEditorBean.java
@@ -40,6 +40,7 @@ import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory;
 import kieker.analysis.plugin.AbstractPlugin;
 import kieker.common.logging.Log;
 import kieker.common.logging.LogFactory;
+import kieker.webgui.beans.application.ProjectsBean;
 import kieker.webgui.common.FSManager;
 import kieker.webgui.common.Global;
 import kieker.webgui.common.exception.NewerProjectException;
@@ -107,10 +108,10 @@ public class CurrentCockpitEditorBean {
 	 *            The name of the project.
 	 * @return The name of the page for the analysis view work space.
 	 */
-	public String setProject(final MIProject newProject, final String newName) {
+	public String setProject(final String newName) {
 		synchronized (this) {
 			// Remember the given parameters
-			this.project = newProject;
+			this.project = ProjectsBean.getInstance().openProject(newName);
 			this.projectName = newName;
 
 			if (this.project != null) {
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentControllerBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentControllerBean.java
index be688ed4..cc608a70 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentControllerBean.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentControllerBean.java
@@ -33,6 +33,7 @@ import kieker.analysis.exception.AnalysisConfigurationException;
 import kieker.analysis.model.analysisMetaModel.MIProject;
 import kieker.common.logging.Log;
 import kieker.common.logging.LogFactory;
+import kieker.webgui.beans.application.ProjectsBean;
 import kieker.webgui.common.ACManager;
 import kieker.webgui.common.Global;
 import kieker.webgui.common.exception.AnalysisNotInstantiatedException;
@@ -78,10 +79,10 @@ public class CurrentControllerBean {
 	 *            The name of the project.
 	 * @return The name of the page for the cockpit.
 	 */
-	public String setProject(final MIProject newProject, final String newName) {
+	public String setProject(final String newName) {
 		synchronized (this) {
 			// Remember the given parameters
-			this.project = newProject;
+			this.project = ProjectsBean.getInstance().openProject(newName);
 			this.projectName = newName;
 
 			// Now deliver the correct navigation page
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 5dec3d43..3f1e078e 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
@@ -59,6 +59,7 @@ import kieker.common.configuration.Configuration;
 import kieker.common.logging.Log;
 import kieker.common.logging.LogFactory;
 import kieker.monitoring.core.registry.Registry;
+import kieker.webgui.beans.application.ProjectsBean;
 import kieker.webgui.common.ConnectionFilterToFilter;
 import kieker.webgui.common.ConnectionFilterToRepository;
 import kieker.webgui.common.FSManager;
@@ -175,10 +176,10 @@ public final class CurrentWorkSpaceProjectBean {
 	 *            The name of the project.
 	 * @return The name of the page for the project work space, if the project has been accepted, '' if it is null.
 	 */
-	public String setProject(final MIProject newProject, final String newName) {
+	public String setProject(final String newName) {
 		synchronized (this) {
 			// Remember the given parameters
-			this.project = newProject;
+			this.project = ProjectsBean.getInstance().openProject(newName);
 			this.projectName = newName;
 			this.getConnectionsFromProject();
 
diff --git a/Kieker.WebGUI/src/main/webapp/AnalysisEditor.xhtml b/Kieker.WebGUI/src/main/webapp/AnalysisEditor.xhtml
index 1713f9e4..1e6d9728 100644
--- a/Kieker.WebGUI/src/main/webapp/AnalysisEditor.xhtml
+++ b/Kieker.WebGUI/src/main/webapp/AnalysisEditor.xhtml
@@ -33,13 +33,13 @@
                             <h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentWorkSpaceProjectBean.projectName, 30)}"/>
                         </p:toolbarGroup>
                         <p:toolbarGroup align="right">
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-home" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="ProjectOverview.xhtml" />
                             <p:separator/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" disabled="true"  ajax="false" action="#{currentWorkSpaceProjectBean.setProject(projectsBean.openProject(project), project)}"/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" action="#{currentControllerBean.setProject(projectsBean.openProject(project), project)}" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" disabled="true"  ajax="false"/>
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" action="#{currentControllerBean.setProject(currentWorkSpaceProjectBean.projectName)}" />
                             <p:separator/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(projectsBean.openProject(project), project)}" />
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{currentAnalysisCockpitProjectBean.setProject(projectsBean.openProject(project), project)}" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(currentWorkSpaceProjectBean.projectName)}" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{currentAnalysisCockpitProjectBean.setProject(currentWorkSpaceProjectBean.projectName)}" />
                         </p:toolbarGroup>
                     </p:toolbar>
 
diff --git a/Kieker.WebGUI/src/main/webapp/Cockpit.xhtml b/Kieker.WebGUI/src/main/webapp/Cockpit.xhtml
index 91d88769..72226e80 100644
--- a/Kieker.WebGUI/src/main/webapp/Cockpit.xhtml
+++ b/Kieker.WebGUI/src/main/webapp/Cockpit.xhtml
@@ -25,13 +25,13 @@
                             <h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentWorkSpaceProjectBean.projectName, 30)}"/>
                         </p:toolbarGroup>
                         <p:toolbarGroup align="right">
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-home" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="ProjectOverview.xhtml" />
                             <p:separator/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none"  ajax="false" action="#{currentWorkSpaceProjectBean.setProject(projectsBean.openProject(project), project)}"/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false"   action="#{currentControllerBean.setProject(projectsBean.openProject(project), project)}" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none"  ajax="false" action="#{currentWorkSpaceProjectBean.setProject(currentAnalysisCockpitProjectBean.projectName)}"/>
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false"   action="#{currentControllerBean.setProject(currentAnalysisCockpitProjectBean.projectName)}" />
                             <p:separator/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(projectsBean.openProject(project), project)}" />
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false"  disabled="true" action="#{currentAnalysisCockpitProjectBean.setProject(projectsBean.openProject(project), project)}" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(currentAnalysisCockpitProjectBean.projectName)}" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false"  disabled="true" action="#{currentAnalysisCockpitProjectBean.setProject(currentAnalysisCockpitProjectBean.projectName)}" />
                         </p:toolbarGroup>
                     </p:toolbar>
                     <p:menubar>
diff --git a/Kieker.WebGUI/src/main/webapp/CockpitEditor.xhtml b/Kieker.WebGUI/src/main/webapp/CockpitEditor.xhtml
index c6c95670..667d1274 100644
--- a/Kieker.WebGUI/src/main/webapp/CockpitEditor.xhtml
+++ b/Kieker.WebGUI/src/main/webapp/CockpitEditor.xhtml
@@ -23,13 +23,13 @@
                             <h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentWorkSpaceProjectBean.projectName, 30)}"/>
                         </p:toolbarGroup>
                         <p:toolbarGroup align="right">
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-home" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="ProjectOverview.xhtml" />
                             <p:separator/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none"  ajax="false" action="#{currentWorkSpaceProjectBean.setProject(projectsBean.openProject(project), project)}"/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false"   action="#{currentControllerBean.setProject(projectsBean.openProject(project), project)}" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none"  ajax="false" action="#{currentWorkSpaceProjectBean.setProject(currentCockpitEditorBean.projectName)}"/>
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false"   action="#{currentControllerBean.setProject(currentCockpitEditorBean.projectName)}" />
                             <p:separator/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" disabled="true" action="#{currentCockpitEditorBean.setProject(projectsBean.openProject(project), project)}" />
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{currentAnalysisCockpitProjectBean.setProject(projectsBean.openProject(project), project)}" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" disabled="true" action="#{currentCockpitEditorBean.setProject(currentCockpitEditorBean.projectName)}" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{currentAnalysisCockpitProjectBean.setProject(currentCockpitEditorBean.projectName)}" />
                         </p:toolbarGroup>
                     </p:toolbar>
                     <p:menubar>
diff --git a/Kieker.WebGUI/src/main/webapp/Controller.xhtml b/Kieker.WebGUI/src/main/webapp/Controller.xhtml
index 92a69028..69f4148b 100644
--- a/Kieker.WebGUI/src/main/webapp/Controller.xhtml
+++ b/Kieker.WebGUI/src/main/webapp/Controller.xhtml
@@ -25,13 +25,13 @@
                             <h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentWorkSpaceProjectBean.projectName, 30)}"/>
                         </p:toolbarGroup>
                         <p:toolbarGroup align="right">
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-home" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="ProjectOverview.xhtml"/>
                             <p:separator/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none"  ajax="false" action="#{currentWorkSpaceProjectBean.setProject(projectsBean.openProject(project), project)}"/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" disabled="true"  action="#{currentControllerBean.setProject(projectsBean.openProject(project), project)}" />
-                            <p:separator/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(projectsBean.openProject(project), project)}" />
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{currentAnalysisCockpitProjectBean.setProject(projectsBean.openProject(project), project)}" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none"  ajax="false" action="#{currentWorkSpaceProjectBean.setProject(currentControllerBean.projectName)}"/>
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" disabled="true" />
+                            <p:separator/> 
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(currentControllerBean.projectName)}" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{currentAnalysisCockpitProjectBean.setProject(currentControllerBean.projectName)}" />
                         </p:toolbarGroup>
                     </p:toolbar>
 
diff --git a/Kieker.WebGUI/src/main/webapp/ProjectOverview.xhtml b/Kieker.WebGUI/src/main/webapp/ProjectOverview.xhtml
index 5b0cc5b5..94a17cee 100644
--- a/Kieker.WebGUI/src/main/webapp/ProjectOverview.xhtml
+++ b/Kieker.WebGUI/src/main/webapp/ProjectOverview.xhtml
@@ -20,13 +20,13 @@
                             <h:outputText styleClass="kieker-title" value="Kieker"/>
                         </p:toolbarGroup>
                         <p:toolbarGroup align="right">
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-home" disabled="true" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-home" disabled="true" action="ProjectOverview.xhtml" />
                             <p:separator/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" ajax="false" action="#{currentWorkSpaceProjectBean.setProject(projectsBean.openProject(project), project)}"/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" action="#{currentControllerBean.setProject(projectsBean.openProject(project), project)}" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" ajax="false" action="#{currentWorkSpaceProjectBean.setProject(currentProjectOverviewBean.projectName)}"/>
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" action="#{currentControllerBean.setProject(currentProjectOverviewBean.projectName)}" />
                             <p:separator/>
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(projectsBean.openProject(project), project)}" />
-                            <p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{currentAnalysisCockpitProjectBean.setProject(projectsBean.openProject(project), project)}" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(currentProjectOverviewBean.projectName)}" />
+                            <p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{currentAnalysisCockpitProjectBean.setProject(currentProjectOverviewBean.projectName)}" />
                         </p:toolbarGroup>
                     </p:toolbar>
 
@@ -59,12 +59,12 @@
                             <p:commandLink id="dynaButton" value="#{project}"/>
 
                             <p:menu overlay="true" trigger="dynaButton" my="left top" at="left bottom" style="width:210px">  
-                                <p:menuitem icon="ui-icon-wrench" id="openButton" value="  Analysis Editor" styleClass="element-with-whitespace" ajax="false" action="#{currentWorkSpaceProjectBean.setProject(projectsBean.openProject(project), project)}"/>
-                                <p:menuitem icon="ui-icon-circle-triangle-e" id="controlAnalysis"  styleClass="element-with-whitespace" value="  Analysis" ajax="false" action="#{currentControllerBean.setProject(projectsBean.openProject(project), project)}" />
+                                <p:menuitem icon="ui-icon-wrench" id="openButton" value="  Analysis Editor" styleClass="element-with-whitespace" ajax="false" action="#{currentWorkSpaceProjectBean.setProject(project)}"/>
+                                <p:menuitem icon="ui-icon-circle-triangle-e" id="controlAnalysis"  styleClass="element-with-whitespace" value="  Analysis" ajax="false" action="#{currentControllerBean.setProject(project)}" />
                                 <p:separator/>
 
-                                <p:menuitem icon="ui-icon-wrench" id="editAnalysisViews"  styleClass="element-with-whitespace" value="  Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(projectsBean.openProject(project), project)}" />
-                                <p:menuitem icon="ui-icon-image" id="showAnalysis"  styleClass="element-with-whitespace" value="  Cockpit" ajax="false" action="#{currentAnalysisCockpitProjectBean.setProject(projectsBean.openProject(project), project)}" />
+                                <p:menuitem icon="ui-icon-wrench" id="editAnalysisViews"  styleClass="element-with-whitespace" value="  Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(project)}" />
+                                <p:menuitem icon="ui-icon-image" id="showAnalysis"  styleClass="element-with-whitespace" value="  Cockpit" ajax="false" action="#{currentAnalysisCockpitProjectBean.setProject(project)}" />
                                 <p:separator/>
                                 <p:menuitem id="copyButton" icon="ui-icon-copy"  styleClass="element-with-whitespace" value="  Copy Project" action="#{currentProjectOverviewBean.setProjectName(project)}" onclick="copyProjectDialog.show()" disabled="true"/>
                                 <p:menuitem id="renameButton" icon="ui-icon-pencil"  styleClass="element-with-whitespace" value="  Rename Project"  action="#{currentProjectOverviewBean.setProjectName(project)}" onclick="renameProjectDialog.show()" disabled="true"/>
-- 
GitLab