Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbClassItemContentProvider.java')
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbClassItemContentProvider.java75
1 files changed, 0 insertions, 75 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbClassItemContentProvider.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbClassItemContentProvider.java
deleted file mode 100644
index cbf6b8e38f..0000000000
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/jaxb21/JaxbClassItemContentProvider.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.
- *
- * Contributors:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.jaxb.ui.internal.jaxb21;
-
-import org.eclipse.jpt.common.ui.internal.jface.AbstractItemTreeContentProvider;
-import org.eclipse.jpt.common.utility.internal.model.value.CollectionAspectAdapter;
-import org.eclipse.jpt.common.utility.internal.model.value.CompositeCollectionValueModel;
-import org.eclipse.jpt.common.utility.internal.model.value.PropertyAspectAdapter;
-import org.eclipse.jpt.common.utility.model.value.CollectionValueModel;
-import org.eclipse.jpt.common.utility.model.value.PropertyValueModel;
-import org.eclipse.jpt.jaxb.core.context.JaxbClass;
-import org.eclipse.jpt.jaxb.core.context.JaxbClassMapping;
-import org.eclipse.jpt.jaxb.core.context.JaxbContextRoot;
-import org.eclipse.jpt.jaxb.core.context.JaxbPersistentAttribute;
-
-
-public class JaxbClassItemContentProvider
- extends AbstractItemTreeContentProvider<JaxbClass, JaxbPersistentAttribute>
-{
-
- public JaxbClassItemContentProvider(JaxbClass jaxbClass, Manager manager) {
- super(jaxbClass, manager);
- }
-
-
- public JaxbContextRoot getParent() {
- return (JaxbContextRoot) this.item.getParent();
- }
-
- @Override
- protected CollectionValueModel<JaxbPersistentAttribute> buildChildrenModel() {
- PropertyValueModel<JaxbClassMapping> mappingModel = buildMappingModel();
- return new CompositeCollectionValueModel<CollectionValueModel<JaxbPersistentAttribute>, JaxbPersistentAttribute>(
- buildAttributesModel(mappingModel),
- buildIncludedAttributesModel(mappingModel));
- }
-
- protected PropertyValueModel<JaxbClassMapping> buildMappingModel() {
- return new PropertyAspectAdapter<JaxbClass, JaxbClassMapping>(JaxbClass.MAPPING_PROPERTY, this.item) {
- @Override
- protected JaxbClassMapping buildValue_() {
- return this.subject.getMapping();
- }
- };
- }
-
- protected CollectionValueModel<JaxbPersistentAttribute> buildAttributesModel(
- PropertyValueModel<JaxbClassMapping> mappingModel) {
- return new CollectionAspectAdapter<JaxbClassMapping, JaxbPersistentAttribute>(
- mappingModel, JaxbClassMapping.ATTRIBUTES_COLLECTION) {
- @Override
- protected Iterable<JaxbPersistentAttribute> getIterable() {
- return this.subject.getAttributes();
- }
- };
- }
-
- protected CollectionValueModel<JaxbPersistentAttribute> buildIncludedAttributesModel(
- PropertyValueModel<JaxbClassMapping> mappingModel) {
- return new CollectionAspectAdapter<JaxbClassMapping, JaxbPersistentAttribute>(
- mappingModel, JaxbClassMapping.INCLUDED_ATTRIBUTES_COLLECTION) {
- @Override
- protected Iterable<JaxbPersistentAttribute> getIterable() {
- return this.subject.getIncludedAttributes();
- }
- };
- }
-}

Back to the top