<?xml version="1.0" encoding="UTF-8"?>\r
<classpath>\r
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
<classpathentry kind="src" path="src"/>\r
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
<classpathentry kind="output" path="bin"/>\r
</classpath>\r
org.simantics.g3d.vtk;bundle-version="1.0.0",
org.simantics.browsing.ui.common;bundle-version="1.1.0",
org.simantics.objmap2;bundle-version="1.0.0",
- org.simantics.opencascade.vtk;bundle-version="1.0.0"
+ org.simantics.opencascade.vtk;bundle-version="1.0.0",
+ org.slf4j.api
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.g3d.csg.handler,
@RelatedSetValue(CSG.URIs.HasMinorRadius)\r
@SetPropertyValue(CSG.URIs.HasMinorRadius)\r
public void setR1(double r1) {\r
+ if (this.r1 == r1)\r
+ return;\r
this.r1 = r1;\r
firePropertyChanged(CSG.URIs.HasMinorRadius);\r
}\r
@RelatedSetValue(CSG.URIs.HasMajorRadius)\r
@SetPropertyValue(CSG.URIs.HasMajorRadius)\r
public void setR2(double r2) {\r
+ if (this.r2 == r2)\r
+ return;\r
this.r2 = r2;\r
firePropertyChanged(CSG.URIs.HasMajorRadius);\r
}\r
@RelatedSetValue(CSG.URIs.HasHeight)\r
@SetPropertyValue(CSG.URIs.HasHeight)\r
public void setH(double h) {\r
+ if (this.h == h)\r
+ return;\r
this.h = h;\r
firePropertyChanged(CSG.URIs.HasHeight);\r
}\r
@RelatedSetValue(CSG.URIs.HasXAxisSize)\r
@SetPropertyValue(CSG.URIs.HasXAxisSize)\r
public void setSX(double d) {\r
+ if (this.sx == d)\r
+ return;\r
this.sx = d;\r
firePropertyChanged(CSG.URIs.HasXAxisSize);\r
}\r
@RelatedSetValue(CSG.URIs.HasYAxisSize)\r
@SetPropertyValue(CSG.URIs.HasYAxisSize)\r
public void setSY(double d) {\r
+ if (this.sy == d)\r
+ return;\r
this.sy = d;\r
firePropertyChanged(CSG.URIs.HasYAxisSize);\r
}\r
@RelatedSetValue(CSG.URIs.HasZAxisSize)\r
@SetPropertyValue(CSG.URIs.HasZAxisSize)\r
public void setSZ(double d) {\r
+ if (this.sz == d)\r
+ return;\r
this.sz = d;\r
firePropertyChanged(CSG.URIs.HasZAxisSize);\r
}\r
@RelatedSetValue(Layer0.URIs.HasName)
@SetPropertyValue(Layer0.URIs.HasName)
public void setName(String name) {
- if (name == null)
+ if (name == null || name.equals(this.name))
return;
this.name = name;
firePropertyChanged(Layer0.URIs.HasName);
import java.util.Collection;
import java.util.Collections;
+import java.util.Objects;
import javax.vecmath.AxisAngle4d;
import javax.vecmath.Quat4d;
@RelatedSetValue(Layer0.URIs.HasName)
@SetPropertyValue(Layer0.URIs.HasName)
public void setName(String name) {
- if (name == null)
+ if (name == null || name.equals(this.name))
return;
this.name = name;
firePropertyChanged(Layer0.URIs.HasName);
@SetPropertyValue(G3D.URIs.hasOrientation)
public void setOrientation(Quat4d orientation) {
assert(orientation != null);
+ if (Objects.equals(this.orientation, orientation))
+ return;
+
this.orientation = orientation;
firePropertyChanged(G3D.URIs.hasOrientation);
@SetPropertyValue(G3D.URIs.hasPosition)
public void setPosition(Vector3d position) {
assert(position != null);
+ if (Objects.equals(this.position, position))
+ return;
+
this.position = position;
firePropertyChanged(G3D.URIs.hasPosition);
@RelatedSetValue(CSG.URIs.HasBottomRadius)\r
@SetPropertyValue(CSG.URIs.HasBottomRadius)\r
public void setR1(double r1) {\r
+ if (this.r1 == r1)\r
+ return;\r
this.r1 = r1;\r
firePropertyChanged(CSG.URIs.HasBottomRadius);\r
}\r
@RelatedSetValue(CSG.URIs.HasTopRadius)\r
@SetPropertyValue(CSG.URIs.HasTopRadius)\r
public void setR2(double r2) {\r
+ if (this.r2 == r2)\r
+ return;\r
this.r2 = r2;\r
firePropertyChanged(CSG.URIs.HasTopRadius);\r
}\r
*******************************************************************************/\r
package org.simantics.g3d.csg.scenegraph2;\r
\r
+import java.util.Objects;\r
+\r
import org.jcae.opencascade.jni.TopoDS_Shape;\r
import org.simantics.g3d.csg.ontology.CSG;\r
import org.simantics.g3d.property.annotations.GetPropertyValue;\r
@RelatedSetValue(CSG.URIs.HasRadius)\r
@SetPropertyValue(CSG.URIs.HasRadius)\r
public void setR(double r) {\r
+ if (this.r == r)\r
+ return;\r
this.r = r;\r
firePropertyChanged(CSG.URIs.HasRadius);\r
}\r
@RelatedSetValue(CSG.URIs.HasHeight)\r
@SetPropertyValue(CSG.URIs.HasHeight)\r
public void setH(double h) {\r
+ if (this.h == h)\r
+ return;\r
this.h = h;\r
firePropertyChanged(CSG.URIs.HasHeight);\r
}\r
@RelatedSetValue(CSG.URIs.HasMinorRadius)\r
@SetPropertyValue(CSG.URIs.HasMinorRadius)\r
public void setR1(double r1) {\r
+ if (this.r1 == r1)\r
+ return;\r
this.r1 = r1;\r
firePropertyChanged(CSG.URIs.HasMinorRadius);\r
}\r
@RelatedSetValue(CSG.URIs.HasMajorRadius)\r
@SetPropertyValue(CSG.URIs.HasMajorRadius)\r
public void setR2(double r2) {\r
+ if (this.r2 == r2)\r
+ return;\r
this.r2 = r2;\r
firePropertyChanged(CSG.URIs.HasMajorRadius);\r
}\r
@RelatedSetValue(CSG.URIs.HasHeight)\r
@SetPropertyValue(CSG.URIs.HasHeight)\r
public void setH(double h) {\r
+ if (this.h == h)\r
+ return;\r
this.h = h;\r
firePropertyChanged(CSG.URIs.HasHeight);\r
}\r
@RelatedSetValue(CSG.URIs.HasXAxisMinimumSize)\r
@SetPropertyValue(CSG.URIs.HasXAxisMinimumSize)\r
public void setX1(double d) {\r
+ if (this.x1 == d)\r
+ return;\r
this.x1 = d;\r
firePropertyChanged(CSG.URIs.HasXAxisMinimumSize);\r
}\r
@RelatedSetValue(CSG.URIs.HasXAxisMaximumSize)\r
@SetPropertyValue(CSG.URIs.HasXAxisMaximumSize)\r
public void setX2(double d) {\r
+ if (this.x2 == d)\r
+ return;\r
this.x2 = d;\r
firePropertyChanged(CSG.URIs.HasXAxisMaximumSize);\r
}\r
@RelatedSetValue(CSG.URIs.HasYAxisSize)\r
@SetPropertyValue(CSG.URIs.HasYAxisSize)\r
public void setSY(double d) {\r
+ if (this.y == d)\r
+ return;\r
this.y = d;\r
firePropertyChanged(CSG.URIs.HasYAxisSize);\r
}\r
@RelatedSetValue(CSG.URIs.HasZAxisMinimumSize)\r
@SetPropertyValue(CSG.URIs.HasZAxisMinimumSize)\r
public void setZ1(double d) {\r
+ if (this.z1 == d)\r
+ return;\r
this.z1 = d;\r
firePropertyChanged(CSG.URIs.HasZAxisMinimumSize);\r
}\r
@RelatedSetValue(CSG.URIs.HasZAxisMaximumSize)\r
@SetPropertyValue(CSG.URIs.HasZAxisMaximumSize)\r
public void setZ2(double d) {\r
+ if (this.z2 == d)\r
+ return;\r
this.z2 = d;\r
firePropertyChanged(CSG.URIs.HasZAxisMaximumSize);\r
}\r
@RelatedSetValue(CSG.URIs.HasRadius)\r
@SetPropertyValue(CSG.URIs.HasRadius)\r
public void setR(double r) {\r
+ if (this.r == r)\r
+ return;\r
this.r = r;\r
firePropertyChanged(CSG.URIs.HasRadius);\r
}\r
@RelatedSetValue(CSG.URIs.HasHeight)\r
@SetPropertyValue(CSG.URIs.HasHeight)\r
public void setH(double h) {\r
+ if (this.h == h)\r
+ return;\r
this.h = h;\r
firePropertyChanged(CSG.URIs.HasHeight);\r
}\r
public void setN(int n) {\r
if (n < 3)\r
n = 3;\r
+ if (this.n == n)\r
+ return;\r
this.n = n;\r
firePropertyChanged(CSG.URIs.HasCorners);\r
}\r
@RelatedSetValue(CSG.URIs.HasRadius)\r
@SetPropertyValue(CSG.URIs.HasRadius)\r
public void setR(double r) {\r
+ if (this.r == r)\r
+ return;\r
this.r = r;\r
firePropertyChanged(CSG.URIs.HasRadius);\r
}\r
@RelatedSetValue(CSG.URIs.HasMinorRadius)\r
@SetPropertyValue(CSG.URIs.HasMinorRadius)\r
public void setR1(double r1) {\r
+ if (this.r1 == r1)\r
+ return;\r
this.r1 = r1;\r
firePropertyChanged(CSG.URIs.HasMinorRadius);\r
}\r
@RelatedSetValue(CSG.URIs.HasMajorRadius)\r
@SetPropertyValue(CSG.URIs.HasMajorRadius)\r
public void setR2(double r2) {\r
+ if (this.r2 == r2)\r
+ return;\r
this.r2 = r2;\r
firePropertyChanged(CSG.URIs.HasMajorRadius);\r
}\r
*******************************************************************************/\r
package org.simantics.g3d.scenegraph;\r
\r
+import java.util.Objects;\r
+\r
import javax.vecmath.Quat4d;\r
import javax.vecmath.Vector3d;\r
\r
@SetPropertyValue(G3D.URIs.hasOrientation)\r
public void setOrientation(Quat4d orientation) {\r
assert(orientation != null);\r
+ if (Objects.equals(this.orientation, orientation))\r
+ return;\r
+\r
this.orientation = orientation;\r
- \r
+ \r
firePropertyChanged(G3D.URIs.hasOrientation);\r
}\r
\r
@SetPropertyValue(G3D.URIs.hasPosition)\r
public void setPosition(Vector3d position) {\r
assert(position != null);\r
+ if (Objects.equals(this.position, position))\r
+ return;\r
+ \r
this.position = position;\r
\r
firePropertyChanged(G3D.URIs.hasPosition);\r
setPosition(new Vector3d(arr));\r
}\r
\r
+ public void _setPosition(Vector3d position) {\r
+ assert(position != null);\r
+ this.position = position;\r
+ }\r
+ \r
@Override\r
@GetPropertyValue(value = G3D.URIs.hasWorldPosition, tabId = "Transform", name = "World Position")\r
public Vector3d getWorldPosition() {\r
import java.util.Collection;\r
import java.util.Collections;\r
import java.util.List;\r
+import java.util.Objects;\r
\r
import org.simantics.g3d.ontology.G3D;\r
import org.simantics.g3d.property.annotations.GetPropertyValue;\r
@RelatedSetValue(Layer0.URIs.HasName)\r
@SetPropertyValue(Layer0.URIs.HasName)\r
public void setName(String name) {\r
- if (name == null)\r
+ if (name == null || Objects.equals(this.name, name))\r
return;\r
this.name = name;\r
firePropertyChanged(Layer0.URIs.HasName);\r
\r
@Override\r
public void addPublishedBy(IStructuralNode node) {\r
- publisher.add(node);\r
- firePropertyChanged(G3D.URIs.publishes);\r
+ if (publisher.add(node))\r
+ firePropertyChanged(G3D.URIs.publishes);\r
}\r
\r
@Override\r
@RelatedSetValue(Layer0.URIs.HasName)\r
@SetPropertyValue(Layer0.URIs.HasName)\r
public void setName(String name) {\r
- if (name == null)\r
+ if (name == null || name.equals(this.name))\r
return;\r
this.name = name;\r
firePropertyChanged(Layer0.URIs.HasName);\r
\r
@Override\r
public void addPublishedBy(IStructuralNode node) {\r
- publisher.add(node);\r
- firePropertyChanged(G3D.URIs.publishes);\r
+ if (publisher.add(node))\r
+ firePropertyChanged(G3D.URIs.publishes);\r
}\r
\r
@Override\r
package org.simantics.g3d.scenegraph.structural;\r
\r
import java.util.Collection;\r
+import java.util.Objects;\r
\r
import javax.vecmath.Quat4d;\r
import javax.vecmath.Vector3d;\r
@Override\r
@SetPropertyValue(G3D.URIs.hasPosition)\r
public void setPosition(Vector3d position) {\r
+ if (Objects.equals(this.position, position))\r
+ return;\r
+ \r
this.position = position;\r
firePropertyChanged(G3D.URIs.hasPosition);\r
}\r
@Override\r
@SetPropertyValue(G3D.URIs.hasOrientation)\r
public void setOrientation(Quat4d orientation) {\r
+ if (Objects.equals(this.orientation, orientation))\r
+ return;\r
+ \r
this.orientation = orientation;\r
firePropertyChanged(G3D.URIs.hasOrientation);\r
}\r
@RelatedSetValue(Layer0.URIs.HasName)\r
@SetPropertyValue(Layer0.URIs.HasName)\r
public void setName(String name) {\r
- if (name == null)\r
+ if (name == null || name.equals(this.name))\r
return;\r
this.name = name;\r
firePropertyChanged(Layer0.URIs.HasName);\r
\r
@Override\r
public void addPublishedBy(IStructuralNode node) {\r
- publisher.add(node);\r
- firePropertyChanged(G3D.URIs.publishes);\r
+ if (publisher.add(node))\r
+ firePropertyChanged(G3D.URIs.publishes);\r
}\r
\r
@Override\r
org.simantics.browsing.ui.platform;bundle-version="1.1.0",
org.simantics.structural.ui;bundle-version="1.1.1",
org.simantics.g3d.csg;bundle-version="1.0.0",
- org.simantics.utils.thread.swt;bundle-version="1.1.0"
+ org.simantics.utils.thread.swt;bundle-version="1.1.0",
+ org.slf4j.api
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: org.simantics.plant3d.actions,
org.simantics.plant3d.scl,
org.simantics.plant3d.utils
Automatic-Module-Name: org.simantics.plant3d
-Import-Package: org.slf4j
import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import java.util.Set;
import org.jcae.opencascade.jni.TopoDS_Shape;
for (String id : parameters.keySet()) {
Object currentValue = currentParameters.get(id);
Object newValue = parameters.get(id);
- if (currentValue == newValue)
+ if (Objects.equals(currentValue, newValue))
continue;
if (newValue == null) {
continue;
@RelatedSetObj(Plant3D.URIs.HasPipeRun)
@Override
public void setPipeRun(PipeRun pipeRun) {
+ if (this.getPipeRun() == pipeRun)
+ return;
+
super.setPipeRun(pipeRun);
try {
_createCP();
package org.simantics.plant3d.scenegraph;
+import java.util.Objects;
+
import org.simantics.g3d.property.annotations.GetPropertyValue;
import org.simantics.g3d.property.annotations.SetPropertyValue;
import org.simantics.g3d.scenegraph.G3DNode;
@RelatedSetValue(Layer0.URIs.HasName)
@SetPropertyValue(Layer0.URIs.HasName)
public void setName(String name) {
- if (name == null)
+ if (name == null || Objects.equals(this.name, name))
return;
+
this.name = name;
+
firePropertyChanged(Layer0.URIs.HasName);
}
package org.simantics.plant3d.scenegraph;
import java.util.HashSet;
+import java.util.Objects;
import java.util.Set;
import javax.vecmath.Quat4d;
@RelatedSetValue(Layer0.URIs.HasName)
@SetPropertyValue(Layer0.URIs.HasName)
public void setName(String name) {
- if (name == null)
+ if (name == null || name.equals(this.name))
return;
this.name = name;
firePropertyChanged(Layer0.URIs.HasName);
@SetPropertyValue(G3D.URIs.hasOrientation)
public void setOrientation(Quat4d orientation) {
assert(orientation != null);
+ if (Objects.equals(this.orientation, orientation))
+ return;
+
this.orientation = orientation;
firePropertyChanged(G3D.URIs.hasOrientation);
@SetPropertyValue(G3D.URIs.hasPosition)
public void setPosition(Vector3d position) {
assert(position != null);
+ if (Objects.equals(this.position, position))
+ return;
+
this.position = position;
firePropertyChanged(G3D.URIs.hasPosition);
package org.simantics.plant3d.scenegraph;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import org.simantics.g3d.math.MathTools;
import org.simantics.g3d.property.annotations.GetPropertyValue;
@RelatedSetValue(Plant3D.URIs.HasTurnRadius)
@SetPropertyValue(Plant3D.URIs.HasTurnRadius)
public void setTurnRadius(double turnRadius) {
+ if (this.turnRadius[0] == turnRadius)
+ return;
this.turnRadius[0] = turnRadius;
firePropertyChanged(Plant3D.URIs.HasTurnRadius);
firePropertyChanged(Plant3D.URIs.HasTurnRadiusArray);
@RelatedSetValue(Plant3D.URIs.HasTurnRadiusArray)
@SetPropertyValue(Plant3D.URIs.HasTurnRadiusArray)
public void setTurnRadiusArray(double[] turnRadiusArray) {
- if (turnRadiusArray == null || turnRadiusArray.length == 0)
+ if (turnRadiusArray == null || turnRadiusArray.length == 0 || Arrays.equals(this.turnRadius, turnRadiusArray))
return;
this.turnRadius = turnRadiusArray;
firePropertyChanged(Plant3D.URIs.HasTurnRadiusArray);
@RelatedSetValue(Plant3D.URIs.HasPipeDiameter)
@SetPropertyValue(Plant3D.URIs.HasPipeDiameter)
public void setPipeDiameter(double pipeDiameter) {
- this.pipeDiameter = pipeDiameter;
+ if (Objects.equals(this.pipeDiameter, pipeDiameter))
+ return;
+
+ this.pipeDiameter = pipeDiameter;
firePropertyChanged(Plant3D.URIs.HasPipeDiameter);
}
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.Objects;
import javax.vecmath.Quat4d;
import javax.vecmath.Tuple3d;
* @param error
*/
public void setError(String error) {
- if (this.error == null) {
- if (error == null)
- return;
- } else if (this.error.equals(error))
+ if (Objects.equals(this.error, error))
return;
- this.error = error;
+ this.error = error;
firePropertyChanged("error");
}
}
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
+import java.util.Objects;
import javax.vecmath.AxisAngle4d;
import javax.vecmath.Matrix3d;
}
public void setLength(double l) {
- if (Double.isInfinite(l) || Double.isNaN(l)) {
+ if (this.length == l)
+ return;
+ if (Double.isInfinite(l) || Double.isNaN(l))
return;
- }
if (Math.abs(this.length-l) < MathTools.NEAR_ZERO)
return;
this.length = l;
}
if (this.turnAngle != null && Math.abs(this.turnAngle-turnAngle) < MathTools.NEAR_ZERO)
return;
+ if (Objects.equals(this.turnAngle, turnAngle))
+ return;
this.turnAngle = turnAngle;
firePropertyChanged("turnAngle");
}
}
if (this.offset != null && Math.abs(this.offset-offset) < MathTools.NEAR_ZERO)
return;
+ if (Objects.equals(this.offset, offset))
+ return;
this.offset = offset;
firePropertyChanged("offset");
}
}
if (this.rotationAngle != null && Math.abs(this.rotationAngle-rotationAngle) < MathTools.NEAR_ZERO)
return;
+ if (Objects.equals(rotationAngle, rotationAngle))
+ return;
this.rotationAngle = rotationAngle;
firePropertyChanged("rotationAngle");
}
public void setReversed(Boolean reversed) {
+ if (this.reversed == reversed)
+ return;
this.reversed = reversed;
firePropertyChanged("reversed");
}
component._setWorldPosition(getWorldPosition());
updateSubPoint();
}
-
+
private void updateSubPoint() {
if (isOffset()) {
if (next == null && previous == null) {
while (iter > 0) {
Vector3d tp = new Vector3d(dir);
tp.scaleAdd(curr, dp);
- tcp.setPosition(tp);
+ tcp._setPosition(tp); // no firing of listeners here
if (other == ne) {
dir2 = pathLegDirection(tcp);
} else {
}
}
finally {
- tcp.setPosition(tp0);
+ tcp._setPosition(tp0); // return the original value
}
return curr;
}