Commit 5d6874d5 authored by Robert Smith's avatar Robert Smith
Browse files

Created org.eclipse.ice.tests.renderer package



Created an org.eclipse.ice.tests.renderer package and moved the test
classes into it.
Signed-off-by: Robert Smith's avatarRobert Smith <smithrw@ornl.gov>
parent 2bf3c97d
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<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 combineaccessrules="false" kind="src" path="/org.eclipse.ice.renderer"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.ice.tests.renderer</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=1.8
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.ice</groupId>
<artifactId>org.eclipse.ice.parent</artifactId>
<version>2.2.1-SNAPSHOT</version>
<name>Renderer Prototype</name>
<description>This is a prototype rendering utility for Eclipse ICE 3.0 and other projects.</description>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.10.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Initial API and implementation and/or initial documentation - * Initial API and implementation and/or initial documentation -
* Jay Jay Billings * Jay Jay Billings
*******************************************************************************/ *******************************************************************************/
package org.eclipse.ice.renderer; package org.eclipse.ice.tests.renderer;
import com.google.inject.AbstractModule; import com.google.inject.AbstractModule;
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
* Initial API and implementation and/or initial documentation - * Initial API and implementation and/or initial documentation -
* Jay Jay Billings * Jay Jay Billings
*******************************************************************************/ *******************************************************************************/
package org.eclipse.ice.renderer; package org.eclipse.ice.tests.renderer;
import org.eclipse.ice.renderer.DataElement;
public class HTMLView { public class HTMLView {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Initial API and implementation and/or initial documentation - * Initial API and implementation and/or initial documentation -
* Jay Jay Billings * Jay Jay Billings
*******************************************************************************/ *******************************************************************************/
package org.eclipse.ice.renderer; package org.eclipse.ice.tests.renderer;
import com.google.inject.Guice; import com.google.inject.Guice;
import com.google.inject.Injector; import com.google.inject.Injector;
......
...@@ -9,13 +9,18 @@ ...@@ -9,13 +9,18 @@
* Initial API and implementation and/or initial documentation - * Initial API and implementation and/or initial documentation -
* Jay Jay Billings * Jay Jay Billings
*******************************************************************************/ *******************************************************************************/
package org.eclipse.ice.renderer; package org.eclipse.ice.tests.renderer;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;
import javax.inject.Inject; import javax.inject.Inject;
import org.eclipse.ice.renderer.DataElement;
import org.eclipse.ice.renderer.Renderer;
//import gov.ornl.rse.renderer.client.test.Offset;
/** /**
* @author Jay Jay Billings * @author Jay Jay Billings
* *
...@@ -28,8 +33,8 @@ public class RendererRunner { ...@@ -28,8 +33,8 @@ public class RendererRunner {
@Inject @Inject
DataElement<String> dataString; DataElement<String> dataString;
@Inject //@Inject
DataElement<Offset> sampleOffset; //DataElement<Offset> sampleOffset;
@Inject @Inject
Renderer<HTMLView, Boolean> renderer; Renderer<HTMLView, Boolean> renderer;
...@@ -37,8 +42,8 @@ public class RendererRunner { ...@@ -37,8 +42,8 @@ public class RendererRunner {
@Inject @Inject
Renderer<HTMLView, String> stringRenderer; Renderer<HTMLView, String> stringRenderer;
@Inject //@Inject
Renderer<HTMLView, Offset> osRenderer; //Renderer<HTMLView, Offset> osRenderer;
/** /**
* @param args * @param args
...@@ -53,7 +58,7 @@ public class RendererRunner { ...@@ -53,7 +58,7 @@ public class RendererRunner {
// Create a handler to tell the renderer how to draw to the screen // Create a handler to tell the renderer how to draw to the screen
BiConsumer<HTMLView, DataElement<Boolean>> drawViewFunc = (v, w) -> v.draw(w); BiConsumer<HTMLView, DataElement<Boolean>> drawViewFunc = (v, w) -> v.draw(w);
BiConsumer<HTMLView, DataElement<String>> stringViewFunc = (v, w) -> v.draw(w); BiConsumer<HTMLView, DataElement<String>> stringViewFunc = (v, w) -> v.draw(w);
BiConsumer<HTMLView, DataElement<Offset>> offsetViewFunc = (v, w) -> v.draw(w); //BiConsumer<HTMLView, DataElement<Offset>> offsetViewFunc = (v, w) -> v.draw(w);
// Setup some test values and test some stuff // Setup some test values and test some stuff
testSomeStuff(); testSomeStuff();
...@@ -73,30 +78,30 @@ public class RendererRunner { ...@@ -73,30 +78,30 @@ public class RendererRunner {
stringRenderer.render(); stringRenderer.render();
// Configure one with Pojo data // Configure one with Pojo data
osRenderer.setDrawMethod(offsetViewFunc); //osRenderer.setDrawMethod(offsetViewFunc);
osRenderer.setDataElement(sampleOffset); //osRenderer.setDataElement(sampleOffset);
osRenderer.render(); //osRenderer.render();
} }
private void testSomeStuff() { private void testSomeStuff() {
// Decorated property - description // Decorated property - description
sampleOffset.setDescription("Sample Offset in mm"); //sampleOffset.setDescription("Sample Offset in mm");
// Data property - use // Data property - use
sampleOffset.setData(new Offset()); //sampleOffset.setData(new Offset());
// System.out.println("Offset"); // System.out.println("Offset");
sampleOffset.getData().setUsed(true); //sampleOffset.getData().setUsed(true);
// System.out.println(sampleOffset); // System.out.println(sampleOffset);
String offset = sampleOffset.toString(); //String offset = sampleOffset.toString();
sampleOffset.getData().setValue(5.0); //sampleOffset.getData().setValue(5.0);
sampleOffset.getData().setUsed(false); //sampleOffset.getData().setUsed(false);
System.out.println(sampleOffset); //System.out.println(sampleOffset);
System.out.println("----- From String -----"); System.out.println("----- From String -----");
sampleOffset.fromString(offset); //sampleOffset.fromString(offset);
System.out.println("----- -----"); System.out.println("----- -----");
System.out.println(sampleOffset.toString()); //System.out.println(sampleOffset.toString());
// Read in and configure defaults // Read in and configure defaults
DataElement<Double> scaleFactor = new DataElement<Double>(); DataElement<Double> scaleFactor = new DataElement<Double>();
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
* Initial API and implementation and/or initial documentation - * Initial API and implementation and/or initial documentation -
* Jay Jay Billings * Jay Jay Billings
*******************************************************************************/ *******************************************************************************/
package org.eclipse.ice.renderer; package gov.ornl.rse.renderer.client.test;
import org.eclipse.ice.renderer.DataElement;
/** /**
* @author Jay Jay Billings * @author Jay Jay Billings
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Initial API and implementation and/or initial documentation - * Initial API and implementation and/or initial documentation -
* Jay Jay Billings * Jay Jay Billings
*******************************************************************************/ *******************************************************************************/
package org.eclipse.ice.renderer; package gov.ornl.rse.renderer.client.test;
/** /**
* @author Jay Jay Billings * @author Jay Jay Billings
......
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