Commit 8e598dec authored by Jay Jay Billings's avatar Jay Jay Billings

Removed all instances of System.out and System.err that I could find and

replaced them with a SLF4J logger.
Signed-off-by: default avatarJay Jay Billings <billingsjj@ornl.gov>
parent 56e05da5
......@@ -41,7 +41,8 @@ Import-Package: com.jme3.math,
org.eclipse.ui,
org.eclipse.ui.views.properties,
org.eclipse.ui.views.properties.tabbed,
org.osgi.framework;version="1.7.0"
org.osgi.framework;version="1.7.0",
org.slf4j;version="1.7.2"
Require-Bundle: org.eclipse.ice.client.compatibility;bundle-version="2.0.0",
org.eclipse.ice.datastructures;bundle-version="2.0.0"
Service-Component: OSGI-INF/MOOSEEditorComponent.xml
......
......@@ -15,6 +15,8 @@ package org.eclipse.ice.client.widgets.moose.components;
import org.eclipse.ice.datastructures.ICEObject.IUpdateable;
import org.eclipse.ice.datastructures.ICEObject.IUpdateableListener;
import org.eclipse.ice.datastructures.form.Entry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This class can be used to listen to an {@link Entry}. This is just for
......@@ -26,6 +28,12 @@ import org.eclipse.ice.datastructures.form.Entry;
*/
public abstract class EntryListener implements IUpdateableListener {
/**
* Logger for handling event messages and other information.
*/
private static final Logger logger = LoggerFactory
.getLogger(EntryListener.class);
/**
* The entry that is this listener observes.
*/
......@@ -53,7 +61,7 @@ public abstract class EntryListener implements IUpdateableListener {
@Override
public final void update(IUpdateable component) {
if (component == entry) {
System.out.println("Entry \"" + entry.getName() + "\" updated.");
logger.info("Entry \"" + entry.getName() + "\" updated.");
updateEntry();
}
}
......
......@@ -119,7 +119,8 @@ Import-Package: com.jme3.animation,
org.eclipse.ice.reactor.plant,
org.eclipse.jface.databinding.swt,
org.eclipse.ui.views.properties.tabbed,
org.osgi.framework
org.osgi.framework,
org.slf4j;version="1.7.2"
Require-Bundle: org.eclipse.ice.client.compatibility;bundle-version="2.0.0",
org.eclipse.ice.datastructures;bundle-version="2.0.0"
Bundle-ClassPath: .
......
......@@ -26,6 +26,8 @@ import org.eclipse.ice.datastructures.form.geometry.OperatorType;
import org.eclipse.ice.datastructures.form.geometry.PrimitiveShape;
import org.eclipse.ice.datastructures.form.geometry.ShapeType;
import org.eclipse.ice.datastructures.form.geometry.Transformation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jme3.app.SimpleApplication;
import com.jme3.font.BitmapText;
......@@ -59,6 +61,12 @@ import com.jme3.scene.shape.Sphere;
public class GeometryApplication extends SimpleApplication implements
IUpdateableListener {
/**
* Logger for handling event messages and other information.
*/
private static final Logger logger = LoggerFactory
.getLogger(GeometryApplication.class);
/**
* Some of the code in this file was adapted from the JME3 tutorials and
* some of it was adapted from jmodelview, which can be found here:
......@@ -131,7 +139,7 @@ public class GeometryApplication extends SimpleApplication implements
@Override
public void simpleInitApp() {
System.out.println("Opening jME3 geometry renderer...");
logger.info("Opening jME3 geometry renderer...");
// Turn off near clipping on the geometry
cam.setFrustumPerspective(45f,
......
......@@ -31,6 +31,9 @@ import java.util.concurrent.atomic.AtomicReference;
import javax.imageio.ImageIO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jme3.app.Application;
import com.jme3.input.InputManager;
import com.jme3.post.SceneProcessor;
......@@ -78,6 +81,11 @@ import com.jme3.util.BufferUtils;
*
*/
public class EmbeddedView implements SceneProcessor {
/**
* Logger for handling event messages and other information.
*/
private static final Logger logger = LoggerFactory.getLogger(EmbeddedView.class);
// ---- Constant properties ---- //
/**
......
......@@ -18,6 +18,9 @@ import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicBoolean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jme3.app.Application;
import com.jme3.app.state.AppState;
import com.jme3.app.state.AppStateManager;
......@@ -34,6 +37,11 @@ import com.jme3.renderer.Camera;
import com.jme3.renderer.RenderManager;
public abstract class SimpleAppState implements AppState, IRenderQueue {
/**
* Logger for handling event messages and other information.
*/
private static final Logger logger = LoggerFactory.getLogger(SimpleAppState.class);
// ---- Requirements from AppState ---- //
/**
......@@ -685,7 +693,7 @@ public abstract class SimpleAppState implements AppState, IRenderQueue {
public void printCollisionResults(CollisionResults results) {
if (results != null) {
// Print the results of the collision.
System.out.println("Hits: " + results.size());
logger.info("Hits: " + results.size());
if (results.size() > 0) {
// Print the results.
......@@ -695,7 +703,7 @@ public abstract class SimpleAppState implements AppState, IRenderQueue {
float dist = result.getDistance();
Vector3f pt = result.getContactPoint();
String hit = result.getGeometry().getName();
System.out.println("Hit " + hit + " at distance " + dist
logger.info("Hit " + hit + " at distance " + dist
+ " at location " + pt.toString());
}
}
......
......@@ -14,6 +14,8 @@ package org.eclipse.ice.client.widgets.jme.internal;
import org.eclipse.ice.client.widgets.jme.MasterApplication;
import org.eclipse.ice.client.widgets.jme.ViewAppState;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
......@@ -27,6 +29,11 @@ import org.eclipse.ice.client.widgets.jme.ViewAppState;
*/
public class MasterApplicationHolder {
/**
* Logger for handling event messages and other information.
*/
private static final Logger logger = LoggerFactory.getLogger(MasterApplicationHolder.class);
/**
* The factory used to create a <code>MasterApplication</code>. <b>This
* should only be set via OSGi DS!</b>
......@@ -70,7 +77,7 @@ public class MasterApplicationHolder {
* <code>MasterApplication</code>.
*/
public void setApplicationFactory(IMasterApplicationFactory factory) {
System.out.println("MasterApplicationHolder message: "
logger.info("MasterApplicationHolder message: "
+ "Setting MasterApplication factory.");
// Set the static reference to the factory for use later.
......@@ -92,7 +99,7 @@ public class MasterApplicationHolder {
public void unsetApplicationFactory(IMasterApplicationFactory factory) {
if (factory == MasterApplicationHolder.factory) {
System.out.println("MasterApplicationHolder message: "
logger.info("MasterApplicationHolder message: "
+ "Unsetting MasterApplication factory and disposing "
+ "MasterApplication.");
......
......@@ -17,6 +17,9 @@ import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicBoolean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jme3.app.FlyCamAppState;
import com.jme3.app.SimpleApplication;
import com.jme3.app.StatsAppState;
......@@ -45,6 +48,12 @@ import com.jme3.system.awt.AwtPanel;
*/
public abstract class AbstractApplication extends SimpleApplication {
/**
* Logger for handling event messages and other information.
*/
private static final Logger logger = LoggerFactory
.getLogger(AbstractApplication.class);
// ---- Application Initialization ---- //
/**
* A thread-safe boolean signifying that the SimpleApplication's
......@@ -566,7 +575,7 @@ public abstract class AbstractApplication extends SimpleApplication {
public void printCollisionResults(CollisionResults results) {
if (results != null) {
// Print the results of the collision.
System.out.println("Hits: " + results.size());
logger.info("Hits: " + results.size());
if (results.size() > 0) {
// Print the results.
......@@ -576,7 +585,7 @@ public abstract class AbstractApplication extends SimpleApplication {
float dist = result.getDistance();
Vector3f pt = result.getContactPoint();
String hit = result.getGeometry().getName();
System.out.println("Hit " + hit + " at distance " + dist
logger.info("Hit " + hit + " at distance " + dist
+ " at location " + pt.toString());
}
}
......
......@@ -29,6 +29,8 @@ import org.eclipse.ice.reactor.plant.Junction;
import org.eclipse.ice.reactor.plant.Pipe;
import org.eclipse.ice.reactor.plant.PlantComponent;
import org.eclipse.ice.reactor.plant.Reactor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jme3.bounding.BoundingBox;
import com.jme3.math.Vector3f;
......@@ -44,6 +46,12 @@ import com.jme3.math.Vector3f;
public class JunctionController extends AbstractPlantController implements
IJunctionListener, IPlantControllerManagerListener {
/**
* Logger for handling event messages and other information.
*/
private static final Logger logger = LoggerFactory
.getLogger(JunctionController.class);
/**
* The {@link Junction} model for which this controller provides a view.
*/
......@@ -110,8 +118,7 @@ public class JunctionController extends AbstractPlantController implements
* connected to the Junction.
*/
public JunctionController(Junction model, JunctionView view,
IRenderQueue renderQueue,
PlantControllerManager manager) {
IRenderQueue renderQueue, PlantControllerManager manager) {
super(model, view, renderQueue);
// Set the model. If it is null, create a new, default model.
......@@ -634,11 +641,10 @@ public class JunctionController extends AbstractPlantController implements
@Override
public void visit(HeatExchanger plantComp) {
if (info.pipe == plantComp) {
System.out.println("HeatExchanger found");
logger.info("HeatExchanger found");
wrapper.component = plantComp;
} else if (info.pipe == plantComp.getPrimaryPipe()) {
System.out
.println("HeatExchanger primary pipe found");
logger.info("HeatExchanger primary pipe found");
wrapper.component = plantComp.getPrimaryPipe();
}
}
......
......@@ -44,19 +44,19 @@ public class CircularGridEditPart extends GridEditPart {
// behavior of child Figures.
// @Override
// protected void paintClientArea(Graphics graphics) {
// System.out.println("paintClientArea");
// logger.info("paintClientArea");
// graphics.setAntialias(SWT.ON);
// super.paintClientArea(graphics);
// }
// @Override
// protected void paintFigure(Graphics graphics) {
// System.out.println("paintFigure");
// logger.info("paintFigure");
// graphics.setAntialias(SWT.ON);
// super.paintFigure(graphics);
// }
// @Override
// protected void paintChildren(Graphics graphics) {
// System.out.println("paintChildren");
// logger.info("paintChildren");
// graphics.setAntialias(SWT.ON);
// super.paintChildren(graphics);
// }
......
......@@ -24,7 +24,8 @@ Import-Package: org.eclipse.core.runtime;version="3.4.0",
org.eclipse.ice.reactor.plant,
org.eclipse.ice.reactor.pwr,
org.eclipse.ui,
org.osgi.framework;version="1.7.0"
org.osgi.framework;version="1.7.0",
org.slf4j;version="1.7.2"
Export-Package: org.eclipse.ice.client.widgets.reactoreditor.lwr
Service-Component: OSGI-INF/*.xml
Bundle-ClassPath: .
......
......@@ -424,8 +424,8 @@ public class AssemblyAnalysisView extends AnalysisView implements IGridListener
* The new fuel assembly object.
*/
private void setAssembly(FuelAssembly assembly) {
System.out
.println("FuelAssemblyAnalysisView message: Setting fuel assembly.");
logger.info("FuelAssemblyAnalysisView message: "
+ "Setting fuel assembly.");
// Check the parameters.
if (assembly != null && assembly != this.assembly) {
......@@ -619,7 +619,7 @@ public class AssemblyAnalysisView extends AnalysisView implements IGridListener
* The new symmetry, e.g., octant, quadrant, or full.
*/
private void setSymmetry(Symmetry symmetry, int symmetryIndex) {
System.out.println("Trying to set symmetry: " + symmetry.name + " "
logger.info("Trying to set symmetry: " + symmetry.name + " "
+ symmetryIndex);
// Make sure the symmetry value is not null *and* different.
// Also validate the symmetryIndex by modulo dividing it with the
......
......@@ -625,7 +625,7 @@ public class CoreAnalysisView extends AnalysisView implements IGridListener {
*/
@Override
public void update(String key, Object value) {
System.out.println("CoreAnalysisView message: "
logger.info("CoreAnalysisView message: "
+ "Receving key update for key \"" + key + "\"");
// Split the key (the first part is the datasource and the second is the
......
......@@ -220,7 +220,7 @@ public class PlantAnalysisView extends AnalysisView {
@Override
public void update(String key, Object value) {
System.out.println("PlantAnalysisView message: "
logger.info("PlantAnalysisView message: "
+ "Receiving update for key " + key + ": " + value.toString());
// Currently, the only value this class listens to is the one that holds
......
......@@ -45,6 +45,8 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This class provides an {@link IAnalysisView} for plotting data for rods,
......@@ -54,6 +56,11 @@ import org.eclipse.swt.widgets.Composite;
*
*/
public class PlotAnalysisView extends AnalysisView {
/**
* Logger for handling event messages and other information.
*/
private static final Logger logger = LoggerFactory.getLogger(PlotAnalysisView.class);
/**
* The name for this type of analysis view. This can be used for the display
......@@ -341,9 +348,9 @@ public class PlotAnalysisView extends AnalysisView {
* selection of plotted data for the current feature.
*/
private void requestPlotSeries() {
System.out.println("Request plot series called");
logger.info("Request plot series called");
if (feature != null) {
System.out.println("Feature is " + feature);
logger.info("Feature is " + feature);
// Get the size of the assembly.
int rows = size;
......
......@@ -4,17 +4,18 @@ Bundle-Name: ReactorEditor SFR Package
Bundle-SymbolicName: org.eclipse.ice.client.widgets.reactoreditor.sfr
Bundle-Version: 2.0.0
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Import-Package: org.eclipse.ice.client.widgets.reactoreditor,
org.eclipse.ice.client.widgets.reactoreditor.grid,
org.eclipse.ice.client.widgets.reactoreditor.properties,
org.eclipse.core.runtime;version="3.4.0",
Import-Package: org.eclipse.core.runtime;version="3.4.0",
org.eclipse.ice.analysistool,
org.eclipse.ice.client.common,
org.eclipse.ice.client.widgets.reactoreditor,
org.eclipse.ice.client.widgets.reactoreditor.grid,
org.eclipse.ice.client.widgets.reactoreditor.properties,
org.eclipse.ice.reactor.sfr.base,
org.eclipse.ice.reactor.sfr.core,
org.eclipse.ice.reactor.sfr.core.assembly,
org.eclipse.ui,
org.osgi.framework;version="1.7.0"
org.osgi.framework;version="1.7.0",
org.slf4j;version="1.7.2"
Export-Package: org.eclipse.ice.client.widgets.reactoreditor.sfr
Service-Component: OSGI-INF/*.xml
Require-Bundle: org.eclipse.draw2d;bundle-version="3.9.0",
......
......@@ -575,7 +575,7 @@ public class CoreAnalysisView extends AnalysisView implements IGridListener {
*/
@Override
public void update(String key, Object value) {
System.out.println("CoreAnalysisView message: "
logger.info("CoreAnalysisView message: "
+ "Receving key update for key \"" + key + "\"");
// Split the key (the first part is the datasource and the second is the
......
......@@ -330,9 +330,9 @@ public class PlotAnalysisView extends AnalysisView {
* selection of plotted data for the current feature.
*/
private void requestPlotSeries() {
System.out.println("Request plot series called");
logger.info("Request plot series called");
if (feature != null) {
System.out.println("Feature is " + feature);
logger.info("Feature is " + feature);
// Get the size of the assembly.
int rows = size;
......
......@@ -3,10 +3,10 @@ Bundle-ManifestVersion: 2
Bundle-Name: ReactorEditor
Bundle-SymbolicName: org.eclipse.ice.client.widgets.reactoreditor;singleton:=true
Bundle-Version: 2.0.0
Import-Package: org.eclipse.ice.client.widgets,
org.eclipse.ice.iclient.uiwidgets,
org.eclipse.core.runtime;version="3.4.0",
Import-Package: org.eclipse.core.runtime;version="3.4.0",
org.eclipse.ice.client.common,
org.eclipse.ice.client.widgets,
org.eclipse.ice.iclient.uiwidgets,
org.eclipse.ice.io.hdf,
org.eclipse.ice.item,
org.eclipse.ice.reactor,
......@@ -15,7 +15,8 @@ Import-Package: org.eclipse.ice.client.widgets,
org.eclipse.ice.reactorAnalyzer,
org.eclipse.osgi.framework.console;version="1.0.0",
org.osgi.framework;version="1.3.0",
org.osgi.util.tracker;version="1.3.1"
org.osgi.util.tracker;version="1.3.1",
org.slf4j;version="1.7.2"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Service-Component: OSGI-INF/*.xml
Require-Bundle: org.eclipse.ice.client.compatibility;bundle-version="2.0.0",
......
......@@ -25,6 +25,8 @@ import java.util.Map;
import org.eclipse.ice.reactor.LWRData;
import org.eclipse.ice.reactor.LWRDataProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This class should read in data into data structures used by the
......@@ -36,6 +38,13 @@ import org.eclipse.ice.reactor.LWRDataProvider;
*
*/
public class AnalysisDataReader {
/**
* Logger for handling event messages and other information.
*/
private static final Logger logger = LoggerFactory
.getLogger(AnalysisDataReader.class);
// NOTES
// 1) Currently, we have a Map of supported features. The map tells us if
// we need to look for axial levels.
......@@ -105,8 +114,7 @@ public class AnalysisDataReader {
// Make sure the file exists.
if (!file.exists()) {
System.err.println("Invalid file " + fileName
+ ". Cannot read data.");
System.err.println("Invalid file " + fileName + ". Cannot read data.");
return;
}
......@@ -179,8 +187,8 @@ public class AnalysisDataReader {
} catch (NumberFormatException e) {
// Handle NumberFormatExceptions. These are thrown when dataRowRegex
// is not matched.
System.err.println("NumberFormatException while reading "
+ fileName + ". Invalid number.");
System.err.println("NumberFormatException while reading " + fileName
+ ". Invalid number.");
e.printStackTrace();
}
;
......
......@@ -31,6 +31,8 @@ import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* An AnalysisToolComposite provides an SWT Composite built to contain multiple
......@@ -50,6 +52,12 @@ import org.eclipse.swt.widgets.ToolItem;
*/
public class AnalysisToolComposite extends Composite {
/**
* Logger for handling event messages and other information.
*/
private static final Logger logger = LoggerFactory
.getLogger(AnalysisToolComposite.class);
/**
* The StateBroker is used to share "selection" events, e.g., the currently
* selected fuel assembly from the input data, between
......@@ -241,9 +249,8 @@ public class AnalysisToolComposite extends Composite {
*/
private void createViews(DataSource dataSource,
IAnalysisWidgetFactory factory) {
System.out
.println("AnalysisToolComposite message: Creating views for data source "
+ dataSource);
logger.info("AnalysisToolComposite message: "
+ "Creating views for data source " + dataSource);
// Get the list of available views.
List<String> viewNames = factory.getAvailableViews(dataSource);
......@@ -326,8 +333,8 @@ public class AnalysisToolComposite extends Composite {
* The key of the IAnalysisView that will be displayed.
*/
private void setActiveView(String key) {
System.out
.println("AnalysisToolComposite message: Setting active view to "
logger.info("AnalysisToolComposite message: "
+ "Setting active view to "
+ key);
// Fetch the view part using the key.
......@@ -366,8 +373,8 @@ public class AnalysisToolComposite extends Composite {
*/