EMFFeatureOverlay: Fixed update problem + added showFeatureName option.
resized Attitude indicator.
diff --git a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera.edit/bundle.properties b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera.edit/bundle.properties
index d23bc75..4ef5f82 100644
--- a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera.edit/bundle.properties
+++ b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera.edit/bundle.properties
@@ -436,3 +436,5 @@
_UI_LineDrawingCameraTool_pointsCount_feature = Points Count
_UI_LineDrawingCameraTool_changesCount_feature = Changes Count
_UI_LineDrawingCameraTool_lineThickness_feature = Line Thickness
+_UI_EMFFeatureOverlay_showFeatureNAme_feature = Show Feature NAme
+_UI_EMFFeatureOverlay_showFeatureName_feature = Show Feature Name
diff --git a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera.edit/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/provider/EMFFeatureOverlayItemProvider.java b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera.edit/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/provider/EMFFeatureOverlayItemProvider.java
index 54369c0..c865c3d 100644
--- a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera.edit/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/provider/EMFFeatureOverlayItemProvider.java
+++ b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera.edit/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/provider/EMFFeatureOverlayItemProvider.java
@@ -61,6 +61,7 @@
addNumberFormatPropertyDescriptor(object);
addDisplayUnitsPropertyDescriptor(object);
addEnableRangeColoringPropertyDescriptor(object);
+ addShowFeatureNamePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -132,6 +133,28 @@
}
/**
+ * This adds a property descriptor for the Show Feature Name feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addShowFeatureNamePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_EMFFeatureOverlay_showFeatureName_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_EMFFeatureOverlay_showFeatureName_feature", "_UI_EMFFeatureOverlay_type"),
+ ApogyAddonsSensorsImagingCameraPackage.Literals.EMF_FEATURE_OVERLAY__SHOW_FEATURE_NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
@@ -203,6 +226,7 @@
case ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__VARIABLE_FEATURE_REFERENCE_CHANGE_COUNT:
case ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__DISPLAY_UNITS:
case ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__ENABLE_RANGE_COLORING:
+ case ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__SHOW_FEATURE_NAME:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__VARIABLE_FEATURE_REFERENCE:
diff --git a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/model/apogy_addons_imaging_camera.xcore b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/model/apogy_addons_imaging_camera.xcore
index 13ed6b7..ccb769f 100644
--- a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/model/apogy_addons_imaging_camera.xcore
+++ b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/model/apogy_addons_imaging_camera.xcore
@@ -542,6 +542,11 @@
* Enables the range checking of the value and changes the background color of the text to reflect the range.
*/
boolean enableRangeColoring = "true"
+
+ /**
+ * Enables the name of the feature to be displayed
+ */
+ boolean showFeatureName = "true"
}
/**
diff --git a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen-custom/org/eclipse/apogy/addons/sensors/imaging/camera/impl/EMFFeatureOverlayCustomImpl.java b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen-custom/org/eclipse/apogy/addons/sensors/imaging/camera/impl/EMFFeatureOverlayCustomImpl.java
index 4740638..7319851 100644
--- a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen-custom/org/eclipse/apogy/addons/sensors/imaging/camera/impl/EMFFeatureOverlayCustomImpl.java
+++ b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen-custom/org/eclipse/apogy/addons/sensors/imaging/camera/impl/EMFFeatureOverlayCustomImpl.java
@@ -82,6 +82,7 @@
{
if (getVariableFeatureReference() != null)
{
+
EObject rootEObject = null;
// Gets the top level eObject.
@@ -103,8 +104,7 @@
// Explore the Feature root to find the last EObject in the
// list.
EObject eObject = rootEObject;
- for (EStructuralFeature eStructuralFeature : variableFeatureReference.getFeaturePath()
- .getFeaturePath())
+ for (EStructuralFeature eStructuralFeature : variableFeatureReference.getFeaturePath().getFeaturePath())
{
Object object = ApogyCommonEMFFacade.INSTANCE.resolve(rootEObject, eStructuralFeature);
@@ -116,16 +116,16 @@
{
break;
}
- }
-
- Object featureValue = ApogyCoreInvocatorFacade.INSTANCE .getEMFFeatureValue(this.variableFeatureReference);
+ }
+
+ Object featureValue = ApogyCoreInvocatorFacade.INSTANCE.getEMFFeatureValue(this.variableFeatureReference);
// Try to get the Item Provider associated with the feature for
// the eObject.
if (featureValue != null)
{
EStructuralFeature feature = ApogyCommonEMFFacade.INSTANCE.getLastFeature(variableFeatureReference.getFeaturePath());
- featureValue = eObject.eGet(feature);
+ // featureValue = eObject.eGet(feature);
IItemPropertySource propertySource = (IItemPropertySource) this.adapterFactory.adapt(eObject,IItemPropertySource.class);
IItemPropertyDescriptor descriptor = propertySource.getPropertyDescriptor(eObject, feature);
@@ -151,30 +151,67 @@
double displayValue = nativeUnits.getConverterTo(displayUnits)
.convert(value);
String valueAsString = decimalFormat.format(displayValue);
- return descriptor.getDisplayName(eObject) + " ("
- + displayUnits.toString() + ") : " + valueAsString;
+
+ if(isShowFeatureName())
+ {
+ return descriptor.getDisplayName(eObject) + " ("
+ + displayUnits.toString() + ") : " + valueAsString;
+ }
+ else
+ {
+ return valueAsString + " (" + displayUnits.toString() + ")";
+ }
}
else
{
String valueAsString = decimalFormat.format(value);
- return descriptor.getDisplayName(eObject) + " ("
- + nativeUnits.toString() + ") : " + valueAsString;
+
+ if(isShowFeatureName())
+ {
+ return descriptor.getDisplayName(eObject) + " ("
+ + nativeUnits.toString() + ") : " + valueAsString;
+ }
+ else
+ {
+ return valueAsString + " (" + nativeUnits.toString() + ")";
+ }
}
}
else
{
String valueAsString = decimalFormat.format(value);
- return descriptor.getDisplayName(eObject) + " : " + valueAsString;
+ if(isShowFeatureName())
+ {
+ return descriptor.getDisplayName(eObject) + " : " + valueAsString;
+ }
+ else
+ {
+ return valueAsString;
+ }
}
}
catch (Throwable t)
{
- return descriptor.getDisplayName(eObject) + " : " + wrapper.getText(eObject);
+ if(isShowFeatureName())
+ {
+ return descriptor.getDisplayName(eObject) + " : " + wrapper.getText(eObject);
+ }
+ else
+ {
+ return wrapper.getText(eObject);
+ }
}
}
else
{
- return descriptor.getDisplayName(eObject) + " : " + wrapper.getText(eObject);
+ if(isShowFeatureName())
+ {
+ return descriptor.getDisplayName(eObject) + " : " + wrapper.getText(eObject);
+ }
+ else
+ {
+ return wrapper.getText(eObject);
+ }
}
}
}
@@ -188,16 +225,38 @@
DecimalFormat decimalFormat = new DecimalFormat(getNumberFormat());
Double value = ((Number) featureValue).doubleValue();
String valueAsString = decimalFormat.format(value);
- return feature.getName() + " : " + valueAsString;
+
+ if(isShowFeatureName())
+ {
+ return feature.getName() + " : " + valueAsString;
+ }
+ else
+ {
+ return valueAsString;
+ }
}
catch (Throwable t)
{
- return feature.getName() + " : " + featureValue;
+ if(isShowFeatureName())
+ {
+ return feature.getName() + " : " + featureValue;
+ }
+ else
+ {
+ return "" + featureValue;
+ }
}
}
else
{
- return feature.getName() + " : " + featureValue;
+ if(isShowFeatureName())
+ {
+ return feature.getName() + " : " + featureValue;
+ }
+ else
+ {
+ return "" + featureValue;
+ }
}
}
diff --git a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/ApogyAddonsSensorsImagingCameraPackage.java b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/ApogyAddonsSensorsImagingCameraPackage.java
index 68e031e..b24ccf0 100644
--- a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/ApogyAddonsSensorsImagingCameraPackage.java
+++ b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/ApogyAddonsSensorsImagingCameraPackage.java
@@ -1710,13 +1710,22 @@
int EMF_FEATURE_OVERLAY__ENABLE_RANGE_COLORING = ABSTRACT_TEXT_OVERLAY_FEATURE_COUNT + 4;
/**
+ * The feature id for the '<em><b>Show Feature Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMF_FEATURE_OVERLAY__SHOW_FEATURE_NAME = ABSTRACT_TEXT_OVERLAY_FEATURE_COUNT + 5;
+
+ /**
* The number of structural features of the '<em>EMF Feature Overlay</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int EMF_FEATURE_OVERLAY_FEATURE_COUNT = ABSTRACT_TEXT_OVERLAY_FEATURE_COUNT + 5;
+ int EMF_FEATURE_OVERLAY_FEATURE_COUNT = ABSTRACT_TEXT_OVERLAY_FEATURE_COUNT + 6;
/**
* The operation id for the '<em>Dispose</em>' operation.
@@ -6533,6 +6542,17 @@
EAttribute getEMFFeatureOverlay_EnableRangeColoring();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.apogy.addons.sensors.imaging.camera.EMFFeatureOverlay#isShowFeatureName <em>Show Feature Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Show Feature Name</em>'.
+ * @see org.eclipse.apogy.addons.sensors.imaging.camera.EMFFeatureOverlay#isShowFeatureName()
+ * @see #getEMFFeatureOverlay()
+ * @generated
+ */
+ EAttribute getEMFFeatureOverlay_ShowFeatureName();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.apogy.addons.sensors.imaging.camera.CameraNameOverlay <em>Camera Name Overlay</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -8057,6 +8077,14 @@
EAttribute EMF_FEATURE_OVERLAY__ENABLE_RANGE_COLORING = eINSTANCE.getEMFFeatureOverlay_EnableRangeColoring();
/**
+ * The meta object literal for the '<em><b>Show Feature Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute EMF_FEATURE_OVERLAY__SHOW_FEATURE_NAME = eINSTANCE.getEMFFeatureOverlay_ShowFeatureName();
+
+ /**
* The meta object literal for the '{@link org.eclipse.apogy.addons.sensors.imaging.camera.impl.CameraNameOverlayImpl <em>Camera Name Overlay</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/EMFFeatureOverlay.java b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/EMFFeatureOverlay.java
index 78c91e3..0628140 100644
--- a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/EMFFeatureOverlay.java
+++ b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/EMFFeatureOverlay.java
@@ -36,6 +36,7 @@
* <li>{@link org.eclipse.apogy.addons.sensors.imaging.camera.EMFFeatureOverlay#getVariableFeatureReferenceChangeCount <em>Variable Feature Reference Change Count</em>}</li>
* <li>{@link org.eclipse.apogy.addons.sensors.imaging.camera.EMFFeatureOverlay#getDisplayUnits <em>Display Units</em>}</li>
* <li>{@link org.eclipse.apogy.addons.sensors.imaging.camera.EMFFeatureOverlay#isEnableRangeColoring <em>Enable Range Coloring</em>}</li>
+ * <li>{@link org.eclipse.apogy.addons.sensors.imaging.camera.EMFFeatureOverlay#isShowFeatureName <em>Show Feature Name</em>}</li>
* </ul>
*
* @see org.eclipse.apogy.addons.sensors.imaging.camera.ApogyAddonsSensorsImagingCameraPackage#getEMFFeatureOverlay()
@@ -179,5 +180,32 @@
*/
void setEnableRangeColoring(boolean value);
+ /**
+ * Returns the value of the '<em><b>Show Feature Name</b></em>' attribute.
+ * The default value is <code>"true"</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * *
+ * Enables the name of the feature to be displayed
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Show Feature Name</em>' attribute.
+ * @see #setShowFeatureName(boolean)
+ * @see org.eclipse.apogy.addons.sensors.imaging.camera.ApogyAddonsSensorsImagingCameraPackage#getEMFFeatureOverlay_ShowFeatureName()
+ * @model default="true" unique="false"
+ * @generated
+ */
+ boolean isShowFeatureName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.apogy.addons.sensors.imaging.camera.EMFFeatureOverlay#isShowFeatureName <em>Show Feature Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Show Feature Name</em>' attribute.
+ * @see #isShowFeatureName()
+ * @generated
+ */
+ void setShowFeatureName(boolean value);
+
} // EMFFeatureOverlay
diff --git a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/impl/ApogyAddonsSensorsImagingCameraPackageImpl.java b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/impl/ApogyAddonsSensorsImagingCameraPackageImpl.java
index 09f6c57..5a0d51d 100644
--- a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/impl/ApogyAddonsSensorsImagingCameraPackageImpl.java
+++ b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/impl/ApogyAddonsSensorsImagingCameraPackageImpl.java
@@ -1356,6 +1356,16 @@
* @generated
*/
@Override
+ public EAttribute getEMFFeatureOverlay_ShowFeatureName() {
+ return (EAttribute)emfFeatureOverlayEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
public EClass getCameraNameOverlay() {
return cameraNameOverlayEClass;
}
@@ -2328,6 +2338,7 @@
createEAttribute(emfFeatureOverlayEClass, EMF_FEATURE_OVERLAY__VARIABLE_FEATURE_REFERENCE_CHANGE_COUNT);
createEAttribute(emfFeatureOverlayEClass, EMF_FEATURE_OVERLAY__DISPLAY_UNITS);
createEAttribute(emfFeatureOverlayEClass, EMF_FEATURE_OVERLAY__ENABLE_RANGE_COLORING);
+ createEAttribute(emfFeatureOverlayEClass, EMF_FEATURE_OVERLAY__SHOW_FEATURE_NAME);
cameraNameOverlayEClass = createEClass(CAMERA_NAME_OVERLAY);
@@ -2685,6 +2696,7 @@
initEAttribute(getEMFFeatureOverlay_VariableFeatureReferenceChangeCount(), theEcorePackage.getELong(), "variableFeatureReferenceChangeCount", "0", 0, 1, EMFFeatureOverlay.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getEMFFeatureOverlay_DisplayUnits(), theEcorePackage.getEString(), "displayUnits", null, 0, 1, EMFFeatureOverlay.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getEMFFeatureOverlay_EnableRangeColoring(), theEcorePackage.getEBoolean(), "enableRangeColoring", "true", 0, 1, EMFFeatureOverlay.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getEMFFeatureOverlay_ShowFeatureName(), theEcorePackage.getEBoolean(), "showFeatureName", "true", 0, 1, EMFFeatureOverlay.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(cameraNameOverlayEClass, CameraNameOverlay.class, "CameraNameOverlay", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -3363,6 +3375,12 @@
"documentation", "*\nEnables the range checking of the value and changes the background color of the text to reflect the range."
});
addAnnotation
+ (getEMFFeatureOverlay_ShowFeatureName(),
+ source,
+ new String[] {
+ "documentation", "*\nEnables the name of the feature to be displayed"
+ });
+ addAnnotation
(cameraNameOverlayEClass,
source,
new String[] {
diff --git a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/impl/EMFFeatureOverlayImpl.java b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/impl/EMFFeatureOverlayImpl.java
index a412ff0..1c60a18 100644
--- a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/impl/EMFFeatureOverlayImpl.java
+++ b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/src-gen/org/eclipse/apogy/addons/sensors/imaging/camera/impl/EMFFeatureOverlayImpl.java
@@ -41,6 +41,7 @@
* <li>{@link org.eclipse.apogy.addons.sensors.imaging.camera.impl.EMFFeatureOverlayImpl#getVariableFeatureReferenceChangeCount <em>Variable Feature Reference Change Count</em>}</li>
* <li>{@link org.eclipse.apogy.addons.sensors.imaging.camera.impl.EMFFeatureOverlayImpl#getDisplayUnits <em>Display Units</em>}</li>
* <li>{@link org.eclipse.apogy.addons.sensors.imaging.camera.impl.EMFFeatureOverlayImpl#isEnableRangeColoring <em>Enable Range Coloring</em>}</li>
+ * <li>{@link org.eclipse.apogy.addons.sensors.imaging.camera.impl.EMFFeatureOverlayImpl#isShowFeatureName <em>Show Feature Name</em>}</li>
* </ul>
*
* @generated
@@ -137,6 +138,26 @@
protected boolean enableRangeColoring = ENABLE_RANGE_COLORING_EDEFAULT;
/**
+ * The default value of the '{@link #isShowFeatureName() <em>Show Feature Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isShowFeatureName()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean SHOW_FEATURE_NAME_EDEFAULT = true;
+
+ /**
+ * The cached value of the '{@link #isShowFeatureName() <em>Show Feature Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isShowFeatureName()
+ * @generated
+ * @ordered
+ */
+ protected boolean showFeatureName = SHOW_FEATURE_NAME_EDEFAULT;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -298,6 +319,29 @@
* @generated
*/
@Override
+ public boolean isShowFeatureName() {
+ return showFeatureName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setShowFeatureName(boolean newShowFeatureName) {
+ boolean oldShowFeatureName = showFeatureName;
+ showFeatureName = newShowFeatureName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__SHOW_FEATURE_NAME, oldShowFeatureName, showFeatureName));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__VARIABLE_FEATURE_REFERENCE:
@@ -324,6 +368,8 @@
return getDisplayUnits();
case ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__ENABLE_RANGE_COLORING:
return isEnableRangeColoring();
+ case ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__SHOW_FEATURE_NAME:
+ return isShowFeatureName();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -351,6 +397,9 @@
case ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__ENABLE_RANGE_COLORING:
setEnableRangeColoring((Boolean)newValue);
return;
+ case ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__SHOW_FEATURE_NAME:
+ setShowFeatureName((Boolean)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -378,6 +427,9 @@
case ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__ENABLE_RANGE_COLORING:
setEnableRangeColoring(ENABLE_RANGE_COLORING_EDEFAULT);
return;
+ case ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__SHOW_FEATURE_NAME:
+ setShowFeatureName(SHOW_FEATURE_NAME_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -400,6 +452,8 @@
return DISPLAY_UNITS_EDEFAULT == null ? displayUnits != null : !DISPLAY_UNITS_EDEFAULT.equals(displayUnits);
case ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__ENABLE_RANGE_COLORING:
return enableRangeColoring != ENABLE_RANGE_COLORING_EDEFAULT;
+ case ApogyAddonsSensorsImagingCameraPackage.EMF_FEATURE_OVERLAY__SHOW_FEATURE_NAME:
+ return showFeatureName != SHOW_FEATURE_NAME_EDEFAULT;
}
return super.eIsSet(featureID);
}
@@ -422,6 +476,8 @@
result.append(displayUnits);
result.append(", enableRangeColoring: ");
result.append(enableRangeColoring);
+ result.append(", showFeatureName: ");
+ result.append(showFeatureName);
result.append(')');
return result.toString();
}
diff --git a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/viewModels/EMFFeatureOverlay.view b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/viewModels/EMFFeatureOverlay.view
index e361f27..d23ec9e 100644
--- a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/viewModels/EMFFeatureOverlay.view
+++ b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/viewModels/EMFFeatureOverlay.view
@@ -66,6 +66,11 @@
<segments xsi:type="org.eclipse.emf.ecp.view.model:FeatureDomainModelReferenceSegment" xmi:id="_78BrbBXPEeqiO5cQugMp6w" domainModelFeature="enableRangeColoring"/>
</domainModelReference>
</children>
+ <children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_2czT4KT-EeurG64qqZcwHQ" name="Control showFeatureName">
+ <domainModelReference xmi:id="_2czT4aT-EeurG64qqZcwHQ">
+ <segments xsi:type="org.eclipse.emf.ecp.view.model:FeatureDomainModelReferenceSegment" xmi:id="_2czT4qT-EeurG64qqZcwHQ" domainModelFeature="showFeatureName"/>
+ </domainModelReference>
+ </children>
</children>
<children xsi:type="org.eclipse.emf.ecp.view.group.model:Group" xmi:id="_9ao-UBXPEeqiO5cQugMp6w" name="Feature" groupType="Collapsible">
<children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_78BrXhXPEeqiO5cQugMp6w" name="Control variableFeatureReference">
diff --git a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/viewModels/EMFFeatureOverlay_Settings.view b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/viewModels/EMFFeatureOverlay_Settings.view
index 063f062..4d1db38 100644
--- a/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/viewModels/EMFFeatureOverlay_Settings.view
+++ b/bundles/addons/org.eclipse.apogy.addons.sensors.imaging.camera/viewModels/EMFFeatureOverlay_Settings.view
@@ -44,6 +44,11 @@
<segments xsi:type="org.eclipse.emf.ecp.view.model:FeatureDomainModelReferenceSegment" xmi:id="_py3GmRXPEeqiO5cQugMp6w" domainModelFeature="displayUnits"/>
</domainModelReference>
</children>
+ <children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_yuQlkKT-EeurG64qqZcwHQ" name="Control showFeatureName">
+ <domainModelReference xmi:id="_yuQlkaT-EeurG64qqZcwHQ">
+ <segments xsi:type="org.eclipse.emf.ecp.view.model:FeatureDomainModelReferenceSegment" xmi:id="_yuQlkqT-EeurG64qqZcwHQ" domainModelFeature="showFeatureName"/>
+ </domainModelReference>
+ </children>
</children>
<children xsi:type="org.eclipse.emf.ecp.view.group.model:Group" xmi:id="_q-nH4BXPEeqiO5cQugMp6w" name="Feature" groupType="Collapsible">
<children xsi:type="org.eclipse.emf.ecp.view.model:Control" xmi:id="_py3GjhXPEeqiO5cQugMp6w" name="Control variableFeatureReference">
diff --git a/bundles/addons/org.eclipse.apogy.addons.vehicle.ui/src/org/eclipse/apogy/addons/vehicle/ui/composites/AttitudeIndicatorComposite.java b/bundles/addons/org.eclipse.apogy.addons.vehicle.ui/src/org/eclipse/apogy/addons/vehicle/ui/composites/AttitudeIndicatorComposite.java
index c0966b1..f0aa385 100644
--- a/bundles/addons/org.eclipse.apogy.addons.vehicle.ui/src/org/eclipse/apogy/addons/vehicle/ui/composites/AttitudeIndicatorComposite.java
+++ b/bundles/addons/org.eclipse.apogy.addons.vehicle.ui/src/org/eclipse/apogy/addons/vehicle/ui/composites/AttitudeIndicatorComposite.java
@@ -74,7 +74,7 @@
private Image currentImage = null;
private int width = 300;
- private int height = 300;
+ private int height = 250;
private final Color sky = new Color(0, 0, 255);
private final Color ground = new Color(150, 75, 0);
@@ -119,12 +119,13 @@
private Text txtRoll;
private Button btnSettings;
- public AttitudeIndicatorComposite(Composite parent, int style) {
- this(parent, style, PITCH_UP_NEGATIVE, ROLL_CW_POSITIVE, 300, 300);
+ public AttitudeIndicatorComposite(Composite parent, int style)
+ {
+ this(parent, style, PITCH_UP_NEGATIVE, ROLL_CW_POSITIVE, 300, 250);
}
public AttitudeIndicatorComposite(Composite parent, int style, int indicatorWidth, int indicatorHeight) {
- this(parent, style, PITCH_UP_NEGATIVE, ROLL_CW_POSITIVE, indicatorWidth, indicatorHeight);
+ this(parent, style, PITCH_UP_NEGATIVE, ROLL_CW_POSITIVE, indicatorWidth, indicatorHeight);
}
/**
@@ -150,11 +151,22 @@
this.rollOrientation = rollOrientation;
this.width = indicatorWidth;
this.height = indicatorHeight;
+
+ GridLayout gridLayout = new GridLayout(1,false);
+ gridLayout.marginLeft = 0;
+ gridLayout.marginRight = 0;
+ gridLayout.marginTop = 0;
+ gridLayout.marginBottom = 0;
+ this.setLayout(gridLayout);
- this.setLayout(new GridLayout(2, true));
-
- Composite top = new Composite(this, SWT.NONE);
- top.setLayout(new GridLayout(1, false));
+ Composite top = new Composite(this, SWT.BORDER);
+
+ GridLayout topGridLayout = new GridLayout(1,false);
+ topGridLayout.marginLeft = 0;
+ topGridLayout.marginRight = 0;
+ topGridLayout.marginTop = 0;
+ topGridLayout.marginBottom = 0;
+ top.setLayout(topGridLayout);
top.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false, 1, 1));
this.label = new Label(top, SWT.NONE);
@@ -163,38 +175,44 @@
gd_label.heightHint = indicatorHeight;
gd_label.widthHint = indicatorWidth;
gd_label.minimumWidth = indicatorWidth;
- this.label.setLayoutData(gd_label);
- new Label(this, SWT.NONE);
+ this.label.setLayoutData(gd_label);
Composite bottom = new Composite(this, SWT.NONE);
bottom.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false, false, 1, 1));
- bottom.setLayout(new GridLayout(4, false));
+
+ GridLayout bottomGridLayout = new GridLayout(4, false);
+ bottomGridLayout.marginLeft = 0;
+ bottomGridLayout.marginRight = 0;
+ bottomGridLayout.marginTop = 0;
+ bottomGridLayout.marginBottom = 0;
+ bottom.setLayout(bottomGridLayout);
Label lblPitchdeg = new Label(bottom, SWT.NONE);
lblPitchdeg.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- lblPitchdeg.setText("Pitch (" + DEGREE_STRING + "):");
+ lblPitchdeg.setText("Pitch(" + DEGREE_STRING + ")");
this.txtPitch = new Text(bottom, SWT.BORDER);
this.txtPitch.setEditable(false);
GridData gd_txtPitch = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);
- gd_txtPitch.widthHint = 50;
- gd_txtPitch.minimumWidth = 50;
+ gd_txtPitch.widthHint = 35;
+ gd_txtPitch.minimumWidth = 35;
this.txtPitch.setLayoutData(gd_txtPitch);
Label lblRolldeg = new Label(bottom, SWT.NONE);
lblRolldeg.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- lblRolldeg.setText("Roll (" + DEGREE_STRING + "):");
+ lblRolldeg.setText("Roll(" + DEGREE_STRING + ")");
this.txtRoll = new Text(bottom, SWT.BORDER);
this.txtRoll.setEditable(false);
GridData gd_txtRoll = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);
- gd_txtRoll.widthHint = 50;
- gd_txtRoll.minimumWidth = 50;
+ gd_txtRoll.widthHint = 35;
+ gd_txtRoll.minimumWidth = 35;
this.txtRoll.setLayoutData(gd_txtRoll);
this.btnSettings = new Button(bottom, SWT.NONE);
this.btnSettings.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 4, 1));
- this.btnSettings.setText("Settings...");
+ this.btnSettings.setText("Limits...");
+ this.btnSettings.setToolTipText("Open a Wizard to configure angle limits.");
this.btnSettings.addSelectionListener(new SelectionListener() {
@Override
@@ -296,6 +314,9 @@
public void setAttitude(double pitch, double roll) {
this.pitch = pitch;
this.roll = roll;
+
+ //this.pitch = Math.toRadians(-90.9);
+
forceUpdate();
}
@@ -537,7 +558,7 @@
}
private int getRadius() {
- return Math.round((this.width / 2.0f) * 0.6f);
+ return Math.round((this.width / 2.0f) * 0.75f); // * 0.6
}
private Image getImage() {
diff --git a/bundles/addons/org.eclipse.apogy.addons.vehicle.ui/src/org/eclipse/apogy/addons/vehicle/ui/composites/VehiculePoseComposite.java b/bundles/addons/org.eclipse.apogy.addons.vehicle.ui/src/org/eclipse/apogy/addons/vehicle/ui/composites/VehiculePoseComposite.java
index f64b47a..f27e48a 100644
--- a/bundles/addons/org.eclipse.apogy.addons.vehicle.ui/src/org/eclipse/apogy/addons/vehicle/ui/composites/VehiculePoseComposite.java
+++ b/bundles/addons/org.eclipse.apogy.addons.vehicle.ui/src/org/eclipse/apogy/addons/vehicle/ui/composites/VehiculePoseComposite.java
@@ -44,15 +44,23 @@
public VehiculePoseComposite(Composite parent, int style, VariableFeatureReference variableFeatureReference, double tripDistance)
{
super(parent, style);
- setLayout(new GridLayout(1, false));
+
+ GridLayout gridLayout = new GridLayout(1,false);
+ gridLayout.marginLeft = 0;
+ gridLayout.marginRight = 0;
+ gridLayout.marginTop = 0;
+ gridLayout.marginBottom = 0;
+ setLayout(gridLayout);
// Attitude Display
- Group grAttitude = new Group(this, SWT.BORDER);
+ /*
+ Group grAttitude = new Group(this, SWT.BORDER);
grAttitude.setLayout(new GridLayout(1, false));
grAttitude.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false,1,1));
grAttitude.setText("Attitude");
+ */
- this.attitudeIndicatorComposite = new AttitudeIndicatorComposite(grAttitude, SWT.NONE, 300, 300);
+ this.attitudeIndicatorComposite = new AttitudeIndicatorComposite(this, SWT.NONE, 254, 210);
GridData attitudeIndicatorCompositeGridData = new GridData(SWT.LEFT, SWT.TOP, false, false);
this.attitudeIndicatorComposite.setLayoutData(attitudeIndicatorCompositeGridData);
diff --git a/bundles/core/org.eclipse.apogy.core.invocator/src-gen-custom/org/eclipse/apogy/core/invocator/impl/ApogyCoreInvocatorFacadeCustomImpl.java b/bundles/core/org.eclipse.apogy.core.invocator/src-gen-custom/org/eclipse/apogy/core/invocator/impl/ApogyCoreInvocatorFacadeCustomImpl.java
index 32bdd1b..8f89b97 100644
--- a/bundles/core/org.eclipse.apogy.core.invocator/src-gen-custom/org/eclipse/apogy/core/invocator/impl/ApogyCoreInvocatorFacadeCustomImpl.java
+++ b/bundles/core/org.eclipse.apogy.core.invocator/src-gen-custom/org/eclipse/apogy/core/invocator/impl/ApogyCoreInvocatorFacadeCustomImpl.java
@@ -669,9 +669,28 @@
if (eObject == null) {
eObject = getInstance(variable);
}
+
+ // Navigate the feature until a non EObject is found.
+ EObject finalEObject = eObject;
+ for (EStructuralFeature eStructuralFeature : variableFeatureReference.getFeaturePath().getFeaturePath())
+ {
+ Object object = ApogyCommonEMFFacade.INSTANCE.resolve(finalEObject, eStructuralFeature);
- if (eObject != null) {
- featureValue = ApogyCommonEMFFacade.INSTANCE.resolve(eObject,
+ if (object instanceof EObject)
+ {
+ finalEObject = (EObject) object;
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ if (finalEObject != null)
+ {
+ EStructuralFeature es = ApogyCommonEMFFacade.INSTANCE.getLastFeature(variableFeatureReference.getFeaturePath());
+
+ featureValue = ApogyCommonEMFFacade.INSTANCE.resolve(finalEObject,
ApogyCommonEMFFacade.INSTANCE.getLastFeature(variableFeatureReference.getFeaturePath()));
}
}