diff options
Diffstat (limited to 'common/plugins')
3 files changed, 18 insertions, 3 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/gen/AbstractJptGenerator.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/gen/AbstractJptGenerator.java index 00c554427d..bb6003bf85 100644 --- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/gen/AbstractJptGenerator.java +++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/gen/AbstractJptGenerator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Oracle. All rights reserved. + * Copyright (c) 2008, 2016 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -365,7 +365,7 @@ public abstract class AbstractJptGenerator implements JptGenerator try { File jarInstallDir = this.getBundleParentDir(JptCommonCorePlugin.instance().getBundle()); - List<File> result = new ArrayList<File>(); + List<File> result = new ArrayList<>(); this.findFileStartingWith(genJarName, jarInstallDir, result); if (result.isEmpty()) { throw new RuntimeException("Could not find: " + genJarName + "#.#.#v###.jar in: " + jarInstallDir); //$NON-NLS-1$ //$NON-NLS-2$ diff --git a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/ModelPropertyAspectAdapter.java b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/ModelPropertyAspectAdapter.java index e40ae9a001..2227f81996 100644 --- a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/ModelPropertyAspectAdapter.java +++ b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/ModelPropertyAspectAdapter.java @@ -20,6 +20,14 @@ import org.eclipse.jpt.common.utility.transformer.Transformer; * pluggable property aspect adapter} to convert one of a {@link Model model's} * <em>bound</em> properties to a * {@link org.eclipse.jpt.common.utility.model.value.PropertyValueModel property value model}. + * <p> + * <strong>NB:</strong> + * The {@link #propertyTransformer} <em>must</em> transform + * a non-<code>null</code> subject into the same value as the value + * passed by the correponding change event; i.e. it should invoke a + * "standard" getter. The only thing, in addition to calling the property's + * getter, the transformer can do is return something other than <code>null</code> + * if the subject is <code>null</code>. * * @param <V> the type of the adapter's value * @param <S> the type of the subject whose <em>bound</em> property is transformed into @@ -67,6 +75,13 @@ public final class ModelPropertyAspectAdapter<V, S extends Model> return this.propertyTransformer.transform(null); } + /** + * <strong>NB:</strong> + * The event's new value is passed through <em>untouched</em>; + * i.e. the {@link #propertyTransformer} <em>must</em> transform + * a non-<code>null</code> subject into the same value as the value + * passed to the correponding change event. + */ public void propertyChanged(PropertyChangeEvent event) { @SuppressWarnings("unchecked") V newValue = (V) event.getNewValue(); diff --git a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/PluggablePropertyAspectAdapter.java b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/PluggablePropertyAspectAdapter.java index 2709c039d7..11af56500a 100644 --- a/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/PluggablePropertyAspectAdapter.java +++ b/common/plugins/org.eclipse.jpt.common.utility/src/org/eclipse/jpt/common/utility/internal/model/value/PluggablePropertyAspectAdapter.java @@ -15,7 +15,7 @@ import org.eclipse.jpt.common.utility.model.listener.PropertyChangeListener; import org.eclipse.jpt.common.utility.model.value.PropertyValueModel; /** - * This adapter adapts an subject property value model whose value is another model + * This adapter adapts a subject property value model whose value is another model * and treats the <em>inner</em> model's value as this adapter's models's value. * As a result, this adapter listens for changes to either model * (<em>inner</em> or <em>subject</em>). |