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

Moved the loading of the projects to the beans; Added the functionality of the top buttons

parent 64a5b670
No related branches found
No related tags found
No related merge requests found
Showing
with 84 additions and 45 deletions
<?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>
......@@ -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>
......
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding/<project>=UTF-8
......@@ -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");
}
}
......@@ -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
......
......@@ -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) {
......
......@@ -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
......
......@@ -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();
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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"/>
......
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