Commit 77549fb1 authored by Robert Smith's avatar Robert Smith
Browse files

Removed JME3 dependencies



Removed all dependencies on com.jme3.* from non-jme3 ICE bundles.
Signed-off-by: Robert Smith's avatarRobert Smith <SmithRW@ornl.gov>
parent 6b901de3
...@@ -4,8 +4,7 @@ Bundle-Name: ICE Moose Widgets ...@@ -4,8 +4,7 @@ Bundle-Name: ICE Moose Widgets
Bundle-SymbolicName: org.eclipse.ice.client.widgets.moose;singleton:=true Bundle-SymbolicName: org.eclipse.ice.client.widgets.moose;singleton:=true
Bundle-Version: 2.1.8 Bundle-Version: 2.1.8
Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Import-Package: com.jme3.math, Import-Package: org.apache.commons.io;version="2.0.1",
org.apache.commons.io;version="2.0.1",
org.eclipse.cdt.core, org.eclipse.cdt.core,
org.eclipse.cdt.core.model, org.eclipse.cdt.core.model,
org.eclipse.cdt.core.model.util, org.eclipse.cdt.core.model.util,
......
...@@ -6,109 +6,7 @@ Bundle-Version: 2.1.8 ...@@ -6,109 +6,7 @@ Bundle-Version: 2.1.8
Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: org.eclipse.ice.client.widgets.jme, Export-Package: org.eclipse.ice.client.widgets.jme,
org.eclipse.ice.client.widgets.reactoreditor.plant org.eclipse.ice.client.widgets.reactoreditor.plant
Import-Package: com.jme3.animation, Import-Package: org.eclipse.core.resources,
com.jme3.app,
com.jme3.app.state,
com.jme3.asset,
com.jme3.asset.cache,
com.jme3.asset.plugins,
com.jme3.audio,
com.jme3.audio.lwjgl,
com.jme3.audio.plugins,
com.jme3.bounding,
com.jme3.bullet,
com.jme3.bullet.collision,
com.jme3.bullet.collision.shapes,
com.jme3.bullet.collision.shapes.infos,
com.jme3.bullet.control,
com.jme3.bullet.control.ragdoll,
com.jme3.bullet.debug,
com.jme3.bullet.joints,
com.jme3.bullet.joints.motors,
com.jme3.bullet.objects,
com.jme3.bullet.objects.infos,
com.jme3.bullet.util,
com.jme3.cinematic,
com.jme3.cinematic.events,
com.jme3.collision,
com.jme3.collision.bih,
com.jme3.cursors.plugins,
com.jme3.effect,
com.jme3.effect.influencers,
com.jme3.effect.shapes,
com.jme3.export,
com.jme3.export.binary,
com.jme3.export.xml,
com.jme3.font,
com.jme3.font.plugins,
com.jme3.input,
com.jme3.input.awt,
com.jme3.input.controls,
com.jme3.input.dummy,
com.jme3.input.event,
com.jme3.input.lwjgl,
com.jme3.light,
com.jme3.material,
com.jme3.material.plugins,
com.jme3.math,
com.jme3.post,
com.jme3.post.filters,
com.jme3.post.ssao,
com.jme3.renderer,
com.jme3.renderer.lwjgl,
com.jme3.renderer.queue,
com.jme3.scene,
com.jme3.scene.control,
com.jme3.scene.debug,
com.jme3.scene.mesh,
com.jme3.scene.plugins,
com.jme3.scene.plugins.blender,
com.jme3.scene.plugins.blender.animations,
com.jme3.scene.plugins.blender.cameras,
com.jme3.scene.plugins.blender.constraints,
com.jme3.scene.plugins.blender.constraints.definitions,
com.jme3.scene.plugins.blender.curves,
com.jme3.scene.plugins.blender.file,
com.jme3.scene.plugins.blender.lights,
com.jme3.scene.plugins.blender.materials,
com.jme3.scene.plugins.blender.meshes,
com.jme3.scene.plugins.blender.modifiers,
com.jme3.scene.plugins.blender.objects,
com.jme3.scene.plugins.blender.particles,
com.jme3.scene.plugins.blender.textures,
com.jme3.scene.plugins.blender.textures.blending,
com.jme3.scene.plugins.blender.textures.generating,
com.jme3.scene.plugins.blender.textures.io,
com.jme3.scene.plugins.ogre,
com.jme3.scene.plugins.ogre.matext,
com.jme3.scene.shape,
com.jme3.shader,
com.jme3.shader.plugins,
com.jme3.shadow,
com.jme3.system,
com.jme3.system.awt,
com.jme3.system.lwjgl,
com.jme3.terrain,
com.jme3.terrain.geomipmap,
com.jme3.terrain.geomipmap.grid,
com.jme3.terrain.geomipmap.lodcalc,
com.jme3.terrain.geomipmap.lodcalc.util,
com.jme3.terrain.geomipmap.picking,
com.jme3.terrain.heightmap,
com.jme3.terrain.noise,
com.jme3.terrain.noise.basis,
com.jme3.terrain.noise.filter,
com.jme3.terrain.noise.fractal,
com.jme3.terrain.noise.modulator,
com.jme3.texture,
com.jme3.texture.image,
com.jme3.texture.plugins,
com.jme3.ui,
com.jme3.util,
com.jme3.util.blockparser,
com.jme3.util.xml,
com.jme3.water,
org.eclipse.core.resources,
org.eclipse.core.runtime;version="3.4.0", org.eclipse.core.runtime;version="3.4.0",
org.eclipse.core.runtime.jobs, org.eclipse.core.runtime.jobs,
org.eclipse.ice.datastructures.ICEObject, org.eclipse.ice.datastructures.ICEObject,
......
/******************************************************************************* /// ********************************************************************************Copyright(c)2014
* Copyright (c) 2014 UT-Battelle, LLC. /// UT-Battelle,LLC.*All rights reserved.This program and the accompanying
* All rights reserved. This program and the accompanying materials /// materials*are made available under the terms of the Eclipse Public License
* are made available under the terms of the Eclipse Public License v1.0 /// v1.0*which accompanies this distribution,and is available
* which accompanies this distribution, and is available at /// at*http://www.eclipse.org/legal/epl-v10.html
* http://www.eclipse.org/legal/epl-v10.html // **Contributors:*Jordan Deyton(UT-Battelle,LLC.)-initial API and
* /// implementation and/or*initial
* Contributors: /// documentation********************************************************************************/package
* Jordan Deyton (UT-Battelle, LLC.) - initial API and implementation and/or /// org.eclipse.ice.client.widgets.jme;
* initial documentation //
* // import java.util.concurrent.Callable;import
*******************************************************************************/ /// java.util.concurrent.Future;import
package org.eclipse.ice.client.widgets.jme; /// java.util.concurrent.atomic.AtomicBoolean;
//
import java.util.concurrent.Callable; // import org.eclipse.ice.datastructures.ICEObject.ICEObject;import
import java.util.concurrent.Future; /// org.eclipse.ice.datastructures.ICEObject.IUpdateable;import
import java.util.concurrent.atomic.AtomicBoolean; /// org.eclipse.ice.datastructures.ICEObject.IUpdateableListener;import
/// org.eclipse.ice.viz.service.jme3.application.IRenderQueue;import
import org.eclipse.ice.datastructures.ICEObject.ICEObject; /// org.eclipse.ice.viz.service.jme3.widgets.AbstractView;
import org.eclipse.ice.datastructures.ICEObject.IUpdateable; //
import org.eclipse.ice.datastructures.ICEObject.IUpdateableListener; // import com.jme3.scene.Node;
import org.eclipse.ice.viz.service.jme3.application.IRenderQueue; //
import org.eclipse.ice.viz.service.jme3.widgets.AbstractView; /// ***This
//
import com.jme3.scene.Node; // class provides
// a base implementation for
/** // a controller
* This class provides a base implementation for a controller that manages an // that manages an*
* {@link IUpdateable} model and an {@link AbstractView} associated with that //
* model. It ensures that changes to the model or features provided by the // {@link IUpdateable}
* controller itself are synchronized with the view through the parent //
* SimpleApplication's simpleUpdate() thread. // model and an
* //
* @author Jordan Deyton // {@link AbstractView}
* //
*/ // associated with that*
public abstract class AbstractController implements IUpdateableListener { // model. It ensures
/* // that changes
* Note: We previously had an IControllerListener interface whereby objects // to the
* could listen for changes to an AbstractController. If this interface is // model or
* required for future work, this package (widgets.jme) and the plant // features provided
* package (widgets.reactoreditor.plant) should be selectively reverted to // by the*
* restore IControllerListener, AbstractController, and PipeController to // controller itself are
* their state before 20140903-1600. Also note that this change was // synchronized with the
* committed to the branch. // view through
*/ // the parent*SimpleApplication's
//
/** // simpleUpdate() thread.
* The model for which this controller provides a view. // *
*/ // * @author Jordan Deyton
protected final IUpdateable model; // *
/** // */
* The {@link AbstractView} associated with this controller. // public abstract class AbstractController implements IUpdateableListener {
*/ // /*
private final AbstractView view; // * Note: We previously had an IControllerListener interface whereby objects
// * could listen for changes to an AbstractController. If this interface is
/** // * required for future work, this package (widgets.jme) and the plant
* The queue responsible for tasks that need to be performed on the jME // * package (widgets.reactoreditor.plant) should be selectively reverted to
* rendering thread. // * restore IControllerListener, AbstractController, and PipeController to
*/ // * their state before 20140903-1600. Also note that this change was
protected final IRenderQueue renderQueue; // * committed to the branch.
/** // */
* Whether or not the controller and its view have been disposed. //
*/ // /**
protected final AtomicBoolean disposed; // * The model for which this controller provides a view.
// */
// ---- Base Features ---- // // protected final IUpdateable model;
/** // /**
* The current parent node for the {@link #view}. // * The {@link AbstractView} associated with this controller.
*/ // */
private Node parentNode; // private final AbstractView view;
//
// ----------------------- // // /**
// * The queue responsible for tasks that need to be performed on the jME
/** // * rendering thread.
* The default constructor. If any arguments are invalid (null), an // */
* {@link IllegalArgumentException} is thrown. // protected final IRenderQueue renderQueue;
* // /**
* @param model // * Whether or not the controller and its view have been disposed.
* The model for which this controller provides a view. // */
* @param view // protected final AtomicBoolean disposed;
* The view associated with this controller. This needs to be //
* instantiated by the sub-class. // // ---- Base Features ---- //
* @param renderQueue // /**
* The queue responsible for tasks that need to be performed on // * The current parent node for the {@link #view}.
* the jME rendering thread. // */
*/ // private Node parentNode;
public AbstractController(IUpdateable model, AbstractView view, //
IRenderQueue renderQueue) { // // ----------------------- //
//
// Set the model and register with it. It should not be null. // /**
this.model = (model != null ? model : new ICEObject()); // * The default constructor. If any arguments are invalid (null), an
this.model.register(this); // * {@link IllegalArgumentException} is thrown.
// *
// Set the view. If it is null, create a new, basic view. // * @param model
this.view = (view != null ? view : new AbstractView("Invalid View") { // * The model for which this controller provides a view.
}); // * @param view
// * The view associated with this controller. This needs to be
// Set the update queue. If it is null, create a new queue. // * instantiated by the sub-class.
this.renderQueue = (renderQueue != null ? renderQueue // * @param renderQueue
: new IRenderQueue() { // * The queue responsible for tasks that need to be performed on
@Override // * the jME rendering thread.
public <T> Future<T> enqueue(Callable<T> callable) { // */
return null; // public AbstractController(IUpdateable model, AbstractView view,
} // IRenderQueue renderQueue) {
}); //
// // Set the model and register with it. It should not be null.
// Initialize the disposed boolean. // this.model = (model != null ? model : new ICEObject());
disposed = new AtomicBoolean(false); // this.model.register(this);
//
// ---- Initialize any base features. ---- // // // Set the view. If it is null, create a new, basic view.
parentNode = null; // this.view = (view != null ? view : new AbstractView("Invalid View") {
// --------------------------------------- // // });
//
return; // // Set the update queue. If it is null, create a new queue.
} // this.renderQueue = (renderQueue != null ? renderQueue
// : new IRenderQueue() {
/** // @Override
* @return The model for which this controller provides a view. // public <T> Future<T> enqueue(Callable<T> callable) {
*/ // return null;
public IUpdateable getModel() { // }
return model; // });
} //
// // Initialize the disposed boolean.
/** // disposed = new AtomicBoolean(false);
* Sets the Node to which the associated {@link AbstractView} is attached. //
* // // ---- Initialize any base features. ---- //
* @param node // parentNode = null;
* The new parent node for the associated {@link AbstractView}. // // --------------------------------------- //
*/ //
public void setParentNode(Node node) { // return;
// }
// If the parent node is not null and is different, we can attach the //
// view to the new parent. // /**
if (node != null && node != parentNode) { // * @return The model for which this controller provides a view.
this.parentNode = node; // */
// public IUpdateable getModel() {
// If the controller is not disposed, we should try to attach the // return model;
// view to the new parent. // }
if (!disposed.get()) { //
renderQueue.enqueue(new Callable<Boolean>() { // /**
@Override // * Sets the Node to which the associated {@link AbstractView} is attached.
public Boolean call() { // *
view.setParentNode(parentNode); // * @param node
return true; // * The new parent node for the associated {@link AbstractView}.
} // */
}); // public void setParentNode(Node node) {
} //
} // // If the parent node is not null and is different, we can attach the
// // view to the new parent.
return; // if (node != null && node != parentNode) {
} // this.parentNode = node;
//
/** // // If the controller is not disposed, we should try to attach the
* Disposes of the AbstractController and its associated // // view to the new parent.
* {@link AbstractView}. // if (!disposed.get()) {
*/ // renderQueue.enqueue(new Callable<Boolean>() {
public void dispose() { // @Override
// public Boolean call() {
// If we have not already disposed of the controller, we need to // view.setParentNode(parentNode);
// unregister from the IUpdateable model and, if possible, dispose of // return true;
// the AbstractView managed by this controller. // }
if (disposed.compareAndSet(false, true)) { // });
// Unregister from the model. // }
model.unregister(this); // }
//
// Add a new update action to remove the view. // return;
renderQueue.enqueue(new Callable<Boolean>() { // }
@Override //
public Boolean call() { // /**
view.dispose(); // * Disposes of the AbstractController and its associated
return true; // * {@link AbstractView}.
} // */
}); // public void dispose() {
} //
// // If we have not already disposed of the controller, we need to
return; // // unregister from the IUpdateable model and, if possible, dispose of
} // // the AbstractView managed by this controller.
// if (disposed.compareAndSet(false, true)) {
/** // // Unregister from the model.
* Updates the controller and/or view if the {@link #model} has changed. // model.unregister(this);
*/ //
@Override // // Add a new update action to remove the view.
public abstract void update(IUpdateable component); // renderQueue.enqueue(new Callable<Boolean>() {
// @Override
} // public Boolean call() {
// view.dispose();
// return true;
// }
// });
// }
//
// return;
// }
//
// /**
// * Updates the controller and/or view if the {@link #model} has changed.
// */
// @Override
// public abstract void update(IUpdateable component);
//
// }
/******************************************************************************* /// *******************************************************************************
* Copyright (c) 2014 UT-Battelle, LLC. // * Copyright (c) 2014 UT-Battelle, LLC.
* All rights reserved. This program and the accompanying materials // * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 // * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at // * which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html // * http://www.eclipse.org/legal/epl-v10.html
* // *
* Contributors: // * Contributors:
* Jordan Deyton (UT-Battelle, LLC.) - initial API and implementation and/or // * Jordan Deyton (UT-Battelle, LLC.) - initial API and implementation and/or
* initial documentation // * initial documentation
* // *
*******************************************************************************/ // *******************************************************************************/
package org.eclipse.ice.client.widgets.jme; // package org.eclipse.ice.client.widgets.jme;
//
import org.eclipse.ice.client.widgets.reactoreditor.plant.PlantAppState; // import org.eclipse.ice.client.widgets.reactoreditor.plant.PlantAppState;
import org.eclipse.ice.reactor.plant.PlantComposite; // import org.eclipse.ice.reactor.plant.PlantComposite;
import org.eclipse.ice.viz.service.jme3.application.MasterApplication; // import org.eclipse.ice.viz.service.jme3.application.MasterApplication;
import org.eclipse.ice.viz.service.jme3.application.ViewAppState; // import org.eclipse.ice.viz.service.jme3.application.ViewAppState;
import org.eclipse.ice.viz.service.jme3.internal.MasterApplicationHolder; // import org.eclipse.ice.viz.service.jme3.internal.MasterApplicationHolder;
//
/** /// **
* This factory is used to create custom {@link ViewAppState}s for components // * This factory is used to create custom {@link ViewAppState}s for components
* including <code>GeometryComponent</code>s, <code>MeshComponent</code>s, and // * including <code>GeometryComponent</code>s, <code>MeshComponent</code>s, and
* <code>PlantComposite</code>s. To embed the view in an SWT // * <code>PlantComposite</code>s. To embed the view in an SWT
* <code>Composite</code>, see // * <code>Composite</code>, see
* {@link ViewAppState#createComposite(org.eclipse.swt.widgets.Composite)}. // * {@link ViewAppState#createComposite(org.eclipse.swt.widgets.Composite)}.
* // *
* @author Jordan // * @author Jordan
* // *
*/ // */
public class ViewFactory { // public class ViewFactory {
//
// TODO We may want to handle this via an OSGi-based factories and registry. // // TODO We may want to handle this via an OSGi-based factories and registry.
//
/** // /**
* The core <code>MasterApplication</code> that renders all of the views. // * The core <code>MasterApplication</code> that renders all of the views.
*/ // */
private final MasterApplication app; // private final MasterApplication app;
//
/** // /**
* The default constructor. // * The default constructor.
*/ // */
public ViewFactory() { // public ViewFactory() {
this(false); // this(false);
} // }
//
/** // /**
* A constructor that allows the <code>ViewFactory</code> to create its own // * A constructor that allows the <code>ViewFactory</code> to create its own
* {@link MasterApplication} if the OSGi-provided // * {@link MasterApplication} if the OSGi-provided
* <code>MasterApplication</code> is not available. // * <code>MasterApplication</code> is not available.
* <p> // * <p>
* <b>Note:</b> This is <i>not intended</i> for use inside ICE but inside // * <b>Note:</b> This is <i>not intended</i> for use inside ICE but inside
* static applications. In ICE, the <code>MasterApplication</code> is // * static applications. In ICE, the <code>MasterApplication</code> is
* created only via an OSGi-provided factory. // * created only via an OSGi-provided factory.
* </p> // * </p>