Commit dac877c4 authored by Robert Smith's avatar Robert Smith
Browse files

Add test for PlotEditor

Adds a SWTBot test case for the plot editor.
parent ce132dd3
......@@ -1375,7 +1375,7 @@ public class MeshAppState extends ViewAppState implements
vSize = vertexSize;
vertexSize = (distance < 10f ? 0.0159f * distance + 0.0413f
: 0.2f);
if (vSize != vertexSize) {
if (Math.abs(vSize - vertexSize) > 0.001f) {
updateVertices = true;
vSize = vertexSize;
}
......@@ -1385,7 +1385,7 @@ public class MeshAppState extends ViewAppState implements
// changed.
eSize = edgeSize;
edgeSize = (distance < 10f ? 0.1f * distance + 4f : 5f);
if (eSize != edgeSize) {
if (Math.abs(eSize - edgeSize) > 0.001f) {
updateEdges = true;
eSize = edgeSize;
}
......
......@@ -66,7 +66,7 @@ public class ToolItemMenuListener implements Listener {
// event.detail == SWT.ARROW means the arrow has been clicked.
// event.detail == SWT.NONE means the button has been clicked.
if (event.detail == SWT.ARROW | event.detail == SWT.NONE) {
if (event.detail == SWT.ARROW || event.detail == SWT.NONE) {
Rectangle r = toolItem.getBounds();
Point p = new Point(r.x, r.y + r.height);
p = toolItem.getParent().toDisplay(p.x, p.y);
......
......@@ -67,7 +67,7 @@ public class CoreConnectDialog extends Dialog {
portLabel.setText("Port: ");
// Create a new text box to input port
portField = new Text(comp, SWT.SINGLE | SWT.SINGLE);
portField = new Text(comp, SWT.SINGLE);
data = new GridData(GridData.FILL_HORIZONTAL);
portField.setLayoutData(data);
......
......@@ -111,7 +111,7 @@ public class NewItemWizard extends Wizard implements INewWizard {
String selectedItem = page.getSelectedItem();
// Direct the client to create a new Item if a selection was made
if (selectedItem != null && selectedItem != null) {
if (selectedItem != null) {
finished = client.createItem(selectedItem) > 0;
}
......
......@@ -10906,6 +10906,44 @@
</entry>
</properties>
</ListElement>
<ListElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="material">
<name>34S</name>
<size>1</size>
<properties>
<entry>
<key>Inc xs</key>
<value>0.0</value>
</entry>
<entry>
<key>mmabs/l (Å-2)</key>
<value>2.24E13</value>
</entry>
<entry>
<key>M (amu)</key>
<value>34.0</value>
</entry>
<entry>
<key>Coh b</key>
<value>3.48</value>
</entry>
<entry>
<key>Dens (g/cm3)</key>
<value>0.0</value>
</entry>
<entry>
<key>Abs xs</key>
<value>0.227</value>
</entry>
<entry>
<key>Dens (at/nm3)</key>
<value>0.0</value>
</entry>
<entry>
<key>mminc (Å-1)</key>
<value>0.0</value>
</entry>
</properties>
</ListElement>
<ListElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="material">
<name>195Pt</name>
<size>1</size>
......@@ -10945,7 +10983,7 @@
</properties>
</ListElement>
<ListElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="material">
<name>34S</name>
<name>154Gd</name>
<size>1</size>
<properties>
<entry>
......@@ -10954,15 +10992,15 @@
</entry>
<entry>
<key>mmabs/l (Å-2)</key>
<value>2.24E13</value>
<value>1.85E15</value>
</entry>
<entry>
<key>M (amu)</key>
<value>34.0</value>
<value>154.0</value>
</entry>
<entry>
<key>Coh b</key>
<value>3.48</value>
<value>10.0</value>
</entry>
<entry>
<key>Dens (g/cm3)</key>
......@@ -10970,7 +11008,7 @@
</entry>
<entry>
<key>Abs xs</key>
<value>0.227</value>
<value>85.0</value>
</entry>
<entry>
<key>Dens (at/nm3)</key>
......@@ -11021,78 +11059,78 @@
</properties>
</ListElement>
<ListElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="material">
<name>154Gd</name>
<name>P</name>
<size>1</size>
<properties>
<entry>
<key>Inc xs</key>
<value>0.0</value>
<value>0.005</value>
</entry>
<entry>
<key>mmabs/l (Å-2)</key>
<value>1.85E15</value>
<value>1.86E13</value>
</entry>
<entry>
<key>M (amu)</key>
<value>154.0</value>
<value>30.9738</value>
</entry>
<entry>
<key>Coh b</key>
<value>10.0</value>
<value>5.13</value>
</entry>
<entry>
<key>Dens (g/cm3)</key>
<value>0.0</value>
<value>2.3</value>
</entry>
<entry>
<key>Abs xs</key>
<value>85.0</value>
<value>0.172</value>
</entry>
<entry>
<key>Dens (at/nm3)</key>
<value>0.0</value>
<value>44.72</value>
</entry>
<entry>
<key>mminc (Å-1)</key>
<value>0.0</value>
<value>9.72E11</value>
</entry>
</properties>
</ListElement>
<ListElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="material">
<name>P</name>
<name>67Zn</name>
<size>1</size>
<properties>
<entry>
<key>Inc xs</key>
<value>0.005</value>
<value>0.28</value>
</entry>
<entry>
<key>mmabs/l (Å-2)</key>
<value>1.86E13</value>
<value>3.4E14</value>
</entry>
<entry>
<key>M (amu)</key>
<value>30.9738</value>
<value>67.0</value>
</entry>
<entry>
<key>Coh b</key>
<value>5.13</value>
<value>7.56</value>
</entry>
<entry>
<key>Dens (g/cm3)</key>
<value>2.3</value>
<value>0.0</value>
</entry>
<entry>
<key>Abs xs</key>
<value>0.172</value>
<value>6.8</value>
</entry>
<entry>
<key>Dens (at/nm3)</key>
<value>44.72</value>
<value>0.0</value>
</entry>
<entry>
<key>mminc (Å-1)</key>
<value>9.72E11</value>
<value>2.52E13</value>
</entry>
</properties>
</ListElement>
......@@ -11135,24 +11173,24 @@
</properties>
</ListElement>
<ListElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="material">
<name>67Zn</name>
<name>N</name>
<size>1</size>
<properties>
<entry>
<key>Inc xs</key>
<value>0.28</value>
<value>0.5</value>
</entry>
<entry>
<key>mmabs/l (Å-2)</key>
<value>3.4E14</value>
<value>4.54E14</value>
</entry>
<entry>
<key>M (amu)</key>
<value>67.0</value>
<value>14.0067</value>
</entry>
<entry>
<key>Coh b</key>
<value>7.56</value>
<value>9.36</value>
</entry>
<entry>
<key>Dens (g/cm3)</key>
......@@ -11160,15 +11198,15 @@
</entry>
<entry>
<key>Abs xs</key>
<value>6.8</value>
<value>1.9</value>
</entry>
<entry>
<key>Dens (at/nm3)</key>
<value>0.0</value>
<value>0.05</value>
</entry>
<entry>
<key>mminc (Å-1)</key>
<value>2.52E13</value>
<value>2.15E14</value>
</entry>
</properties>
</ListElement>
......@@ -11211,24 +11249,24 @@
</properties>
</ListElement>
<ListElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="material">
<name>N</name>
<name>120Te</name>
<size>1</size>
<properties>
<entry>
<key>Inc xs</key>
<value>0.5</value>
<value>0.0</value>
</entry>
<entry>
<key>mmabs/l (Å-2)</key>
<value>4.54E14</value>
<value>6.42E13</value>
</entry>
<entry>
<key>M (amu)</key>
<value>14.0067</value>
<value>120.0</value>
</entry>
<entry>
<key>Coh b</key>
<value>9.36</value>
<value>5.3</value>
</entry>
<entry>
<key>Dens (g/cm3)</key>
......@@ -11236,20 +11274,20 @@
</entry>
<entry>
<key>Abs xs</key>
<value>1.9</value>
<value>2.3</value>
</entry>
<entry>
<key>Dens (at/nm3)</key>
<value>0.05</value>
<value>0.0</value>
</entry>
<entry>
<key>mminc (Å-1)</key>
<value>2.15E14</value>
<value>0.0</value>
</entry>
</properties>
</ListElement>
<ListElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="material">
<name>120Te</name>
<name>152Sm</name>
<size>1</size>
<properties>
<entry>
......@@ -11258,15 +11296,15 @@
</entry>
<entry>
<key>mmabs/l (Å-2)</key>
<value>6.42E13</value>
<value>4.54E15</value>
</entry>
<entry>
<key>M (amu)</key>
<value>120.0</value>
<value>152.0</value>
</entry>
<entry>
<key>Coh b</key>
<value>5.3</value>
<value>-5.0</value>
</entry>
<entry>
<key>Dens (g/cm3)</key>
......@@ -11274,7 +11312,7 @@
</entry>
<entry>
<key>Abs xs</key>
<value>2.3</value>
<value>206.0</value>
</entry>
<entry>
<key>Dens (at/nm3)</key>
......@@ -11325,40 +11363,40 @@
</properties>
</ListElement>
<ListElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="material">
<name>152Sm</name>
<name>K</name>
<size>1</size>
<properties>
<entry>
<key>Inc xs</key>
<value>0.0</value>
<value>0.27</value>
</entry>
<entry>
<key>mmabs/l (Å-2)</key>
<value>4.54E15</value>
<value>1.8E14</value>
</entry>
<entry>
<key>M (amu)</key>
<value>152.0</value>
<value>39.0963</value>
</entry>
<entry>
<key>Coh b</key>
<value>-5.0</value>
<value>3.67</value>
</entry>
<entry>
<key>Dens (g/cm3)</key>
<value>0.0</value>
<value>0.86</value>
</entry>
<entry>
<key>Abs xs</key>
<value>206.0</value>
<value>2.1</value>
</entry>
<entry>
<key>Dens (at/nm3)</key>
<value>0.0</value>
<value>13.25</value>
</entry>
<entry>
<key>mminc (Å-1)</key>
<value>0.0</value>
<value>4.16E13</value>
</entry>
</properties>
</ListElement>
......@@ -11401,40 +11439,40 @@
</properties>
</ListElement>
<ListElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="material">
<name>K</name>
<name>161Dy</name>
<size>1</size>
<properties>
<entry>
<key>Inc xs</key>
<value>0.27</value>
<value>3.0</value>
</entry>
<entry>
<key>mmabs/l (Å-2)</key>
<value>1.8E14</value>
<value>1.25E16</value>
</entry>
<entry>
<key>M (amu)</key>
<value>39.0963</value>
<value>161.0</value>
</entry>
<entry>
<key>Coh b</key>
<value>3.67</value>
<value>10.3</value>
</entry>
<entry>
<key>Dens (g/cm3)</key>
<value>0.86</value>
<value>0.0</value>
</entry>
<entry>
<key>Abs xs</key>
<value>2.1</value>
<value>600.0</value>
</entry>
<entry>
<key>Dens (at/nm3)</key>
<value>13.25</value>
<value>0.0</value>
</entry>
<entry>
<key>mminc (Å-1)</key>
<value>4.16E13</value>
<value>1.12E14</value>
</entry>
</properties>
</ListElement>
......@@ -11477,24 +11515,24 @@
</properties>
</ListElement>
<ListElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="material">
<name>161Dy</name>
<name>140Ce</name>
<size>1</size>
<properties>
<entry>
<key>Inc xs</key>
<value>3.0</value>
<value>0.0</value>
</entry>
<entry>
<key>mmabs/l (Å-2)</key>
<value>1.25E16</value>
<value>1.36E13</value>
</entry>
<entry>
<key>M (amu)</key>
<value>161.0</value>
<value>140.0</value>
</entry>
<entry>
<key>Coh b</key>
<value>10.3</value>
<value>4.84</value>
</entry>
<entry>
<key>Dens (g/cm3)</key>
......@@ -11502,7 +11540,7 @@
</entry>
<entry>
<key>Abs xs</key>
<value>600.0</value>
<value>0.57</value>
</entry>
<entry>
<key>Dens (at/nm3)</key>
......@@ -11510,7 +11548,7 @@
</entry>
<entry>
<key>mminc (Å-1)</key>
<value>1.12E14</value>
<value>0.0</value>
</entry>
</properties>
</ListElement>
......@@ -11553,24 +11591,24 @@
</properties>
</ListElement>
<ListElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="material">
<name>140Ce</name>
<name>61Ni</name>
<size>1</size>
<properties>
<entry>
<key>Inc xs</key>
<value>0.0</value>
<value>1.9</value>
</entry>
<entry>
<key>mmabs/l (Å-2)</key>
<value>1.36E13</value>
<value>1.37E14</value>
</entry>
<entry>
<key>M (amu)</key>
<value>140.0</value>
<value>61.0</value>
</entry>
<entry>
<key>Coh b</key>
<value>4.84</value>
<value>7.6</value>
</entry>
<entry>
<key>Dens (g/cm3)</key>
......@@ -11578,7 +11616,7 @@
</entry>
<entry>
<key>Abs xs</key>
<value>0.57</value>
<value>2.5</value>
</entry>
<entry>
<key>Dens (at/nm3)</key>
......@@ -11586,45 +11624,7 @@
</entry>
<entry>
<key>mminc (Å-1)</key>
<value>0.0</value>
</entry>
</properties>
</ListElement>
<ListElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="material">
<name>H</name>
<size>1</size>
<properties>
<entry>
<key>Inc xs</key>
<value>80.26</value>
</entry>
<entry>
<key>mmabs/l (Å-2)</key>
<value>1.1E15</value>
</entry>
<entry>
<key>M (amu)</key>
<value>1.0079</value>
</entry>
<entry>
<key>Coh b</key>
<value>-3.739</value>
</entry>
<entry>
<key>Dens (g/cm3)</key>
<value>0.0</value>
</entry>
<entry>
<key>Abs xs</key>
<value>0.3326</value>
</entry>
<entry>
<key>Dens (at/nm3)</key>
<value>0.05</value>
</entry>
<entry>
<key>mminc (Å-1)</key>
<value>4.79E17</value>
<value>1.88E14</value>
</entry>
</properties>
</ListElement>
......@@ -11667,24 +11667,24 @@
</properties>
</ListElement>
<ListElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="material">
<name>61Ni</name>
<name>H</name>
<size>1</size>
<properties>
<entry>
<key>Inc xs</key>
<value>1.9</value>
<value>80.26</value>
</entry>
<entry>
<key>mmabs/l (Å-2)</key>
<value>1.37E14</value>
<value>1.1E15</value>