websockets updated
diff --git a/services/org.eclipse.sensinact.studio.http.services/src/org/eclipse/sensinact/studio/http/services/client/GatewayHttpClient.java b/services/org.eclipse.sensinact.studio.http.services/src/org/eclipse/sensinact/studio/http/services/client/GatewayHttpClient.java
index ac4a2d3..8fda25d 100644
--- a/services/org.eclipse.sensinact.studio.http.services/src/org/eclipse/sensinact/studio/http/services/client/GatewayHttpClient.java
+++ b/services/org.eclipse.sensinact.studio.http.services/src/org/eclipse/sensinact/studio/http/services/client/GatewayHttpClient.java
@@ -144,8 +144,6 @@
String json = null;
MsgSensinact retval;
try {
- //httpURLConnection.setRequestProperty("Connection","close");
-
Representation cmd = clientResource.get();
json = cmd.getText();
cmd.exhaust();
@@ -205,6 +203,7 @@
Context context = new Context();
context.getParameters().add("socketTimeout", Integer.toString(timeout));
context.getParameters().add("idleTimeout", Integer.toString(timeout));
+ context.getParameters().add("readTimeout", Integer.toString(timeout));
return context;
}
diff --git a/services/org.eclipse.sensinact.studio.http.services/src/org/eclipse/sensinact/studio/http/services/client/connectionmanager/Connection.java b/services/org.eclipse.sensinact.studio.http.services/src/org/eclipse/sensinact/studio/http/services/client/connectionmanager/Connection.java
index 43ee49d..dc4e4b2 100644
--- a/services/org.eclipse.sensinact.studio.http.services/src/org/eclipse/sensinact/studio/http/services/client/connectionmanager/Connection.java
+++ b/services/org.eclipse.sensinact.studio.http.services/src/org/eclipse/sensinact/studio/http/services/client/connectionmanager/Connection.java
@@ -14,13 +14,8 @@
import java.net.URI;
import org.apache.log4j.Logger;
-import org.eclipse.jetty.util.component.Container;
-import org.eclipse.jetty.util.component.LifeCycle;
-import org.eclipse.jetty.util.component.LifeCycle.Listener;
import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;
import org.eclipse.jetty.websocket.client.WebSocketClient;
-import org.eclipse.jetty.websocket.common.WebSocketSession;
-import org.eclipse.jetty.websocket.common.WebSocketSessionListener;
public class Connection {
@@ -47,61 +42,8 @@
this.client = new WebSocketClient();
try {
-
- org.eclipse.jetty.util.component.Container.Listener l = new org.eclipse.jetty.util.component.Container.Listener() {
-
- @Override
- public void beanRemoved(Container parent, Object child) {
- System.out.println("a");
-
- }
-
- @Override
- public void beanAdded(Container parent, Object child) {
- System.out.println("a");
-
- }
- };
-
- client.addEventListener(l);
-
-
- client.addLifeCycleListener(new Listener() {
-
- @Override
- public void lifeCycleStopping(LifeCycle event) {
- System.out.println("a");
-
- }
-
- @Override
- public void lifeCycleStopped(LifeCycle event) {
- System.out.println("a");
-
- }
-
- @Override
- public void lifeCycleStarting(LifeCycle event) {
- System.out.println("a");
-
- }
-
- @Override
- public void lifeCycleStarted(LifeCycle event) {
- System.out.println("a");
-
- }
-
- @Override
- public void lifeCycleFailure(LifeCycle event, Throwable cause) {
- System.out.println("a");
- }
- });
-
client.start();
client.connect(socket, url, request);
-
-
} catch (Throwable t) {
throw new ConnectException("Cant (re)connect gateway " + gatewayName + ": " + t.getMessage());
}
diff --git a/services/org.eclipse.sensinact.studio.http.services/src/org/eclipse/sensinact/studio/http/services/client/connectionmanager/NotifDispatcher.java b/services/org.eclipse.sensinact.studio.http.services/src/org/eclipse/sensinact/studio/http/services/client/connectionmanager/NotifDispatcher.java
index 2c39022..d056e41 100644
--- a/services/org.eclipse.sensinact.studio.http.services/src/org/eclipse/sensinact/studio/http/services/client/connectionmanager/NotifDispatcher.java
+++ b/services/org.eclipse.sensinact.studio.http.services/src/org/eclipse/sensinact/studio/http/services/client/connectionmanager/NotifDispatcher.java
@@ -59,7 +59,6 @@
}
void notifyMessage(String gatewayName, String msg) {
- System.out.println("Message " + msg);
List<MsgSensinact> lifecycleMsgs = new ArrayList<>();
List<MsgSensinact> valueMsgs = new ArrayList<>();
diff --git a/services/org.eclipse.sensinact.studio.model.manager/src/org/eclipse/sensinact/studio/model/manager/modelupdater/ModelUpdater.java b/services/org.eclipse.sensinact.studio.model.manager/src/org/eclipse/sensinact/studio/model/manager/modelupdater/ModelUpdater.java
index 1bdd0b1..9c5cbec 100644
--- a/services/org.eclipse.sensinact.studio.model.manager/src/org/eclipse/sensinact/studio/model/manager/modelupdater/ModelUpdater.java
+++ b/services/org.eclipse.sensinact.studio.model.manager/src/org/eclipse/sensinact/studio/model/manager/modelupdater/ModelUpdater.java
@@ -330,7 +330,7 @@
@Override
public void onConnect(String gatewayname) {
- System.out.println("CONNECT !!!!!!!!!!!!!");
+ logger.info("Gateway " + gatewayname + " connected");
}
@Override
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/.classpath b/services/org.eclipse.sensinact.studio.model.resource.tests/.classpath
deleted file mode 100644
index 22f3064..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/.project b/services/org.eclipse.sensinact.studio.model.resource.tests/.project
deleted file mode 100644
index 4e34afa..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.sensinact.studio.model.resource.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/META-INF/MANIFEST.MF b/services/org.eclipse.sensinact.studio.model.resource.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index b1e1068..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.sensinact.studio.model.resource.tests;singleton:=true
-Automatic-Module-Name: org.eclipse.sensinact.studio.model.resource.tests
-Bundle-Version: 1.0.0.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Export-Package: org.eclipse.sensinact.studio.resource.tests
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.sensinact.studio.model.resource;visibility:=reexport,
- org.eclipse.emf.ecore.xmi;visibility:=reexport,
- org.junit;visibility:=reexport
-Bundle-ActivationPolicy: lazy
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/about.html b/services/org.eclipse.sensinact.studio.model.resource.tests/about.html
deleted file mode 100644
index 3b39f88..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/about.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-
-</body></html>
\ No newline at end of file
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/build.properties b/services/org.eclipse.sensinact.studio.model.resource.tests/build.properties
deleted file mode 100644
index 1d3c438..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (c) 2018 CEA.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# CEA - initial API and implementation and/or initial documentation
-#
-
-#
-
-bin.includes = .,\
- META-INF/,\
- plugin.properties
-jars.compile.order = .
-source.. = src/
-output.. = bin/
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/plugin.properties b/services/org.eclipse.sensinact.studio.model.resource.tests/plugin.properties
deleted file mode 100644
index 98c4320..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/plugin.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright (c) 2018 CEA.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# CEA - initial API and implementation and/or initial documentation
-#
-
-#
-
-pluginName = Resource Tests
-providerName = www.example.org
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/AccessMethodTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/AccessMethodTest.java
deleted file mode 100644
index b22529a..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/AccessMethodTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.framework.TestCase;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.AccessMethod;
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Access Method</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class AccessMethodTest extends TestCase {
-
- /**
- * The fixture for this Access Method test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AccessMethod fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(AccessMethodTest.class);
- }
-
- /**
- * Constructs a new Access Method test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AccessMethodTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Access Method test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void setFixture(AccessMethod fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Access Method test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected AccessMethod getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createAccessMethod());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //AccessMethodTest
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ActionTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ActionTest.java
deleted file mode 100644
index 42c496c..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ActionTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.Action;
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Action</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class ActionTest extends ResourceTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ActionTest.class);
- }
-
- /**
- * Constructs a new Action test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ActionTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Action test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected Action getFixture() {
- return (Action)fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createAction());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //ActionTest
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/AttributeTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/AttributeTest.java
deleted file mode 100644
index b089bbb..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/AttributeTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.Attribute;
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Attribute</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class AttributeTest extends TypedElementTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(AttributeTest.class);
- }
-
- /**
- * Constructs a new Attribute test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AttributeTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Attribute test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected Attribute getFixture() {
- return (Attribute)fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createAttribute());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //AttributeTest
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/DeviceTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/DeviceTest.java
deleted file mode 100644
index 8d328cb..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/DeviceTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.Device;
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Device</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class DeviceTest extends NamedElementTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(DeviceTest.class);
- }
-
- /**
- * Constructs a new Device test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DeviceTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Device test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected Device getFixture() {
- return (Device)fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createDevice());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //DeviceTest
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/GatewayTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/GatewayTest.java
deleted file mode 100644
index e336a28..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/GatewayTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.Gateway;
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Gateway</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class GatewayTest extends NamedElementTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(GatewayTest.class);
- }
-
- /**
- * Constructs a new Gateway test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GatewayTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Gateway test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected Gateway getFixture() {
- return (Gateway)fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createGateway());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //GatewayTest
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/MetadataTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/MetadataTest.java
deleted file mode 100644
index e786559..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/MetadataTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.Metadata;
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Metadata</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class MetadataTest extends TypedElementTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(MetadataTest.class);
- }
-
- /**
- * Constructs a new Metadata test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public MetadataTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Metadata test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected Metadata getFixture() {
- return (Metadata)fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createMetadata());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //MetadataTest
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/NamedElementTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/NamedElementTest.java
deleted file mode 100644
index f9a9a49..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/NamedElementTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.framework.TestCase;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.NamedElement;
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Named Element</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class NamedElementTest extends TestCase {
-
- /**
- * The fixture for this Named Element test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected NamedElement fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(NamedElementTest.class);
- }
-
- /**
- * Constructs a new Named Element test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NamedElementTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Named Element test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void setFixture(NamedElement fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Named Element test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected NamedElement getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createNamedElement());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //NamedElementTest
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ParameterTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ParameterTest.java
deleted file mode 100644
index d025869..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ParameterTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.Parameter;
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Parameter</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class ParameterTest extends TypedElementTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ParameterTest.class);
- }
-
- /**
- * Constructs a new Parameter test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ParameterTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Parameter test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected Parameter getFixture() {
- return (Parameter)fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createParameter());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //ParameterTest
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/PropertyTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/PropertyTest.java
deleted file mode 100644
index 44fa745..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/PropertyTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.Property;
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Property</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class PropertyTest extends ResourceTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(PropertyTest.class);
- }
-
- /**
- * Constructs a new Property test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PropertyTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Property test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected Property getFixture() {
- return (Property)fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createProperty());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //PropertyTest
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ResourceAllTests.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ResourceAllTests.java
deleted file mode 100644
index c5c2290..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ResourceAllTests.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import junit.textui.TestRunner;
-
-/**
- * <!-- begin-user-doc -->
- * A test suite for the '<em><b>Resource</b></em>' model.
- * <!-- end-user-doc -->
- * @generated
- */
-public class ResourceAllTests extends TestSuite {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(suite());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static Test suite() {
- TestSuite suite = new ResourceAllTests("Resource Tests");
- suite.addTest(ResourceTests.suite());
- return suite;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ResourceAllTests(String name) {
- super(name);
- }
-
-} //ResourceAllTests
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ResourceExample.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ResourceExample.java
deleted file mode 100644
index c3759c9..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ResourceExample.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-
-import org.eclipse.emf.ecore.util.Diagnostician;
-
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
-
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-import org.eclipse.sensinact.studio.resource.ResourcePackage;
-import org.eclipse.sensinact.studio.resource.Studio;
-
-/**
- * <!-- begin-user-doc -->
- * A sample utility for the '<em><b>resource</b></em>' package.
- * <!-- end-user-doc -->
- * @generated
- */
-public class ResourceExample {
- /**
- * <!-- begin-user-doc -->
- * Load all the argument file paths or URIs as instances of the model.
- * <!-- end-user-doc -->
- * @param args the file paths or URIs.
- * @generated
- */
- public static void main(String[] args) {
- // Create a resource set to hold the resources.
- //
- ResourceSet resourceSet = new ResourceSetImpl();
-
- // Register the appropriate resource factory to handle all file extensions.
- //
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put
- (Resource.Factory.Registry.DEFAULT_EXTENSION,
- new XMIResourceFactoryImpl());
-
- // Register the package to ensure it is available during loading.
- //
- resourceSet.getPackageRegistry().put
- (ResourcePackage.eNS_URI,
- ResourcePackage.eINSTANCE);
-
- // If there are no arguments, emit an appropriate usage message.
- //
- if (args.length == 0) {
- System.out.println("Enter a list of file paths or URIs that have content like this:");
- try {
- Resource resource = resourceSet.createResource(URI.createURI("http:///My.resource"));
- Studio root = ResourceFactory.eINSTANCE.createStudio();
- resource.getContents().add(root);
- resource.save(System.out, null);
- }
- catch (IOException exception) {
- exception.printStackTrace();
- }
- }
- else {
- // Iterate over all the arguments.
- //
- for (int i = 0; i < args.length; ++i) {
- // Construct the URI for the instance file.
- // The argument is treated as a file path only if it denotes an existing file.
- // Otherwise, it's directly treated as a URL.
- //
- File file = new File(args[i]);
- URI uri = file.isFile() ? URI.createFileURI(file.getAbsolutePath()): URI.createURI(args[i]);
-
- try {
- // Demand load resource for this file.
- //
- Resource resource = resourceSet.getResource(uri, true);
- System.out.println("Loaded " + uri);
-
- // Validate the contents of the loaded resource.
- //
- for (EObject eObject : resource.getContents()) {
- Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject);
- if (diagnostic.getSeverity() != Diagnostic.OK) {
- printDiagnostic(diagnostic, "");
- }
- }
- }
- catch (RuntimeException exception) {
- System.out.println("Problem loading " + uri);
- exception.printStackTrace();
- }
- }
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * Prints diagnostics with indentation.
- * <!-- end-user-doc -->
- * @param diagnostic the diagnostic to print.
- * @param indent the indentation for printing.
- * @generated
- */
- protected static void printDiagnostic(Diagnostic diagnostic, String indent) {
- System.out.print(indent);
- System.out.println(diagnostic.getMessage());
- for (Diagnostic child : diagnostic.getChildren()) {
- printDiagnostic(child, indent + " ");
- }
- }
-
-} //ResourceExample
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ResourceTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ResourceTest.java
deleted file mode 100644
index 8319328..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ResourceTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.Resource;
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Resource</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following operations are tested:
- * <ul>
- * <li>{@link org.eclipse.sensinact.studio.resource.Resource#getAccessMethod(org.eclipse.sensinact.studio.resource.AccessMethodType) <em>Get Access Method</em>}</li>
- * </ul>
- * </p>
- * @generated
- */
-public class ResourceTest extends NamedElementTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ResourceTest.class);
- }
-
- /**
- * Constructs a new Resource test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ResourceTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Resource test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected Resource getFixture() {
- return (Resource)fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createResource());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
- /**
- * Tests the '{@link org.eclipse.sensinact.studio.resource.Resource#getAccessMethod(org.eclipse.sensinact.studio.resource.AccessMethodType) <em>Get Access Method</em>}' operation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.sensinact.studio.resource.Resource#getAccessMethod(org.eclipse.sensinact.studio.resource.AccessMethodType)
- * @generated
- */
- public void testGetAccessMethod__AccessMethodType() {
- // TODO: implement this operation test method
- // Ensure that you remove @generated or mark it @generated NOT
- fail();
- }
-
-} //ResourceTest
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ResourceTests.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ResourceTests.java
deleted file mode 100644
index 57c90b2..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ResourceTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import junit.textui.TestRunner;
-
-/**
- * <!-- begin-user-doc -->
- * A test suite for the '<em><b>resource</b></em>' package.
- * <!-- end-user-doc -->
- * @generated
- */
-public class ResourceTests extends TestSuite {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(suite());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static Test suite() {
- TestSuite suite = new ResourceTests("resource Tests");
- suite.addTestSuite(ResourceTest.class);
- suite.addTestSuite(PropertyTest.class);
- suite.addTestSuite(SensorDataTest.class);
- suite.addTestSuite(StateVariableTest.class);
- suite.addTestSuite(ActionTest.class);
- return suite;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ResourceTests(String name) {
- super(name);
- }
-
-} //ResourceTests
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/SensorDataTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/SensorDataTest.java
deleted file mode 100644
index b479472..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/SensorDataTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-import org.eclipse.sensinact.studio.resource.SensorData;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Sensor Data</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class SensorDataTest extends ResourceTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(SensorDataTest.class);
- }
-
- /**
- * Constructs a new Sensor Data test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SensorDataTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Sensor Data test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected SensorData getFixture() {
- return (SensorData)fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createSensorData());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //SensorDataTest
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ServiceTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ServiceTest.java
deleted file mode 100644
index 8ba2514..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/ServiceTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-import org.eclipse.sensinact.studio.resource.Service;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Service</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class ServiceTest extends NamedElementTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(ServiceTest.class);
- }
-
- /**
- * Constructs a new Service test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ServiceTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Service test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected Service getFixture() {
- return (Service)fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createService());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //ServiceTest
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/StateVariableTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/StateVariableTest.java
deleted file mode 100644
index ccb7476..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/StateVariableTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-import org.eclipse.sensinact.studio.resource.StateVariable;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>State Variable</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class StateVariableTest extends ResourceTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(StateVariableTest.class);
- }
-
- /**
- * Constructs a new State Variable test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public StateVariableTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this State Variable test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected StateVariable getFixture() {
- return (StateVariable)fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createStateVariable());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //StateVariableTest
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/StudioTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/StudioTest.java
deleted file mode 100644
index ea34649..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/StudioTest.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.framework.TestCase;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-import org.eclipse.sensinact.studio.resource.Studio;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Studio</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class StudioTest extends TestCase {
-
- /**
- * The fixture for this Studio test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Studio fixture = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(StudioTest.class);
- }
-
- /**
- * Constructs a new Studio test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public StudioTest(String name) {
- super(name);
- }
-
- /**
- * Sets the fixture for this Studio test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void setFixture(Studio fixture) {
- this.fixture = fixture;
- }
-
- /**
- * Returns the fixture for this Studio test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Studio getFixture() {
- return fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createStudio());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //StudioTest
diff --git a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/TypedElementTest.java b/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/TypedElementTest.java
deleted file mode 100644
index 54b55e4..0000000
--- a/services/org.eclipse.sensinact.studio.model.resource.tests/src/org/eclipse/sensinact/studio/resource/tests/TypedElementTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Copyright (c) 2019 CEA.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * CEA - initial API and implementation and/or initial documentation
- */
-/**
- */
-package org.eclipse.sensinact.studio.resource.tests;
-
-import junit.textui.TestRunner;
-
-import org.eclipse.sensinact.studio.resource.ResourceFactory;
-import org.eclipse.sensinact.studio.resource.TypedElement;
-
-/**
- * <!-- begin-user-doc -->
- * A test case for the model object '<em><b>Typed Element</b></em>'.
- * <!-- end-user-doc -->
- * @generated
- */
-public class TypedElementTest extends NamedElementTest {
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static void main(String[] args) {
- TestRunner.run(TypedElementTest.class);
- }
-
- /**
- * Constructs a new Typed Element test case with the given name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public TypedElementTest(String name) {
- super(name);
- }
-
- /**
- * Returns the fixture for this Typed Element test case.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected TypedElement getFixture() {
- return (TypedElement)fixture;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#setUp()
- * @generated
- */
- @Override
- protected void setUp() throws Exception {
- setFixture(ResourceFactory.eINSTANCE.createTypedElement());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see junit.framework.TestCase#tearDown()
- * @generated
- */
- @Override
- protected void tearDown() throws Exception {
- setFixture(null);
- }
-
-} //TypedElementTest
diff --git a/services/org.eclipse.sensinact.studio.preferences/src/org/eclipse/sensinact/studio/preferences/GatewayHttpConfig.java b/services/org.eclipse.sensinact.studio.preferences/src/org/eclipse/sensinact/studio/preferences/GatewayHttpConfig.java
index 1dac89d..1d02cbd 100644
--- a/services/org.eclipse.sensinact.studio.preferences/src/org/eclipse/sensinact/studio/preferences/GatewayHttpConfig.java
+++ b/services/org.eclipse.sensinact.studio.preferences/src/org/eclipse/sensinact/studio/preferences/GatewayHttpConfig.java
@@ -77,9 +77,11 @@
}
public URI getWebsocketURI() throws URISyntaxException {
- String host = getURL().getHost();
- String url = String.format("ws://%s:8080/ws", host);
- return new URI(url);
+ URL url = getURL();
+ String host = url.getHost();
+ int port = url.getPort();
+ String wsuri = String.format("ws://%s:%d/ws", host, port);
+ return new URI(wsuri);
}
public int getTimeout() {
diff --git a/ui/org.eclipse.sensinact.studio.navigator.device/src/org/eclipse/sensinact/studio/navigator/device/ui/dialogs/resourceInvoker/ResourceInvokerDialog.java b/ui/org.eclipse.sensinact.studio.navigator.device/src/org/eclipse/sensinact/studio/navigator/device/ui/dialogs/resourceInvoker/ResourceInvokerDialog.java
index 06f3012..2f8c3c0 100644
--- a/ui/org.eclipse.sensinact.studio.navigator.device/src/org/eclipse/sensinact/studio/navigator/device/ui/dialogs/resourceInvoker/ResourceInvokerDialog.java
+++ b/ui/org.eclipse.sensinact.studio.navigator.device/src/org/eclipse/sensinact/studio/navigator/device/ui/dialogs/resourceInvoker/ResourceInvokerDialog.java
@@ -175,10 +175,7 @@
AccessMethodType type = method.getType();
Segments segments = new Segments.Builder().resource(descriptor).method(type).build();
if (type.equals(AccessMethodType.GET)) {
- System.out.println("Before GET");
MsgSensinact msg = GatewayHttpClient.sendGetRequest(segments);
- System.out.println("After GET");
- System.out.println("");
return msg.getType() + "\n" + msg.toString();
} else {
RequestParameter[] params = parameterComposite.getParametersValues(method);
diff --git a/ui/org.eclipse.sensinact.studio.view.visualizer/src/org/eclipse/sensinact/studio/view/visualizer/VisualizerView.java b/ui/org.eclipse.sensinact.studio.view.visualizer/src/org/eclipse/sensinact/studio/view/visualizer/VisualizerView.java
index 597f1b1..0d5166b 100644
--- a/ui/org.eclipse.sensinact.studio.view.visualizer/src/org/eclipse/sensinact/studio/view/visualizer/VisualizerView.java
+++ b/ui/org.eclipse.sensinact.studio.view.visualizer/src/org/eclipse/sensinact/studio/view/visualizer/VisualizerView.java
@@ -202,7 +202,7 @@
float value = Long.parseLong(valAsStr);
updateGraph(resource, value);
} else {
- System.out.println(this.getClass().getCanonicalName() + ": Type " + type + " cannot produce chart");
+ logger.info(this.getClass().getCanonicalName() + ": Type " + type + " cannot produce chart");
}
}
});