Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Vosburgh2017-10-02 12:13:51 -0400
committerBrian Vosburgh2017-10-02 12:13:51 -0400
commitb2d517846dc3a104ce53ba83633b775fa8b44bc3 (patch)
treed8b9d2ea10bd656739195d30262766e7ba717ca3 /jaxb/plugins
parent44a8baa7727400232063b97c7db910fcb389b43d (diff)
downloadwebtools.dali-bjv.tar.gz
webtools.dali-bjv.tar.xz
webtools.dali-bjv.zip
temp (unstaged)bjv
Diffstat (limited to 'jaxb/plugins')
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbProjectPropertiesPage.java15
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbSchemasPropertiesPage.java13
2 files changed, 2 insertions, 26 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbProjectPropertiesPage.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbProjectPropertiesPage.java
index f1b6b2667a..5159fa07ce 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbProjectPropertiesPage.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbProjectPropertiesPage.java
@@ -14,7 +14,6 @@ import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
-import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jpt.common.core.internal.utility.ICUStringCollator;
import org.eclipse.jpt.common.ui.internal.WorkbenchTools;
@@ -38,7 +37,6 @@ import org.eclipse.jpt.common.utility.model.value.CollectionValueModel;
import org.eclipse.jpt.common.utility.model.value.ListValueModel;
import org.eclipse.jpt.common.utility.model.value.ModifiablePropertyValueModel;
import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
-import org.eclipse.jpt.common.utility.transformer.Transformer;
import org.eclipse.jpt.jaxb.core.JaxbPreferences;
import org.eclipse.jpt.jaxb.core.JaxbProject;
import org.eclipse.jpt.jaxb.core.JaxbProjectManager;
@@ -102,18 +100,7 @@ public class JaxbProjectPropertiesPage
}
private PropertyValueModel<PropertyValueModel<JaxbProject>> buildJaxbProjectModelModel() {
- return PropertyValueModelTools.transform(this.projectModel, JAXB_PROJECT_MODEL_TRANSFORMER);
- }
-
- private static final Transformer<IProject, PropertyValueModel<JaxbProject>> JAXB_PROJECT_MODEL_TRANSFORMER = new JaxbProjectModelTransformer();
-
- /* CU private */ static class JaxbProjectModelTransformer
- extends TransformerAdapter<IProject, PropertyValueModel<JaxbProject>>
- {
- @Override
- public PropertyValueModel<JaxbProject> transform(IProject project) {
- return project.getAdapter(JaxbProjectModel.class);
- }
+ return PropertyValueModelTools.transform(this.projectModel, p -> p.getAdapter(JaxbProjectModel.class));
}
// ***** platform ID model
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbSchemasPropertiesPage.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbSchemasPropertiesPage.java
index 2767edac05..e9cebd1a80 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbSchemasPropertiesPage.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/properties/JaxbSchemasPropertiesPage.java
@@ -58,7 +58,6 @@ import org.eclipse.jpt.common.utility.internal.model.AbstractModel;
import org.eclipse.jpt.common.utility.internal.model.value.AspectAdapter;
import org.eclipse.jpt.common.utility.internal.model.value.BufferedPropertyValueModelAdapter;
import org.eclipse.jpt.common.utility.internal.model.value.CollectionValueModelTools;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapterXXXX;
import org.eclipse.jpt.common.utility.internal.model.value.PropertyValueModelTools;
import org.eclipse.jpt.common.utility.internal.model.value.SimpleCollectionValueModel;
import org.eclipse.jpt.common.utility.internal.model.value.SimplePropertyValueModel;
@@ -144,19 +143,9 @@ public class JaxbSchemasPropertiesPage
}
private PropertyValueModel<PropertyValueModel<JaxbProject>> buildJaxbProjectModelModel() {
- return PropertyValueModelTools.transform(this.projectModel, JAXB_PROJECT_MODEL_TRANSFORMER);
+ return PropertyValueModelTools.transform(this.projectModel, p -> p.getAdapter(JaxbProjectModel.class));
}
- private static final Transformer<IProject, PropertyValueModel<JaxbProject>> JAXB_PROJECT_MODEL_TRANSFORMER = new JaxbProjectModelTransformer();
-
- /* CU private */ static class JaxbProjectModelTransformer
- extends TransformerAdapter<IProject, PropertyValueModel<JaxbProject>>
- {
- @Override
- public PropertyValueModel<JaxbProject> transform(IProject project) {
- return project.getAdapter(JaxbProjectModel.class);
- }
- }
protected IProject getProject() {
return this.projectModel.getValue();

Back to the top