Skip to content
This repository has been archived by the owner on Mar 27, 2018. It is now read-only.

Regions (DO NOT MERGE) #542

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
18d9667
Put back in regions to the CompoundSpgIterator.
gerring Feb 6, 2017
c7d6ef7
Merge branch 'master' of [email protected]:DiamondLightSource/daq-eclips…
gerring Feb 6, 2017
e281a4e
Put back in regions to the CompoundSpgIterator.
gerring Feb 6, 2017
4c60fba
Merge branch 'regions' of [email protected]:DiamondLightSource/daq-eclip…
gerring Feb 7, 2017
7039fca
Changed generators to match 'generation_rewrite' branch of spg repo
gerring Feb 7, 2017
cbf8177
Merge branch 'master' into regions
gerring Feb 7, 2017
d4f5c5f
Added iterator to generator.
gerring Feb 7, 2017
df1e2ef
Fixes to run Unit Tests.
gerring Feb 7, 2017
c7e311c
Merge branch 'master' into regions
gerring Feb 7, 2017
125dd3e
Put back strange sleep which makes test work on traivs.
gerring Feb 7, 2017
ddc61f5
Added an NPE check for travis.
gerring Feb 7, 2017
7f98841
Merge branch 'regions' of [email protected]:DiamondLightSource/daq-eclip…
gerring Feb 7, 2017
d577565
Added changes to support numjy in tests.
gerring Feb 7, 2017
3c390aa
Fixed malcolm device now that regions are sent.
gerring Feb 7, 2017
69aa97f
Removed comment
gerring Feb 7, 2017
1468bd7
Used existing generator because more efficient.
gerring Feb 7, 2017
011c71b
Moved method locations to make easier to read.
gerring Feb 7, 2017
91505fd
Commented out line which fails MScanServletTest
gerring Feb 7, 2017
4d00626
Merge branch 'master' into regions
gerring Feb 8, 2017
04c3add
Fix project xml
gerring Feb 8, 2017
111fa64
Merge branch 'regions' of [email protected]:DiamondLightSource/daq-eclip…
gerring Feb 8, 2017
0bfbe33
Put back in Jama
gerring Feb 8, 2017
6005c93
Merge branch 'master' into regions
gerring Feb 8, 2017
e5cc2f7
Merge branch 'master' into regions
gerring Feb 8, 2017
c6908a4
Merge branch 'master' into regions
gerring Feb 10, 2017
73fa03e
Merge branch 'master' into regions
gerring Feb 10, 2017
aa1c186
Merge branch 'master' into regions
gerring Feb 13, 2017
595196a
Merge branch 'master' into regions
gerring Feb 14, 2017
b5daafb
Merge branch 'master' into regions
gerring Feb 14, 2017
0dae613
Merge branch 'master' into regions
gerring Feb 15, 2017
b01e982
Merge branch 'master' into regions
gerring Feb 16, 2017
0b09a99
Merge branch 'master' into regions
gerring Feb 17, 2017
24277a4
Merge branch 'master' into regions
gerring Feb 20, 2017
82c3b86
Merge branch 'master' into regions
gerring Feb 21, 2017
1addc61
Merge branch 'master' into regions
gerring Feb 22, 2017
672ee6f
Merge branch 'master' into regions
gerring Feb 22, 2017
598beab
Merge branch 'master' into regions
gerring Feb 22, 2017
753e94c
Merge branch 'master' into regions
gerring Feb 23, 2017
683c39a
Merge branch 'master' into regions
gerring Feb 24, 2017
b42f954
Merge branch 'master' into regions
gerring Feb 27, 2017
b5a3d4f
Merge branch 'master' into regions
gerring Feb 27, 2017
ea8bda5
Merge branch 'master' into regions
gerring Mar 1, 2017
a9e1853
Merge branch 'master' into regions
gerring Mar 1, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 51 additions & 45 deletions org.eclipse.scanning.api/.project
Original file line number Diff line number Diff line change
@@ -1,45 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.scanning.api</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>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.zeroturnaround.eclipse.rebelXmlBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.zeroturnaround.eclipse.remoting.remotingBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.zeroturnaround.eclipse.jrebelNature</nature>
<nature>org.zeroturnaround.eclipse.remoting.remotingNature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.scanning.api</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
<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>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.zeroturnaround.eclipse.rebelXmlBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.zeroturnaround.eclipse.remoting.remotingBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.python.pydev.pythonNature</nature>
<nature>org.zeroturnaround.eclipse.jrebelNature</nature>
<nature>org.zeroturnaround.eclipse.remoting.remotingNature</nature>
</natures>
</projectDescription>
8 changes: 8 additions & 0 deletions org.eclipse.scanning.api/.pydevproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">jython 2.7</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/${PROJECT_DIR_NAME}/bin</path>
</pydev_pathproperty>
</pydev_project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.eclipse.scanning.api.annotation.UiHidden;

Expand Down Expand Up @@ -133,4 +135,23 @@ public Map<String, Integer> getIndices() {
}
return indices;
}

private static final String VERTEX = "([a-zA-Z0-9_])+\\((\\d+)\\)=([-+]?[0-9]*\\.?[0-9]+)";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Move this variable to comply with Java Code Conventions. rule

private static final Pattern POSITION = Pattern.compile(VERTEX+", "+VERTEX);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Move this variable to comply with Java Code Conventions. rule

/**
* Parse a point from the toString() method into an instance of Point
*
* y(0)=2.397560627408689, x(4)=5.266805527444651
* @param asString
* @return
*/
public static Point parse(String asString) {

Matcher m = POSITION.matcher(asString);
if (m.matches()) {
return new Point(m.group(4), Integer.parseInt(m.group(5)), Double.parseDouble(m.group(6)),
m.group(1), Integer.parseInt(m.group(2)), Double.parseDouble(m.group(3)));
}
throw new RuntimeException("Unparsable string "+asString);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Define and throw a dedicated exception instead of using a generic one. rule

}
}
13 changes: 8 additions & 5 deletions org.eclipse.scanning.points/.pydevproject
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
</pydev_project>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">jython 2.7</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/${PROJECT_DIR_NAME}/bin</path>
</pydev_pathproperty>
</pydev_project>
5 changes: 2 additions & 3 deletions org.eclipse.scanning.points/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ Require-Bundle: org.eclipse.scanning.api;bundle-version="1.0.0",
org.eclipse.january;bundle-version="1.0.0",
org.eclipse.dawnsci.analysis.api;bundle-version="1.1.0",
org.eclipse.dawnsci.analysis.dataset;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.8.0",
com.fasterxml.jackson.core.jackson-annotations;bundle-version="2.2.0",
com.fasterxml.jackson.core.jackson-core;bundle-version="2.2.0",
com.fasterxml.jackson.core.jackson-databind;bundle-version="2.2.0",
org.apache.commons.math3
org.eclipse.core.runtime
Export-Package: org.eclipse.scanning.points,
org.eclipse.scanning.points.classregistry,
org.eclipse.scanning.points.mutators,
Expand All @@ -23,8 +22,8 @@ Service-Component: OSGI-INF/*.xml
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Import-Package: Jama;version="1.0.3",
org.osgi.framework;version="1.8.0",
org.osgi.service.component;version="1.2.2",
org.python.core,
org.python.util,
org.slf4j;version="1.7.2"
Bundle-Activator: org.eclipse.scanning.points.PointsActivator
Loading