Commit 15004a81 authored by Robert Smith's avatar Robert Smith
Browse files

Added text display to CSV Plot Editor



Changed the Plot Editor to a MultiPageEditorPart and updated
IVizServices with the capability to provide arbitrary extra pages to
tabs in the Plot Editor. Updated the CSVVizService to provide an extra
page containing the file's data in a text editor.
Signed-off-by: Robert Smith's avatarRobert Smith <SmithRW@ornl.gov>
parent bd70eb45
......@@ -380,6 +380,17 @@ series will be graphed at once with deselected series removed.
Finally, the Remove all series option in the context menu will completely clear
the graph.
\subsubsection{Viewing the Data}
At the bottom of the editor is a series of tabs.
\begin{center}
\includegraphics[width=12cm]{images/CSVTabs}
\end{center}
The Plot tab contains the graph described thus far. The Data tab will display
the raw numerical source data in a text editor.
\section{MOOSE Embedded Visualization}
MOOSE Workflow Items allow for easy visualization of their associated files,
......
......@@ -6,7 +6,8 @@ Bundle-Version: 2.1.8.20160208
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Service-Component: OSGI-INF/vizGeometryService.xml
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime
org.eclipse.core.runtime,
org.eclipse.ui.workbench
Bundle-Vendor: Oak Ridge National Laboratory
Eclipse-ExtensibleAPI: true
Import-Package: javafx.embed.swt;version="2.2.0",
......@@ -25,6 +26,7 @@ Import-Package: javafx.embed.swt;version="2.2.0",
org.eclipse.ice.viz.service.javafx.scene.model,
org.eclipse.ice.viz.service.javafx.viewer,
org.eclipse.ice.viz.service.modeling,
org.eclipse.ui,
org.slf4j;version="1.7.2"
Export-Package: org.eclipse.ice.viz.service.javafx.geometry,
org.eclipse.ice.viz.service.javafx.geometry.datatypes,
......
......@@ -22,6 +22,8 @@ import org.eclipse.ice.viz.service.javafx.geometry.plant.FXPlantViewRootControll
import org.eclipse.ice.viz.service.modeling.AbstractController;
import org.eclipse.ice.viz.service.modeling.IControllerFactory;
import org.eclipse.ice.viz.service.modeling.ShapeController;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
/**
* <p>
......@@ -94,4 +96,28 @@ public class FXGeometryVizService extends AbstractVizService {
return new FXShapeControllerFactory();
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ice.viz.service.IVizService#getNumAdditionalPages()
*/
@Override
public int getNumAdditionalPages() {
return 0;
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ice.viz.service.IVizService#createAdditionalPage(org.eclipse.
* swt.widgets.Composite, java.net.URI, int)
*/
@Override
public String createAdditionalPage(MultiPageEditorPart parent,
IFileEditorInput file, int pageNum) {
// No additional pages, so nothing to do
return null;
}
}
......@@ -25,7 +25,8 @@ Import-Package: javafx.collections;version="2.2.0",
org.eclipse.ice.viz.service.javafx.viewer,
org.eclipse.ice.viz.service.mesh.datastructures,
org.eclipse.ice.viz.service.mesh.properties,
org.eclipse.ice.viz.service.modeling
org.eclipse.ice.viz.service.modeling,
org.eclipse.ui
Export-Package: org.eclipse.ice.viz.service.javafx.mesh,
org.eclipse.ice.viz.service.javafx.mesh.datatypes
......@@ -19,6 +19,8 @@ import org.eclipse.ice.viz.service.IVizService;
import org.eclipse.ice.viz.service.javafx.mesh.datatypes.FXMeshControllerFactory;
import org.eclipse.ice.viz.service.modeling.AbstractController;
import org.eclipse.ice.viz.service.modeling.IControllerFactory;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
/**
* <p>
......@@ -82,4 +84,28 @@ public class FXMeshVizService extends AbstractVizService {
return new FXMeshControllerFactory();
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ice.viz.service.IVizService#getNumAdditionalPages()
*/
@Override
public int getNumAdditionalPages() {
return 0;
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ice.viz.service.IVizService#createAdditionalPage(org.eclipse.
* swt.widgets.Composite, java.net.URI, int)
*/
@Override
public String createAdditionalPage(MultiPageEditorPart parent,
IFileEditorInput file, int pageNum) {
// No additional pages, so nothing to do
return null;
}
}
......@@ -27,6 +27,7 @@ Import-Package: com.google.gson,
org.eclipse.swt.widgets,
org.eclipse.ui,
org.eclipse.ui.forms,
org.eclipse.ui.part,
org.osgi.service.prefs;version="1.1.1",
org.slf4j;version="1.7.2"
Export-Package: org.eclipse.ice.viz.service.paraview,
......
......@@ -25,6 +25,8 @@ import org.eclipse.ice.viz.service.paraview.proxy.IParaViewProxy;
import org.eclipse.ice.viz.service.paraview.proxy.IParaViewProxyBuilder;
import org.eclipse.ice.viz.service.paraview.proxy.IParaViewProxyFactory;
import org.eclipse.ice.viz.service.paraview.web.IParaViewWebClient;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
/**
* This class is responsible for providing a service to connect to (or launch)
......@@ -68,7 +70,9 @@ public class ParaViewVizService
/*
* (non-Javadoc)
* @see org.eclipse.ice.viz.service.connections.ConnectionVizService#createConnectionManager()
*
* @see org.eclipse.ice.viz.service.connections.ConnectionVizService#
* createConnectionManager()
*/
@Override
protected IVizConnectionManager<IParaViewWebClient> createConnectionManager() {
......@@ -77,7 +81,10 @@ public class ParaViewVizService
return new VizConnectionManager<IParaViewWebClient>() {
/*
* (non-Javadoc)
* @see org.eclipse.ice.viz.service.connections.VizConnectionManager#createConnection(java.lang.String, java.lang.String)
*
* @see
* org.eclipse.ice.viz.service.connections.VizConnectionManager#
* createConnection(java.lang.String, java.lang.String)
*/
@Override
protected VizConnection<IParaViewWebClient> createConnection(
......@@ -89,7 +96,9 @@ public class ParaViewVizService
/*
* (non-Javadoc)
* @see org.eclipse.ice.viz.service.connections.ConnectionVizService#createConnectionPlot()
*
* @see org.eclipse.ice.viz.service.connections.ConnectionVizService#
* createConnectionPlot()
*/
@Override
protected ConnectionPlot<IParaViewWebClient> createConnectionPlot() {
......@@ -98,7 +107,9 @@ public class ParaViewVizService
/*
* (non-Javadoc)
* @see org.eclipse.ice.viz.service.AbstractVizService#findSupportedExtensions()
*
* @see
* org.eclipse.ice.viz.service.AbstractVizService#findSupportedExtensions()
*/
@Override
protected Set<String> findSupportedExtensions() {
......@@ -108,7 +119,9 @@ public class ParaViewVizService
/*
* (non-Javadoc)
* @see org.eclipse.ice.viz.service.connections.ConnectionVizService#getConnectionPreferencesNodeId()
*
* @see org.eclipse.ice.viz.service.connections.ConnectionVizService#
* getConnectionPreferencesNodeId()
*/
@Override
protected String getConnectionPreferencesNodeId() {
......@@ -117,6 +130,7 @@ public class ParaViewVizService
/*
* (non-Javadoc)
*
* @see org.eclipse.ice.viz.service.IVizService#getName()
*/
@Override
......@@ -136,6 +150,7 @@ public class ParaViewVizService
/*
* (non-Javadoc)
*
* @see org.eclipse.ice.viz.service.IVizService#getVersion()
*/
@Override
......@@ -176,14 +191,40 @@ public class ParaViewVizService
}
return;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ice.viz.service.IVizService#getFactory()
*/
@Override
public IControllerFactory getFactory() {
// The ParaView visualization service does not make use of the model framework, so it has no factory
// The ParaView visualization service does not make use of the model
// framework, so it has no factory
return null;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ice.viz.service.IVizService#getNumAdditionalPages()
*/
@Override
public int getNumAdditionalPages() {
return 0;
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ice.viz.service.IVizService#createAdditionalPage(org.eclipse.
* swt.widgets.Composite, java.net.URI, int)
*/
@Override
public String createAdditionalPage(MultiPageEditorPart parent,
IFileEditorInput file, int pageNum) {
// No additional pages, so nothing to do
return null;
}
......
......@@ -24,6 +24,7 @@ Import-Package: ca.odell.glazedlists,
org.eclipse.ice.viz.service.styles,
org.eclipse.ice.viz.service.widgets,
org.eclipse.swt.widgets,
org.eclipse.ui,
org.eclipse.ui.forms,
org.slf4j;version="1.7.2"
Require-Bundle: org.junit,
......@@ -31,5 +32,6 @@ Require-Bundle: org.junit,
org.eclipse.swtbot.go;bundle-version="2.2.1",
org.eclipse.swtbot.junit4_x;bundle-version="2.2.1",
org.eclipse.swtbot.swt.finder;bundle-version="2.2.1",
org.eclipse.swtbot.eclipse.gef.finder;bundle-version="2.2.1"
org.eclipse.swtbot.eclipse.gef.finder;bundle-version="2.2.1",
org.eclipse.ui.workbench
Export-Package: org.eclipse.ice.viz.service.modeling.test.utils
......@@ -31,6 +31,8 @@ import org.eclipse.ice.viz.service.connections.VizConnectionManager;
import org.eclipse.ice.viz.service.modeling.IControllerFactory;
import org.eclipse.ice.viz.service.preferences.CustomScopedPreferenceStore;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
import org.junit.Before;
import org.junit.Test;
......@@ -141,6 +143,19 @@ public class ConnectionVizServiceTester {
public IControllerFactory getFactory() {
return null;
}
@Override
public int getNumAdditionalPages() {
// TODO Auto-generated method stub
return 0;
}
@Override
public String createAdditionalPage(MultiPageEditorPart parent,
IFileEditorInput file, int pageNum) {
// TODO Auto-generated method stub
return null;
}
};
// Add a remote connection after creating the service.
......
......@@ -24,6 +24,8 @@ import java.util.Set;
import org.eclipse.ice.viz.service.AbstractVizService;
import org.eclipse.ice.viz.service.modeling.IControllerFactory;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
import org.junit.Test;
/**
......@@ -227,6 +229,7 @@ public class AbstractVizServiceTester {
/*
* (non-Javadoc)
*
* @see org.eclipse.ice.viz.service.IVizService#getName()
*/
@Override
......@@ -236,6 +239,7 @@ public class AbstractVizServiceTester {
/*
* (non-Javadoc)
*
* @see org.eclipse.ice.viz.service.IVizService#getVersion()
*/
@Override
......@@ -245,7 +249,9 @@ public class AbstractVizServiceTester {
/*
* (non-Javadoc)
* @see org.eclipse.ice.viz.service.AbstractVizService#findSupportedExtensions()
*
* @see org.eclipse.ice.viz.service.AbstractVizService#
* findSupportedExtensions()
*/
@Override
protected Set<String> findSupportedExtensions() {
......@@ -254,11 +260,25 @@ public class AbstractVizServiceTester {
/*
* (non-Javadoc)
*
* @see org.eclipse.ice.viz.service.IVizService#getFactory()
*/
@Override
public IControllerFactory getFactory() {
return null;
}
@Override
public int getNumAdditionalPages() {
// TODO Auto-generated method stub
return 0;
}
@Override
public String createAdditionalPage(MultiPageEditorPart parent,
IFileEditorInput file, int pageNum) {
// TODO Auto-generated method stub
return null;
}
}
}
......@@ -20,6 +20,8 @@ import org.eclipse.ice.viz.service.IVizCanvas;
import org.eclipse.ice.viz.service.IVizService;
import org.eclipse.ice.viz.service.modeling.AbstractController;
import org.eclipse.ice.viz.service.modeling.IControllerFactory;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
/**
* This is a fake IVizService that is used in testing. The only thing it really
......@@ -102,6 +104,7 @@ public class FakeVizService implements IVizService {
/*
* (non-Javadoc)
*
* @see org.eclipse.ice.viz.service.IVizService#getFactory()
*/
@Override
......@@ -109,4 +112,29 @@ public class FakeVizService implements IVizService {
return null;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ice.viz.service.IVizService#getNumAdditionalPages()
*/
@Override
public int getNumAdditionalPages() {
// TODO Auto-generated method stub
return 0;
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ice.viz.service.IVizService#createAdditionalPage(org.eclipse.
* ui.part.MultiPageEditorPart, org.eclipse.ui.IFileEditorInput, int)
*/
@Override
public String createAdditionalPage(MultiPageEditorPart parent,
IFileEditorInput file, int pageNum) {
// TODO Auto-generated method stub
return null;
}
}
......@@ -131,6 +131,10 @@ public class PlotEditorTester {
bot.tree().select("f(x)");
bot.button("OK").click();
// Check that the data tab is present
bot.cTabItem("Data").activate();
bot.cTabItem("Plot").activate();
// Test the editor closing menu option.
button = bot.activeEditor().bot().toolbarButton(1).click();
......
......@@ -42,6 +42,8 @@ import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotLabel;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotSpinner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
import org.junit.Ignore;
import org.junit.Test;
......@@ -156,6 +158,19 @@ public class PlotGridCompositeTester extends AbstractSWTTester {
public IControllerFactory getFactory() {
return null;
}
@Override
public int getNumAdditionalPages() {
// TODO Auto-generated method stub
return 0;
}
@Override
public String createAdditionalPage(MultiPageEditorPart parent,
IFileEditorInput file, int pageNum) {
// TODO Auto-generated method stub
return null;
}
};
factory.register(vizService);
......@@ -259,7 +274,7 @@ public class PlotGridCompositeTester extends AbstractSWTTester {
}
}
assertTrue(found);
// Check the spinner's specifications.
assertEquals(1, spinner.getIncrement());
assertEquals(2, spinner.getSelection());
......@@ -290,7 +305,7 @@ public class PlotGridCompositeTester extends AbstractSWTTester {
}
}
assertTrue(found);
// Check the spinner's specifications.
assertEquals(1, spinner.getIncrement());
assertEquals(2, spinner.getSelection());
......
......@@ -21,6 +21,8 @@ import org.eclipse.ice.viz.service.connections.ConnectionVizService;
import org.eclipse.ice.viz.service.connections.IVizConnectionManager;
import org.eclipse.ice.viz.service.modeling.IControllerFactory;
import org.eclipse.ice.viz.service.visit.connections.VisItConnectionManager;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
import gov.lbnl.visit.swt.VisItSwtConnection;
......@@ -141,4 +143,28 @@ public class VisItVizService extends ConnectionVizService<VisItSwtConnection> {
// framework, so it has no factory
return null;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ice.viz.service.IVizService#getNumAdditionalPages()
*/
@Override
public int getNumAdditionalPages() {
return 0;
}
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ice.viz.service.IVizService#createAdditionalPage(org.eclipse.
* swt.widgets.Composite, java.net.URI, int)
*/
@Override
public String createAdditionalPage(MultiPageEditorPart parent,
IFileEditorInput file, int pageNum) {
// No additional pages, so nothing to do
return null;
}
}
......@@ -38,6 +38,7 @@ Import-Package: ca.odell.glazedlists,
org.eclipse.swt.graphics,
org.eclipse.swt.layout,
org.eclipse.swt.widgets,
org.eclipse.ui.editors.text,
org.eclipse.ui.forms,
org.eclipse.ui.forms.events,
org.eclipse.ui.forms.widgets,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment