@Test public void testSetValue() { assertFalse(property.isOverridden()); assertNull(property.getOriginalValue()); Object value = 12345; property.setValue(value); assertFalse(property.isOverridden()); assertEquals(value, property.getOriginalValue()); project.setCascadingProject(parent); property.setValue(null); assertTrue(property.isOverridden()); String overriddenValue = "newValue"; property.setValue(overriddenValue); assertTrue(property.isOverridden()); assertNotNull(property.getOriginalValue()); assertTrue(property.isOverridden()); property.setValue(parentPropertyValue); assertNull(property.getOriginalValue()); assertFalse(property.isOverridden()); }
@SuppressWarnings("unchecked") public void setValue(T value) { if (null == getKey()) { throw new IllegalArgumentException(INVALID_PROPERTY_KEY_EXCEPTION); } value = prepareValue(value); if (!getJob().hasCascadingProject()) { setOriginalValue(value, false); } else { updateOriginalValue(value, getCascadingValue()); } }
BaseProjectProperty implements IProjectProperty<T> { @SuppressWarnings("unchecked") public void setValue(T value) { if (null == getKey()) { throw new IllegalArgumentException(INVALID_PROPERTY_KEY_EXCEPTION); } value = prepareValue(value); if (!getJob().hasCascadingProject()) { setOriginalValue(value, false); } else { updateOriginalValue(value, getCascadingValue()); } } }
BaseProjectProperty implements IProjectProperty<T> { @SuppressWarnings("unchecked") public void setValue(T value) { if (null == getKey()) { throw new IllegalArgumentException(INVALID_PROPERTY_KEY_EXCEPTION); } value = prepareValue(value); if (!getJob().hasCascadingProject()) { setOriginalValue(value, false); } else { updateOriginalValue(value, getCascadingValue()); } } BaseProjectProperty(ICascadingJob job); }
BaseProjectProperty implements IProjectProperty<T> { @SuppressWarnings("unchecked") public void setValue(T value) { if (null == getKey()) { throw new IllegalArgumentException(INVALID_PROPERTY_KEY_EXCEPTION); } value = prepareValue(value); if (!getJob().hasCascadingProject()) { setOriginalValue(value, false); } else { updateOriginalValue(value, getCascadingValue()); } } BaseProjectProperty(ICascadingJob job); void setKey(String propertyKey); String getKey(); void setJob(ICascadingJob job); void setOverridden(boolean overridden); @SuppressWarnings("unchecked") T getCascadingValue(); boolean isOverridden(); T getDefaultValue(); T getValue(); @SuppressWarnings("unchecked") void setValue(T value); void resetValue(); boolean allowOverrideValue(T cascadingValue, T candidateValue); T getOriginalValue(); final void onCascadingProjectChanged(); }
BaseProjectProperty implements IProjectProperty<T> { @SuppressWarnings("unchecked") public void setValue(T value) { if (null == getKey()) { throw new IllegalArgumentException(INVALID_PROPERTY_KEY_EXCEPTION); } value = prepareValue(value); if (!getJob().hasCascadingProject()) { setOriginalValue(value, false); } else { updateOriginalValue(value, getCascadingValue()); } } BaseProjectProperty(ICascadingJob job); void setKey(String propertyKey); String getKey(); void setJob(ICascadingJob job); void setOverridden(boolean overridden); @SuppressWarnings("unchecked") T getCascadingValue(); boolean isOverridden(); T getDefaultValue(); T getValue(); @SuppressWarnings("unchecked") void setValue(T value); void resetValue(); boolean allowOverrideValue(T cascadingValue, T candidateValue); T getOriginalValue(); final void onCascadingProjectChanged();  }