Bug 447422 - Add support for Child/Sub Context https://bugs.eclipse.org/bugs/show_bug.cgi?id=447422
diff --git a/bundles/org.eclipse.emf.ecp.view.context/src/org/eclipse/emf/ecp/view/internal/context/ViewModelContextImpl.java b/bundles/org.eclipse.emf.ecp.view.context/src/org/eclipse/emf/ecp/view/internal/context/ViewModelContextImpl.java index 8ee2348..00bade5 100644 --- a/bundles/org.eclipse.emf.ecp.view.context/src/org/eclipse/emf/ecp/view/internal/context/ViewModelContextImpl.java +++ b/bundles/org.eclipse.emf.ecp.view.context/src/org/eclipse/emf/ecp/view/internal/context/ViewModelContextImpl.java
@@ -802,13 +802,20 @@ private void addChildContext(VElement vElement, EObject eObject, ViewModelContext childContext) { - childContext.addContextUser(this); + // childContext.addContextUser(this); if (!childContexts.containsKey(eObject)) { childContexts.put(eObject, new LinkedHashSet<ViewModelContext>()); } childContexts.get(eObject).add(childContext); childContextUsers.put(childContext, vElement); + + // notify all global View model services + for (final ViewModelService viewModelService : viewServices) { + if (GlobalViewModelService.class.isInstance(viewModelService)) { + GlobalViewModelService.class.cast(viewModelService).childViewModelContextAdded(childContext); + } + } } private void removeChildContext(EObject eObject) {
diff --git a/bundles/org.eclipse.emf.ecp.view.context/src/org/eclipse/emf/ecp/view/spi/context/GlobalViewModelService.java b/bundles/org.eclipse.emf.ecp.view.context/src/org/eclipse/emf/ecp/view/spi/context/GlobalViewModelService.java index 5b97aaf..d1d2b66 100644 --- a/bundles/org.eclipse.emf.ecp.view.context/src/org/eclipse/emf/ecp/view/spi/context/GlobalViewModelService.java +++ b/bundles/org.eclipse.emf.ecp.view.context/src/org/eclipse/emf/ecp/view/spi/context/GlobalViewModelService.java
@@ -20,4 +20,5 @@ */ public interface GlobalViewModelService extends ViewModelService { + void childViewModelContextAdded(ViewModelContext childContext); }
diff --git a/bundles/org.eclipse.emf.ecp.view.table.ui.swt/src/org/eclipse/emf/ecp/view/spi/table/swt/TableControlDetailPanelRenderer.java b/bundles/org.eclipse.emf.ecp.view.table.ui.swt/src/org/eclipse/emf/ecp/view/spi/table/swt/TableControlDetailPanelRenderer.java index eb4e9eb..66a63b5 100644 --- a/bundles/org.eclipse.emf.ecp.view.table.ui.swt/src/org/eclipse/emf/ecp/view/spi/table/swt/TableControlDetailPanelRenderer.java +++ b/bundles/org.eclipse.emf.ecp.view.table.ui.swt/src/org/eclipse/emf/ecp/view/spi/table/swt/TableControlDetailPanelRenderer.java
@@ -12,14 +12,12 @@ package org.eclipse.emf.ecp.view.spi.table.swt; import java.util.Collections; -import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.common.util.TreeIterator; -import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EStructuralFeature.Setting; @@ -28,7 +26,6 @@ import org.eclipse.emf.ecp.ui.view.swt.ECPSWTView; import org.eclipse.emf.ecp.ui.view.swt.ECPSWTViewRenderer; import org.eclipse.emf.ecp.view.internal.table.swt.Activator; -import org.eclipse.emf.ecp.view.internal.validation.ValidationService; import org.eclipse.emf.ecp.view.spi.context.ViewModelContext; import org.eclipse.emf.ecp.view.spi.model.VView; import org.eclipse.emf.ecp.view.spi.provider.ViewProviderHelper; @@ -219,48 +216,6 @@ } } - /** - * {@inheritDoc} - * - * @see org.eclipse.emf.ecp.view.spi.core.swt.AbstractControlSWTRenderer#postInit() - */ - @Override - protected void postInit() { - super.postInit(); - revalidate(); - } - - @Override - public void finalizeRendering(Composite parent) { - super.finalizeRendering(parent); - } - - private void revalidate() { - final Iterator<Setting> iterator = getVElement().getDomainModelReference().getIterator(); - final Set<EObject> toValidate = new LinkedHashSet<EObject>(); - while (iterator.hasNext()) { - final EObject eObject = iterator.next().getEObject(); - if (toValidate.contains(eObject)) { - continue; - } - toValidate.add(eObject); - } - final ValidationService validationService = getViewModelContext().getService(ValidationService.class); - if (validationService != null) { - validationService.validate(toValidate); - } - } - - @Override - protected EObject addRow(EClass clazz, Setting mainSetting) { - final EObject addEObject = super.addRow(clazz, mainSetting); - - final VView detailView = getView(); - getViewModelContext().getChildContext(addEObject, getVElement(), detailView); - revalidate(); - return addEObject; - } - @Override protected void deleteRows(List<EObject> deletionList, Setting mainSetting) { super.deleteRows(deletionList, mainSetting); @@ -274,6 +229,5 @@ } } getVElement().getDiagnostic().getDiagnostics().removeAll(toDelete); - revalidate(); } }
diff --git a/bundles/org.eclipse.emf.ecp.view.table.validation/.checkstyle b/bundles/org.eclipse.emf.ecp.view.table.validation/.checkstyle new file mode 100644 index 0000000..19c5477 --- /dev/null +++ b/bundles/org.eclipse.emf.ecp.view.table.validation/.checkstyle
@@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false"> + <local-check-config name="ESMCheckstyle" location="/org.eclipse.emf.ecp.releng/checkstyle/esmCheckstyle.xml" type="project" description=""> + <additional-data name="protect-config-file" value="false"/> + </local-check-config> + <fileset name="Java Files" enabled="true" check-config-name="ESMCheckstyle" local="true"> + <file-match-pattern match-pattern=".java" include-pattern="true"/> + </fileset> +</fileset-config>
diff --git a/bundles/org.eclipse.emf.ecp.view.table.validation/.project b/bundles/org.eclipse.emf.ecp.view.table.validation/.project index 51cf3c6..c4fc01e 100644 --- a/bundles/org.eclipse.emf.ecp.view.table.validation/.project +++ b/bundles/org.eclipse.emf.ecp.view.table.validation/.project
@@ -20,9 +20,15 @@ <arguments> </arguments> </buildCommand> + <buildCommand> + <name>net.sf.eclipsecs.core.CheckstyleBuilder</name> + <arguments> + </arguments> + </buildCommand> </buildSpec> <natures> <nature>org.eclipse.pde.PluginNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> + <nature>net.sf.eclipsecs.core.CheckstyleNature</nature> </natures> </projectDescription>
diff --git a/bundles/org.eclipse.emf.ecp.view.table.validation/src/org/eclipse/emf/ecp/view/table/internal/validation/TableValidationInitiator.java b/bundles/org.eclipse.emf.ecp.view.table.validation/src/org/eclipse/emf/ecp/view/table/internal/validation/TableValidationInitiator.java index f64ec9b..a0a034f 100644 --- a/bundles/org.eclipse.emf.ecp.view.table.validation/src/org/eclipse/emf/ecp/view/table/internal/validation/TableValidationInitiator.java +++ b/bundles/org.eclipse.emf.ecp.view.table.validation/src/org/eclipse/emf/ecp/view/table/internal/validation/TableValidationInitiator.java
@@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. - * + * * 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: * Eugen Neufeld - initial API and implementation ******************************************************************************/ @@ -13,6 +13,8 @@ import java.util.Collections; import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.TreeIterator; @@ -20,32 +22,91 @@ import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EStructuralFeature.Setting; import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecp.common.UniqueSetting; +import org.eclipse.emf.ecp.view.spi.context.GlobalViewModelService; import org.eclipse.emf.ecp.view.spi.context.ViewModelContext; -import org.eclipse.emf.ecp.view.spi.context.ViewModelService; +import org.eclipse.emf.ecp.view.spi.model.ModelChangeListener; +import org.eclipse.emf.ecp.view.spi.model.ModelChangeNotification; import org.eclipse.emf.ecp.view.spi.model.VView; import org.eclipse.emf.ecp.view.spi.provider.ViewProviderHelper; import org.eclipse.emf.ecp.view.spi.table.model.DetailEditing; import org.eclipse.emf.ecp.view.spi.table.model.VTableControl; -public class TableValidationInitiator implements ViewModelService { +/** + * The TableValidationInitiator searches for Tables with an Editing Panel, and creates the necessary ViewModelContexts. + * + * @author Eugen Neufeld + * + */ +@SuppressWarnings("restriction") +public class TableValidationInitiator implements GlobalViewModelService { - @SuppressWarnings("unchecked") + /** + * A Mapping Class for tables. + * + * @author Eugen Neufeld + * + */ + private static class TableContextMapping { + /** + * Default Constructor. + * + * @param control The {@link VTableControl} + * @param context The {@link ViewModelContext} + */ + public TableContextMapping(VTableControl control, ViewModelContext context) { + this.control = control; + this.context = context; + } + + private final VTableControl control; + private final ViewModelContext context; + } + + private final Map<UniqueSetting, TableContextMapping> mapping = new LinkedHashMap<UniqueSetting, TableContextMapping>(); + @Override public void instantiate(ViewModelContext context) { + context.registerDomainChangeListener(new ModelChangeListener() { + + @Override + public void notifyChange(ModelChangeNotification notification) { + if (notification.getRawNotification().isTouch() || mapping.isEmpty()) { + return; + } + final TableContextMapping tableContextMapping = mapping.get(UniqueSetting.createSetting( + notification.getNotifier(), notification.getStructuralFeature())); + if (tableContextMapping == null) { + return; + } + tableContextMapping.context.getChildContext((EObject) notification.getRawNotification().getNewValue(), + tableContextMapping.control, getView(tableContextMapping.control)); + } + }); + checkForTables(context); + } + + @SuppressWarnings("unchecked") + private void checkForTables(ViewModelContext context) { final EObject viewRoot = context.getViewModel(); final TreeIterator<EObject> eAllContents = viewRoot.eAllContents(); while (eAllContents.hasNext()) { final EObject eObject = eAllContents.next(); if (VTableControl.class.isInstance(eObject)) { final VTableControl tableControl = VTableControl.class.cast(eObject); + if (tableControl.getDetailEditing() == DetailEditing.WITH_PANEL) { final Iterator<Setting> iterator = tableControl .getDomainModelReference().getIterator(); final Setting tableSetting = iterator.next(); + mapping.put(UniqueSetting.createSetting(tableSetting), new TableContextMapping(tableControl, + context)); final EList<EObject> tableContents = (EList<EObject>) tableSetting.get(true); for (final EObject tableEObject : tableContents) { final VView detailView = getView(tableControl); - context.getChildContext(tableEObject, tableControl, detailView); + final ViewModelContext childContext = context.getChildContext(tableEObject, tableControl, + detailView); + childContext.addContextUser(this); } } @@ -74,7 +135,17 @@ @Override public int getPriority() { - return 3; + return 2; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.emf.ecp.view.spi.context.GlobalViewModelService#childViewModelContextAdded(org.eclipse.emf.ecp.view.spi.context.ViewModelContext) + */ + @Override + public void childViewModelContextAdded(ViewModelContext childContext) { + checkForTables(childContext); } }
diff --git a/bundles/org.eclipse.emf.ecp.view.treemasterdetail.ui.swt/src/org/eclipse/emf/ecp/view/treemasterdetail/ui/swt/internal/TreeMasterDetailSWTRenderer.java b/bundles/org.eclipse.emf.ecp.view.treemasterdetail.ui.swt/src/org/eclipse/emf/ecp/view/treemasterdetail/ui/swt/internal/TreeMasterDetailSWTRenderer.java index 385760c..6059cc6 100644 --- a/bundles/org.eclipse.emf.ecp.view.treemasterdetail.ui.swt/src/org/eclipse/emf/ecp/view/treemasterdetail/ui/swt/internal/TreeMasterDetailSWTRenderer.java +++ b/bundles/org.eclipse.emf.ecp.view.treemasterdetail.ui.swt/src/org/eclipse/emf/ecp/view/treemasterdetail/ui/swt/internal/TreeMasterDetailSWTRenderer.java
@@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2011-2013 EclipseSource Muenchen GmbH and others. - * + * * 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: * Anas Chakfeh - initial API and implementation * Eugen Neufeld - Refactoring @@ -17,10 +17,8 @@ import java.util.ArrayList; import java.util.Collection; import java.util.LinkedHashMap; -import java.util.LinkedHashSet; import java.util.List; import java.util.Map; -import java.util.Set; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; @@ -29,22 +27,17 @@ import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; import org.eclipse.emf.common.notify.AdapterFactory; -import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.util.Diagnostic; -import org.eclipse.emf.common.util.TreeIterator; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.impl.DynamicEObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecp.common.ChildrenDescriptorCollector; -import org.eclipse.emf.ecp.common.cachetree.IExcludedObjectsCallback; import org.eclipse.emf.ecp.edit.internal.swt.util.OverlayImageDescriptor; import org.eclipse.emf.ecp.edit.internal.swt.util.SWTValidationHelper; import org.eclipse.emf.ecp.edit.spi.ReferenceService; import org.eclipse.emf.ecp.ui.view.ECPRendererException; import org.eclipse.emf.ecp.ui.view.swt.DefaultReferenceService; import org.eclipse.emf.ecp.ui.view.swt.ECPSWTViewRenderer; -import org.eclipse.emf.ecp.view.internal.validation.ValidationService; import org.eclipse.emf.ecp.view.model.common.edit.provider.CustomReflectiveItemProviderAdapterFactory; import org.eclipse.emf.ecp.view.spi.context.ViewModelContext; import org.eclipse.emf.ecp.view.spi.context.reporting.StatusReport; @@ -64,8 +57,6 @@ import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.edit.provider.ComposedAdapterFactory; -import org.eclipse.emf.edit.provider.INotifyChangedListener; -import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.emf.edit.ui.action.ecp.CreateChildAction; import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter; import org.eclipse.emf.edit.ui.dnd.LocalTransfer; @@ -112,12 +103,11 @@ /** * SWT Renderer for a {@link VTreeMasterDetail} element. - * + * * @author Anas Chakfeh * @author Eugen Neufeld - * + * */ -@SuppressWarnings("restriction") public class TreeMasterDetailSWTRenderer extends AbstractSWTRenderer<VTreeMasterDetail> { /** @@ -139,7 +129,7 @@ private TreeViewer treeViewer; /** * Static string. - * + * */ public static final String GLOBAL_ADDITIONS = "global_additions"; //$NON-NLS-1$ @@ -149,42 +139,9 @@ private Composite rightPanelContainerComposite; - private ValidationResultCachedTree validationResultCacheTree; - /** * @author jfaltermeier - * - */ - private final class TreeValidationListener implements - org.eclipse.emf.ecp.view.internal.validation.ViewValidationListener { - - private final EObject domainObject; - - public TreeValidationListener(EObject domainObject) { - this.domainObject = domainObject; - } - - @Override - public void onNewValidation(Set<Diagnostic> validationResults) { - int highestSeverity = Diagnostic.OK; - for (final Diagnostic diagnostic : validationResults) { - if (diagnostic.getSeverity() > highestSeverity) { - highestSeverity = diagnostic.getSeverity(); - } - } - - validationResultCacheTree.update(domainObject, highestSeverity); - - if (treeViewer == null) { - return; - } - treeViewer.refresh(); - } - } - - /** - * @author jfaltermeier - * + * */ private final class MasterTreeContextMenuListener implements IMenuListener { private final EditingDomain editingDomain; @@ -259,23 +216,7 @@ /** * {@inheritDoc} - * - * @see org.eclipse.emf.ecp.view.spi.swt.AbstractSWTRenderer#preInit() - */ - @Override - protected void preInit() { - super.preInit(); - validationResultCacheTree = new ValidationResultCachedTree(new IExcludedObjectsCallback() { - @Override - public boolean isExcluded(Object object) { - return false; - } - }); - } - - /** - * {@inheritDoc} - * + * * @see org.eclipse.emf.ecp.view.spi.swt.AbstractSWTRenderer#dispose() */ @Override @@ -286,7 +227,7 @@ /** * {@inheritDoc} - * + * * @see org.eclipse.emf.ecp.view.spi.swt.AbstractSWTRenderer#getGridDescription(SWTGridDescription) */ @Override @@ -299,7 +240,7 @@ /** * {@inheritDoc} - * + * * @see org.eclipse.emf.ecp.view.spi.swt.AbstractSWTRenderer#renderControl(org.eclipse.emf.ecp.view.spi.swt.layout.SWTGridCell, * org.eclipse.swt.widgets.Composite) */ @@ -328,7 +269,7 @@ /** * Creates the sashform for the master detail colums. - * + * * @param parent the parent * @return the sash */ @@ -351,7 +292,7 @@ /** * Create the parent of the master detail form. - * + * * @param parent the parent * @return the composite */ @@ -365,23 +306,9 @@ return form; } - // private Set<Object> getAllChildren(Object parent, AdapterFactoryContentProvider adapterFactoryContentProvider) { - // final Set<Object> allChildren = new LinkedHashSet<Object>(); - // final Object[] children = adapterFactoryContentProvider.getChildren(parent); - // for (final Object object : children) { - // final Object manipulatedSelection = manipulateSelection(object); - // if (!EObject.class.isInstance(manipulatedSelection)) { - // continue; - // } - // allChildren.add(manipulatedSelection); - // allChildren.addAll(getAllChildren(object, adapterFactoryContentProvider)); - // } - // return allChildren; - // } - /** * Creates the tree viewer for the master. - * + * * @param masterPanel the parent * @return the tree viewer */ @@ -403,12 +330,6 @@ }; final AdapterFactoryLabelProvider labelProvider = new TreeMasterDetailLabelProvider(adapterFactory); - /* validation start */ - // registerRootChildContext(); - // registerChildrenChildContext(adapterFactoryContentProvider); - registerDomainChangeListener(adapterFactory); - /* validation end */ - treeViewer = new TreeViewer(masterPanel); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).hint(100, SWT.DEFAULT) @@ -458,7 +379,7 @@ /** * Return true if a context menu should be shown in the tree. - * + * * @return true if a context menu should be shown, false otherwise */ protected boolean hasContextMenu() { @@ -467,7 +388,7 @@ /** * Return true if the tree should support DnD. - * + * * @return true if DnD should be supported , false otherwise */ protected boolean hasDnDSupport() { @@ -475,92 +396,8 @@ } /** - * @param adapterFactory - */ - private void registerDomainChangeListener(final ComposedAdapterFactory adapterFactory) { - adapterFactory.addListener(new INotifyChangedListener() { - @Override - public void notifyChanged(Notification notification) { - if (!ViewerNotification.class.isInstance(notification)) { - return; - } - final ViewerNotification viewerNotification = ViewerNotification.class.cast(notification); - if (!viewerNotification.isContentRefresh()) { - return; - } - if (viewerNotification.getEventType() == Notification.ADD) { - final Object newValue = viewerNotification.getNewValue(); - final Object manipulateSelection = manipulateSelection(newValue); - final Map<String, Object> context = new LinkedHashMap<String, Object>(); - context.put(DETAIL_KEY, true); - final VView view = ViewProviderHelper.getView((EObject) manipulateSelection, context); - final ViewModelContext viewContext = getViewModelContext() - .getChildContext((EObject) manipulateSelection, getVElement(), view); - manipulateViewContext(viewContext); - final ValidationService validationService = viewContext.getService(ValidationService.class); - // Full revalidate - if (validationService != null) - { - validationService.validate(getAllEObjects((EObject) newValue)); - } - } - if (viewerNotification.getEventType() == Notification.REMOVE) { - final Object oldValue = viewerNotification.getOldValue(); - validationResultCacheTree.remove((EObject) oldValue); - } - } - - private Collection<EObject> getAllEObjects(EObject eObject) { - final List<EObject> result = new ArrayList<EObject>(); - result.add(eObject); - final TreeIterator<EObject> iterator = EcoreUtil.getAllContents(eObject, false); - while (iterator.hasNext()) { - result.add(iterator.next()); - } - return result; - } - }); - } - - // /** - // * @param adapterFactoryContentProvider - // */ - // private void registerChildrenChildContext(final AdapterFactoryContentProvider adapterFactoryContentProvider) { - // final Set<Object> children = getAllChildren(getViewModelContext().getDomainModel(), - // adapterFactoryContentProvider); - // for (final Object object : children) { - // final Map<String, Object> context = new LinkedHashMap<String, Object>(); - // context.put(DETAIL_KEY, true); - // final VView view = ViewProviderHelper.getView((EObject) object, context); - // final ViewModelContext viewContext = ViewModelContextFactory.INSTANCE - // .createViewModelContext(view, (EObject) object, (ViewModelContextImpl) getViewModelContext(), - // getVElement()); - // manipulateViewContext(viewContext); - // viewContext.getService(ValidationService.class).registerValidationListener( - // new TreeValidationListener((EObject) object)); - // } - // } - // - // private void registerRootChildContext() { - // final Map<String, Object> context = new LinkedHashMap<String, Object>(); - // context.put(DETAIL_KEY, true); - // context.put(ROOT_KEY, true); - // final Object manipulateSelection = manipulateSelection(getViewModelContext().getDomainModel()); - // VView view = getVElement().getDetailView(); - // if (view == null || view.getChildren().isEmpty()) { - // view = ViewProviderHelper.getView((EObject) manipulateSelection, context); - // } - // final ViewModelContext viewContext = ViewModelContextFactory.INSTANCE - // .createViewModelContext(view, (EObject) manipulateSelection, (ViewModelContextImpl) getViewModelContext(), - // getVElement()); - // manipulateViewContext(viewContext); - // viewContext.getService(ValidationService.class).registerValidationListener( - // new TreeValidationListener((EObject) manipulateSelection)); - // } - - /** * Returns the label provider. - * + * * @param adapterFactoryLabelProvider the adaper factory label provider * @return the label provider to use for the tree */ @@ -570,7 +407,7 @@ /** * Creates the composite for the master panel. - * + * * @param sash the parent * @return the composite */ @@ -585,7 +422,7 @@ /** * Adds the header to a parent composite. - * + * * @param parent the parent */ protected void createHeader(Composite parent) { @@ -671,7 +508,7 @@ /** * Creates the composite holding the details. - * + * * @param parent the parent * @return the right panel/detail composite */ @@ -804,7 +641,7 @@ /** * Returns a list of all {@link MasterDetailAction MasterDetailActions} which shall be displayed in the context menu * of the master treeviewer. - * + * * @return the actions */ protected List<MasterDetailAction> readMasterDetailActions() { @@ -914,7 +751,7 @@ /** * Allows to manipulate the view context for the selected element that is about to be rendered. - * + * * @param viewContext the view context. */ protected void manipulateViewContext(ViewModelContext viewContext) { @@ -922,10 +759,10 @@ } /** - * + * * @author Anas Chakfeh * This class is responsible for handling selection changed events which happen on the tree - * + * */ private class TreeMasterViewSelectionListener implements ISelectionChangedListener { @@ -971,13 +808,9 @@ final ViewModelContext childContext = getViewModelContext() .getChildContext((EObject) selected, getVElement(), vView); - // if (childContext == null) { - // - // childContext = ViewModelContextFactory.INSTANCE - // .createViewModelContext(vView, (EObject) selected, - // getViewModelContext(), getVElement(), referenceService); + manipulateViewContext(childContext); - // } + ECPSWTViewRenderer.INSTANCE.render(childComposite, childContext); } @@ -986,13 +819,8 @@ final VView view = ViewProviderHelper.getView((EObject) selected, context); final ViewModelContext childContext = getViewModelContext().getChildContext((EObject) selected, getVElement(), view); - // if (childContext == null) { - // - // childContext = ViewModelContextFactory.INSTANCE - // .createViewModelContext(view, - // (EObject) selected, referenceService); + manipulateViewContext(childContext); - // } ECPSWTViewRenderer.INSTANCE.render(childComposite, childContext); } @@ -1027,7 +855,7 @@ /** * Returns the composite for the detail. - * + * * @return the composite */ protected Composite getDetailContainer() { @@ -1036,7 +864,7 @@ /** * Allows to manipulate the selection by returning a specific child. - * + * * @param treeSelected the selected element in the tree * @return the object that should be used as a selection */ @@ -1062,9 +890,9 @@ /** * The label provider used for the detail tree. - * + * * @author jfaltermeier - * + * */ private class TreeMasterDetailLabelProvider extends AdapterFactoryLabelProvider { @@ -1102,42 +930,15 @@ } - @Override - public void finalizeRendering(Composite parent) { - super.finalizeRendering(parent); - final Set<EObject> toValidate = new LinkedHashSet<EObject>(); - toValidate.add(getViewModelContext().getDomainModel()); - final TreeIterator<EObject> iterator = EcoreUtil.getAllContents(getViewModelContext().getDomainModel(), true); - while (iterator.hasNext()) { - toValidate.add(iterator.next()); - } - getViewModelContext().getService(ValidationService.class).validate(toValidate); - } - /** * {@inheritDoc} - * + * * @see org.eclipse.emf.ecp.view.spi.swt.AbstractSWTRenderer#applyValidation() */ @Override protected void applyValidation() { super.applyValidation(); - // // int highestSeverity = Diagnostic.OK; - // final VDiagnostic vDiagnostic = getVElement().getDiagnostic(); - // if (vDiagnostic == null||vDiagnostic.getDiagnostics().isEmpty()) { - // validationResultCacheTree.clear(); - // } - // Map<EObject, Integer> domainObjectSeverities=new LinkedHashMap<EObject, Integer>(); - // for (final Object diagnosticObject : vDiagnostic.getDiagnostics()) { - // final Diagnostic diagnostic = Diagnostic.class.cast(diagnosticObject); - // EObject diagnosticEObject=(EObject) diagnostic.getData().get(0); - // // if (diagnostic.getSeverity() > highestSeverity) { - // // highestSeverity = diagnostic.getSeverity(); - // // } - // } - // for(EObject domainObject:domainObjectSeverities.keySet()) - // validationResultCacheTree.update(domainObject, domainObjectSeverities.get(domainObject)); if (treeViewer == null) { return; }
diff --git a/bundles/org.eclipse.emf.ecp.view.treemasterdetail.validation/.checkstyle b/bundles/org.eclipse.emf.ecp.view.treemasterdetail.validation/.checkstyle new file mode 100644 index 0000000..19c5477 --- /dev/null +++ b/bundles/org.eclipse.emf.ecp.view.treemasterdetail.validation/.checkstyle
@@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false"> + <local-check-config name="ESMCheckstyle" location="/org.eclipse.emf.ecp.releng/checkstyle/esmCheckstyle.xml" type="project" description=""> + <additional-data name="protect-config-file" value="false"/> + </local-check-config> + <fileset name="Java Files" enabled="true" check-config-name="ESMCheckstyle" local="true"> + <file-match-pattern match-pattern=".java" include-pattern="true"/> + </fileset> +</fileset-config>
diff --git a/bundles/org.eclipse.emf.ecp.view.treemasterdetail.validation/.project b/bundles/org.eclipse.emf.ecp.view.treemasterdetail.validation/.project index 7a0acb4..816a131 100644 --- a/bundles/org.eclipse.emf.ecp.view.treemasterdetail.validation/.project +++ b/bundles/org.eclipse.emf.ecp.view.treemasterdetail.validation/.project
@@ -20,9 +20,15 @@ <arguments> </arguments> </buildCommand> + <buildCommand> + <name>net.sf.eclipsecs.core.CheckstyleBuilder</name> + <arguments> + </arguments> + </buildCommand> </buildSpec> <natures> <nature>org.eclipse.pde.PluginNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> + <nature>net.sf.eclipsecs.core.CheckstyleNature</nature> </natures> </projectDescription>
diff --git a/bundles/org.eclipse.emf.ecp.view.treemasterdetail.validation/src/org/eclipse/emf/ecp/view/treemasterdetail/internal/validation/TreeMasterDetailValidationInitiator.java b/bundles/org.eclipse.emf.ecp.view.treemasterdetail.validation/src/org/eclipse/emf/ecp/view/treemasterdetail/internal/validation/TreeMasterDetailValidationInitiator.java index e649b4d..4316a8b 100644 --- a/bundles/org.eclipse.emf.ecp.view.treemasterdetail.validation/src/org/eclipse/emf/ecp/view/treemasterdetail/internal/validation/TreeMasterDetailValidationInitiator.java +++ b/bundles/org.eclipse.emf.ecp.view.treemasterdetail.validation/src/org/eclipse/emf/ecp/view/treemasterdetail/internal/validation/TreeMasterDetailValidationInitiator.java
@@ -20,8 +20,10 @@ import org.eclipse.emf.common.util.TreeIterator; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecp.view.model.common.edit.provider.CustomReflectiveItemProviderAdapterFactory; +import org.eclipse.emf.ecp.view.spi.context.GlobalViewModelService; import org.eclipse.emf.ecp.view.spi.context.ViewModelContext; -import org.eclipse.emf.ecp.view.spi.context.ViewModelService; +import org.eclipse.emf.ecp.view.spi.model.ModelChangeListener; +import org.eclipse.emf.ecp.view.spi.model.ModelChangeNotification; import org.eclipse.emf.ecp.view.spi.model.VView; import org.eclipse.emf.ecp.view.spi.provider.ViewProviderHelper; import org.eclipse.emf.ecp.view.treemasterdetail.model.VTreeMasterDetail; @@ -30,9 +32,77 @@ import org.eclipse.emf.edit.provider.ComposedAdapterFactory; import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; +/** + * The TreeMasterDatailValidationInitiator searches for {@link VTreeMasterDetail} VElements and registers the necessary + * ViewModelContexts. + * + * @author Eugen Neufeld + * + */ @SuppressWarnings("restriction") public class TreeMasterDetailValidationInitiator implements - ViewModelService { + GlobalViewModelService { + /** + * A Mapping for TreeMasterDetails. + * + * @author Eugen Neufeld + * + */ + private static class TreeContextMapping { + private VTreeMasterDetail control; + private ViewModelContext context; + + /** + * {@inheritDoc} + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + (context == null ? 0 : context.hashCode()); + result = prime * result + (control == null ? 0 : control.hashCode()); + return result; + } + + /** + * {@inheritDoc} + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final TreeContextMapping other = (TreeContextMapping) obj; + if (context == null) { + if (other.context != null) { + return false; + } + } else if (!context.equals(other.context)) { + return false; + } + if (control == null) { + if (other.control != null) { + return false; + } + } else if (!control.equals(other.control)) { + return false; + } + return true; + } + + } + + private final Map<TreeContextMapping, Set<Object>> mapping = new LinkedHashMap<TreeContextMapping, Set<Object>>(); /** * The detail key passed to the view model context. */ @@ -47,6 +117,9 @@ private AdapterFactoryContentProvider adapterFactoryContentProvider; + /** + * Constructor of the Initiator. + */ public TreeMasterDetailValidationInitiator() { adapterFactory = new ComposedAdapterFactory(new AdapterFactory[] { new CustomReflectiveItemProviderAdapterFactory(), @@ -64,7 +137,40 @@ @Override public void instantiate(ViewModelContext context) { + context.registerDomainChangeListener(new ModelChangeListener() { + @Override + public void notifyChange(ModelChangeNotification notification) { + if (notification.getRawNotification().isTouch() || mapping.isEmpty()) { + return; + } + for (final TreeContextMapping treeContextEntry : mapping.keySet()) { + if (!mapping.get(treeContextEntry).contains(notification.getNotifier())) { + return; + } + final Set<Object> children = getAllChildren(manipulateSelection(notification.getNotifier()), + adapterFactoryContentProvider); + if (mapping.get(treeContextEntry).containsAll(children)) { + return; + } + children.removeAll(mapping.get(treeContextEntry)); + for (final Object child : children) { + final EObject addedObject = (EObject) manipulateSelection(child); + mapping.get(treeContextEntry).add(addedObject); + final Map<String, Object> context = new LinkedHashMap<String, Object>(); + context.put(DETAIL_KEY, true); + context.put(ROOT_KEY, true); + treeContextEntry.context.getChildContext(addedObject, + treeContextEntry.control, ViewProviderHelper.getView(addedObject, context)); + } + } + } + }); + checkForTreeMasterDetail(context); + + } + + private void checkForTreeMasterDetail(ViewModelContext context) { final EObject viewRoot = context.getViewModel(); final TreeIterator<EObject> eAllContents = viewRoot.eAllContents(); while (eAllContents.hasNext()) { @@ -75,19 +181,28 @@ registerChildrenChildContext(treeMasterDetail, context, adapterFactoryContentProvider); } } - } private void registerChildrenChildContext(VTreeMasterDetail treeMasterDetail, ViewModelContext viewModelContext, final AdapterFactoryContentProvider adapterFactoryContentProvider) { final Set<Object> children = getAllChildren(viewModelContext.getDomainModel(), adapterFactoryContentProvider); + for (final Object object : children) { final Map<String, Object> context = new LinkedHashMap<String, Object>(); context.put(DETAIL_KEY, true); - final VView view = ViewProviderHelper.getView((EObject) object, context); + final EObject manipulateSelection = (EObject) manipulateSelection(object); + final TreeContextMapping entry = new TreeContextMapping(); + entry.context = viewModelContext; + entry.control = treeMasterDetail; + if (!mapping.containsKey(entry)) { + mapping.put(entry, new LinkedHashSet<Object>()); + } + mapping.get(entry).add(manipulateSelection); - viewModelContext.getChildContext((EObject) object, treeMasterDetail, view); + final VView view = ViewProviderHelper.getView(manipulateSelection, context); + + viewModelContext.getChildContext(manipulateSelection, treeMasterDetail, view); } } @@ -96,6 +211,14 @@ context.put(DETAIL_KEY, true); context.put(ROOT_KEY, true); final Object manipulateSelection = manipulateSelection(viewModelContext.getDomainModel()); + final TreeContextMapping entry = new TreeContextMapping(); + entry.context = viewModelContext; + entry.control = treeMasterDetail; + if (!mapping.containsKey(entry)) { + mapping.put(entry, new LinkedHashSet<Object>()); + } + mapping.get(entry).add(manipulateSelection); + VView view = treeMasterDetail.getDetailView(); if (view == null || view.getChildren().isEmpty()) { view = ViewProviderHelper.getView((EObject) manipulateSelection, context); @@ -129,7 +252,17 @@ @Override public int getPriority() { - return 3; + return 2; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.emf.ecp.view.spi.context.GlobalViewModelService#childViewModelContextAdded(org.eclipse.emf.ecp.view.spi.context.ViewModelContext) + */ + @Override + public void childViewModelContextAdded(ViewModelContext childContext) { + checkForTreeMasterDetail(childContext); } }
diff --git a/bundles/org.eclipse.emf.ecp.view.validation/src/org/eclipse/emf/ecp/view/internal/validation/ValidationServiceImpl.java b/bundles/org.eclipse.emf.ecp.view.validation/src/org/eclipse/emf/ecp/view/internal/validation/ValidationServiceImpl.java index de70b91..423aa27 100644 --- a/bundles/org.eclipse.emf.ecp.view.validation/src/org/eclipse/emf/ecp/view/internal/validation/ValidationServiceImpl.java +++ b/bundles/org.eclipse.emf.ecp.view.validation/src/org/eclipse/emf/ecp/view/internal/validation/ValidationServiceImpl.java
@@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. - * + * * 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: * Eugen - initial API and implementation ******************************************************************************/ @@ -58,15 +58,15 @@ /** * Validation service that, once instantiated, synchronizes the validation result of a model element with its * Renderable. - * + * * @author Eugen Neufeld - * + * */ public class ValidationServiceImpl implements ValidationService { /** * The {@link ValidationDomainModelChangeListener} for the view model. - * + * */ private class ViewModelChangeListener implements ModelChangeAddRemoveListener { @@ -75,7 +75,7 @@ if (VViewPackage.eINSTANCE.getElement_Enabled() == notification.getRawNotification() .getFeature() || VViewPackage.eINSTANCE.getElement_Visible() == notification.getRawNotification() - .getFeature()) { + .getFeature()) { if (VViewPackage.eINSTANCE.getControl().isInstance(notification.getNotifier())) { final VControl control = (VControl) notification.getNotifier(); @@ -141,7 +141,7 @@ /** * The {@link ValidationDomainModelChangeListener} for the domain model. - * + * */ private class ValidationDomainModelChangeListener implements ModelChangeAddRemoveListener { @@ -159,17 +159,17 @@ validate(notification.getNotifier()); // in case of not containment references if (EReference.class.isInstance(notification.getStructuralFeature()) - // && !EReference.class.cast(notification.getStructuralFeature()).isContainment() - ) { - validate((EObject) notification.getRawNotification().getNewValue()); + // && !EReference.class.cast(notification.getStructuralFeature()).isContainment() + ) { + validate(getAllEObjects((EObject) notification.getRawNotification().getNewValue())); } break; case Notification.ADD_MANY: validate(notification.getNotifier()); // in case of not containment references if (EReference.class.isInstance(notification.getStructuralFeature()) - // && !EReference.class.cast(notification.getStructuralFeature()).isContainment() - ) { + // && !EReference.class.cast(notification.getStructuralFeature()).isContainment() + ) { validate((Collection<EObject>) notification.getRawNotification().getNewValue()); } break; @@ -227,7 +227,7 @@ /** * {@inheritDoc} - * + * * @see org.eclipse.emf.ecp.view.spi.context.ViewModelService#instantiate(org.eclipse.emf.ecp.view.spi.context.ViewModelContext) */ @Override @@ -301,7 +301,7 @@ /** * {@inheritDoc} - * + * * @see org.eclipse.emf.ecp.view.spi.context.ViewModelService#dispose() */ @Override @@ -312,7 +312,7 @@ /** * {@inheritDoc} - * + * * @see org.eclipse.emf.ecp.view.spi.context.ViewModelService#getPriority() */ @Override @@ -322,7 +322,7 @@ /** * Returns a collection of all direct and indirect child-EObjects including the parent. - * + * * @param eObject the parent * @return all eobjects */ @@ -338,7 +338,7 @@ /** * {@inheritDoc} - * + * * @see org.eclipse.emf.ecp.view.internal.validation.ValidationService#validate(java.util.Collection) */ @Override @@ -357,7 +357,7 @@ /** * Validate the given eObject. - * + * * @param eObject the eObject to validate */ public void validate(EObject eObject) { @@ -415,7 +415,7 @@ controlDiagnosticMap.get(control).getDiagnostics() .removeAll(currentUpdates.get(uniqueSetting).getDiagnostics()); controlDiagnosticMap.get(control).getDiagnostics() - .addAll(currentUpdates.get(uniqueSetting).getDiagnostics()); + .addAll(currentUpdates.get(uniqueSetting).getDiagnostics()); // add all diagnostics of control which are not in the currentUpdates if (control.getDiagnostic() == null) { @@ -528,7 +528,7 @@ /** * Computes the {@link Diagnostic} for the given eObject. - * + * * @param object the eObject to validate * @return the diagnostic */ @@ -572,9 +572,9 @@ } /** - * + * * {@inheritDoc} - * + * * @see org.eclipse.emf.ecp.view.internal.validation.ValidationService#addValidationProvider(org.eclipse.emf.ecp.view.internal.validation.ValidationProvider) */ @Override @@ -584,9 +584,9 @@ } /** - * + * * {@inheritDoc} - * + * * @see org.eclipse.emf.ecp.view.internal.validation.ValidationService#removeValidationProvider(org.eclipse.emf.ecp.view.internal.validation.ValidationProvider) */ @Override @@ -599,7 +599,7 @@ /** * {@inheritDoc} - * + * * @see org.eclipse.emf.ecp.view.internal.validation.ValidationService#registerValidationListener(org.eclipse.emf.ecp.view.internal.validation.ViewValidationListener) */ @Override @@ -622,7 +622,7 @@ /** * {@inheritDoc} - * + * * @see org.eclipse.emf.ecp.view.internal.validation.ValidationService#deregisterValidationListener(org.eclipse.emf.ecp.view.internal.validation.ViewValidationListener) */ @Override @@ -632,4 +632,15 @@ listener.onNewValidation(getDiagnosticResult()); } + /** + * {@inheritDoc} + * + * @see org.eclipse.emf.ecp.view.spi.context.GlobalViewModelService#childViewModelContextAdded(org.eclipse.emf.ecp.view.spi.context.ViewModelContext) + */ + @Override + public void childViewModelContextAdded(ViewModelContext childContext) { + // TODO Auto-generated method stub + + } + }
diff --git a/releng/org.eclipse.emf.ecp.releng.tests/pom.xml b/releng/org.eclipse.emf.ecp.releng.tests/pom.xml index 56d9f55..c74bbb8 100644 --- a/releng/org.eclipse.emf.ecp.releng.tests/pom.xml +++ b/releng/org.eclipse.emf.ecp.releng.tests/pom.xml
@@ -58,6 +58,7 @@ <module>../../tests/org.eclipse.emf.ecp.ide.view.service.test</module> <module>../../tests/org.eclipse.emf.ecp.view.core.swt.tests</module> <module>../../tests/org.eclipse.emf.ecp.view.viewproxy.test</module> + <module>../../tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test</module> <!-- Key Attribute DMR --> <module>../../tests/org.eclipse.emf.ecp.view.keyattributedmr.model.test</module>
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.checkstyle b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.checkstyle new file mode 100644 index 0000000..19c5477 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.checkstyle
@@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false"> + <local-check-config name="ESMCheckstyle" location="/org.eclipse.emf.ecp.releng/checkstyle/esmCheckstyle.xml" type="project" description=""> + <additional-data name="protect-config-file" value="false"/> + </local-check-config> + <fileset name="Java Files" enabled="true" check-config-name="ESMCheckstyle" local="true"> + <file-match-pattern match-pattern=".java" include-pattern="true"/> + </fileset> +</fileset-config>
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.classpath b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.classpath new file mode 100644 index 0000000..ad32c83 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.classpath
@@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath>
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.project b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.project new file mode 100644 index 0000000..8f1e398 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.project
@@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.emf.ecp.view.treemasterdetail.validation.test</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>net.sf.eclipsecs.core.CheckstyleBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>net.sf.eclipsecs.core.CheckstyleNature</nature> + </natures> +</projectDescription>
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.core.resources.prefs b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..f548abb --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,6 @@ +eclipse.preferences.version=1 + +encoding//model/etypes.ecore=UTF-8 + + +encoding/<project>=UTF-8
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.core.runtime.prefs b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 0000000..5a0ad22 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.jdt.core.prefs b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..c948297 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,418 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter= +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled +org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW,NORMAL +org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,PERF,MEM,POLISH,@generated NOT,@ADDED,APITODO +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=true +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=120 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=1 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=120 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.jdt.launching.prefs b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 0000000..3bb2352 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.jdt.launching.prefs
@@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.jdt.ui.prefs b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000..791508d --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,115 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=true +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=true +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=false +cleanup.remove_unnecessary_nls_tags=false +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_parentheses_in_expressions=true +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_esmCleanUp +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_esmFormatter +formatter_settings_version=12 +org.eclipse.jdt.ui.exception.name=ex +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\r\n * Copyright (c) 2011-${year} EclipseSource Muenchen GmbH and others.\r\n * \r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * ${user} - initial API and implementation\r\n ******************************************************************************/</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\r\n * {@inheritDoc}\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">\t\t\t// TODO Auto-generated catch block\r\n\t\t\t// Do NOT catch all Exceptions ("catch (Exception e)")\r\n\t\t\t// Log AND handle Exceptions if possible \r\n //\r\n // You can just uncomment one of the lines below to log an exception\:\r\n\t\t\t// logException will show the logged excpetion to the user\r\n\t\t\t// ModelUtil.logException(${exception_var});\r\n\t\t\t// ModelUtil.logException("YOUR MESSAGE HERE", ${exception_var});\r\n\t\t\t// logWarning will only add the message to the error log\r\n\t\t\t// ModelUtil.logWarning("YOUR MESSAGE HERE", ${exception_var});\r\n\t\t\t// ModelUtil.logWarning("YOUR MESSAGE HERE");\r\n\t\t\t//\t\t\t\r\n\t\t\t// If handling is not possible declare and rethrow Exception</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=true +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=true +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=true +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=false +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_this_for_non_static_field_access=true +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=true +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.ltk.core.refactoring.prefs b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.ltk.core.refactoring.prefs new file mode 100644 index 0000000..864e30f --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@ +#Thu Feb 04 09:44:24 CET 2010 +eclipse.preferences.version=1 +org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.pde.api.tools.prefs b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 0000000..e4e3c00 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.pde.api.tools.prefs
@@ -0,0 +1,97 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_JAVADOC_TAG=Warning +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +MISSING_EE_DESCRIPTIONS=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Ignore +automatically_removed_unused_problem_filters=Disabled +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.pde.prefs b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.pde.prefs new file mode 100644 index 0000000..0bbee3c --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,32 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=1 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=1 +compilers.p.build.src.includes=1 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=1 +compilers.p.missing-version-export-package=1 +compilers.p.missing-version-import-package=1 +compilers.p.missing-version-require-bundle=1 +compilers.p.no-required-att=0 +compilers.p.not-externalized-att=2 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +eclipse.preferences.version=1
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/META-INF/MANIFEST.MF b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/META-INF/MANIFEST.MF new file mode 100644 index 0000000..d23dc44 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: EMF Forms TreeMasterDetail Validation Test +Bundle-SymbolicName: org.eclipse.emf.ecp.view.treemasterdetail.validation.test;singleton:=true +Bundle-Version: 1.5.0.qualifier +Fragment-Host: org.eclipse.emf.ecp.view.treemasterdetail.ui.swt;bundle-version="[1.5.0,2.0.0)" +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-Vendor: Eclipse Modeling Project +Bundle-Localization: plugin +Require-Bundle: org.junit;bundle-version="[4.11.0,5.0.0)" +Export-Package: org.eclipse.emf.ecp.view.treemasterdetail.validation.test;version="1.5.0";x-internal:=true, + org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD;version="1.5.0";x-internal:=true, + org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl;version="1.5.0";x-internal:=true, + org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.util;version="1.5.0";x-internal:=true
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/build.properties b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/build.properties new file mode 100644 index 0000000..35c6807 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/build.properties
@@ -0,0 +1,10 @@ +# + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.properties,\ + fragment.xml +jars.compile.order = . +source.. = src/ +output.. = bin/
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/fragment.xml b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/fragment.xml new file mode 100644 index 0000000..6e4817c --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/fragment.xml
@@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<fragment> + <extension + point="org.eclipse.emf.ecore.generated_package"> + <package + class="org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage" + genModel="model/TestTMD.genmodel" + uri="TestTMD"> + </package> + </extension> + +</fragment>
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/model/TestTMD.ecore b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/model/TestTMD.ecore new file mode 100644 index 0000000..a0681f7 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/model/TestTMD.ecore
@@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="TestTMD" nsURI="TestTMD" nsPrefix="TestTMD"> + <eClassifiers xsi:type="ecore:EClass" name="Root"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1" + eType="#//ChildLevel1" containment="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="ChildLevel1"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1" + eType="#//ChildLevel2" containment="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="ChildLevel2"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + </eClassifiers> +</ecore:EPackage>
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/model/TestTMD.genmodel b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/model/TestTMD.genmodel new file mode 100644 index 0000000..4dbb4f0 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/model/TestTMD.genmodel
@@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" + xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="/*******************************************************************************
 * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others.
 * 
 * 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:
 * EclipseSource - initial API and implementation
 ******************************************************************************/" + modelDirectory="/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src" + editDirectory="/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src" + modelPluginID="org.eclipse.emf.ecp.view.treemasterdetail.validation.test" modelName="TestTMD" + nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" + codeFormatting="true" commentFormatting="true" importerID="org.eclipse.emf.importer.ecore" + complianceLevel="6.0" copyrightFields="false" operationReflection="true" importOrganizing="true"> + <foreignModel>TestTMD.ecore</foreignModel> + <genPackages prefix="TestTMD" basePackage="org.eclipse.emf.ecp.view.treemasterdetail.validation.test" + disposableProviderFactory="true" ecorePackage="TestTMD.ecore#/"> + <genClasses ecoreClass="TestTMD.ecore#//Root"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute TestTMD.ecore#//Root/name"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference TestTMD.ecore#//Root/children"/> + </genClasses> + <genClasses ecoreClass="TestTMD.ecore#//ChildLevel1"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute TestTMD.ecore#//ChildLevel1/name"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference TestTMD.ecore#//ChildLevel1/children"/> + </genClasses> + <genClasses ecoreClass="TestTMD.ecore#//ChildLevel2"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute TestTMD.ecore#//ChildLevel2/name"/> + </genClasses> + </genPackages> +</genmodel:GenModel>
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/plugin.properties b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/plugin.properties new file mode 100644 index 0000000..41c8773 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/plugin.properties
@@ -0,0 +1,4 @@ +# + +pluginName = TestTMD Model +providerName = www.example.org
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/pom.xml b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/pom.xml new file mode 100644 index 0000000..69fd1ab --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/pom.xml
@@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" + xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.eclipse.emf.ecp</groupId> + <artifactId>ecp-parent</artifactId> + <version>1.5.0-SNAPSHOT</version> + <relativePath>../../releng/org.eclipse.emf.ecp.releng/</relativePath> + </parent> + <groupId>org.eclipse.emf.ecp</groupId> + <artifactId>org.eclipse.emf.ecp.view.treemasterdetail.validation.test</artifactId> + <version>1.5.0-SNAPSHOT</version> + <packaging>eclipse-test-plugin</packaging> + + <build> + <sourceDirectory>src</sourceDirectory> + <plugins> + <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>tycho-surefire-plugin</artifactId> + <version>${tycho-version}</version> + <configuration> + <testSuite>org.eclipse.emf.ecp.view.treemasterdetail.validation.test</testSuite> + <testClass>org.eclipse.emf.ecp.view.treemasterdetail.validation.test.AllTests</testClass> + <useUIHarness>true</useUIHarness> + <useUIThread>true</useUIThread> + <testFailureIgnore>true</testFailureIgnore> + <dependencies> + <dependency> + <type>eclipse-feature</type> + <artifactId>org.eclipse.emf.ecp.target.feature</artifactId> + <version>0.0.0</version> + </dependency> + <dependency> + <type>eclipse-feature</type> + <artifactId>org.eclipse.emf.ecp.feature</artifactId> + <version>0.0.0</version> + </dependency> + <dependency> + <type>eclipse-feature</type> + <artifactId>org.eclipse.emf.ecp.viewmodel.feature</artifactId> + <version>0.0.0</version> + </dependency> + <dependency> + <type>eclipse-feature</type> + <artifactId>org.eclipse.emf.ecp.view.treemasterdetail.feature</artifactId> + <version>0.0.0</version> + </dependency> + <dependency> + <type>eclipse-feature</type> + <artifactId>org.eclipse.emf.ecp.view.validation.feature</artifactId> + <version>0.0.0</version> + </dependency> + </dependencies> + </configuration> + </plugin> + </plugins> + </build> +</project>
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/AllTests.java b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/AllTests.java new file mode 100644 index 0000000..cd8d97c --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/AllTests.java
@@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. + * + * 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: + * Eugen Neufeld - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.ecp.view.treemasterdetail.validation.test; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +/** + * Test Suite for TreeMasterDetail validation Tests. + * + * @author Eugen Neufeld + * + */ +@RunWith(Suite.class) +@SuiteClasses({ TreeMasterDetailValidation_ITest.class }) +public class AllTests { + +}
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/ChildLevel1.java b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/ChildLevel1.java new file mode 100644 index 0000000..29055cc --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/ChildLevel1.java
@@ -0,0 +1,82 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. + * + * 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: + * Eugen Neufeld - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> A representation of the model object ' <em><b>Child Level1</b></em>'. <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li> + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1#getName + * <em>Name</em>}</li> + * <li> + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1#getChildren + * <em>Children</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage#getChildLevel1() + * @model + * @generated + */ +public interface ChildLevel1 extends EObject { + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage#getChildLevel1_Name() + * @model required="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1#getName + * <em>Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Children</b></em>' containment reference + * list. The list contents are of type + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2} . <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Children</em>' containment reference list isn't clear, there really should be more of + * a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Children</em>' containment reference list. + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage#getChildLevel1_Children() + * @model containment="true" + * @generated + */ + EList<ChildLevel2> getChildren(); + +} // ChildLevel1
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/ChildLevel2.java b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/ChildLevel2.java new file mode 100644 index 0000000..0f14f83 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/ChildLevel2.java
@@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. + * + * 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: + * Eugen Neufeld - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> A representation of the model object ' <em><b>Child Level2</b></em>'. <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li> + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2#getName + * <em>Name</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage#getChildLevel2() + * @model + * @generated + */ +public interface ChildLevel2 extends EObject { + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage#getChildLevel2_Name() + * @model required="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2#getName + * <em>Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // ChildLevel2
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/Root.java b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/Root.java new file mode 100644 index 0000000..3f6006f --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/Root.java
@@ -0,0 +1,81 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. + * + * 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: + * Eugen Neufeld - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> A representation of the model object ' <em><b>Root</b></em>'. <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li> + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root#getName + * <em>Name</em>}</li> + * <li> + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root#getChildren + * <em>Children</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage#getRoot() + * @model + * @generated + */ +public interface Root extends EObject { + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage#getRoot_Name() + * @model required="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the ' {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root#getName + * <em>Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Children</b></em>' containment reference + * list. The list contents are of type + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1} . <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Children</em>' containment reference list isn't clear, there really should be more of + * a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Children</em>' containment reference list. + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage#getRoot_Children() + * @model containment="true" + * @generated + */ + EList<ChildLevel1> getChildren(); + +} // Root
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/TestTMDFactory.java b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/TestTMDFactory.java new file mode 100644 index 0000000..8405d88 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/TestTMDFactory.java
@@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. + * + * 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: + * Eugen Neufeld - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD; + +import org.eclipse.emf.ecore.EFactory; + +/** + * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a + * create method for each non-abstract class of the model. <!-- end-user-doc --> + * + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage + * @generated + */ +public interface TestTMDFactory extends EFactory { + /** + * The singleton instance of the factory. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + TestTMDFactory eINSTANCE = org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.TestTMDFactoryImpl + .init(); + + /** + * Returns a new object of class '<em>Root</em>'. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return a new object of class '<em>Root</em>'. + * @generated + */ + Root createRoot(); + + /** + * Returns a new object of class '<em>Child Level1</em>'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Child Level1</em>'. + * @generated + */ + ChildLevel1 createChildLevel1(); + + /** + * Returns a new object of class '<em>Child Level2</em>'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Child Level2</em>'. + * @generated + */ + ChildLevel2 createChildLevel2(); + + /** + * Returns the package supported by this factory. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the package supported by this factory. + * @generated + */ + TestTMDPackage getTestTMDPackage(); + +} // TestTMDFactory
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/TestTMDPackage.java b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/TestTMDPackage.java new file mode 100644 index 0000000..caa00d3 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/TestTMDPackage.java
@@ -0,0 +1,396 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. + * + * 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: + * Eugen Neufeld - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains + * accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDFactory + * @model kind="package" + * @generated + */ +public interface TestTMDPackage extends EPackage { + /** + * The package name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNAME = "TestTMD"; //$NON-NLS-1$ + + /** + * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNS_URI = "TestTMD"; //$NON-NLS-1$ + + /** + * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNS_PREFIX = "TestTMD"; //$NON-NLS-1$ + + /** + * The singleton instance of the package. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + TestTMDPackage eINSTANCE = org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.TestTMDPackageImpl + .init(); + + /** + * The meta object id for the ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.RootImpl + * <em>Root</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.RootImpl + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.TestTMDPackageImpl#getRoot() + * @generated + */ + int ROOT = 0; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ROOT__NAME = 0; + + /** + * The feature id for the '<em><b>Children</b></em>' containment reference + * list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ROOT__CHILDREN = 1; + + /** + * The number of structural features of the '<em>Root</em>' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ROOT_FEATURE_COUNT = 2; + + /** + * The number of operations of the '<em>Root</em>' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ROOT_OPERATION_COUNT = 0; + + /** + * The meta object id for the ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.ChildLevel1Impl + * <em>Child Level1</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.ChildLevel1Impl + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.TestTMDPackageImpl#getChildLevel1() + * @generated + */ + int CHILD_LEVEL1 = 1; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CHILD_LEVEL1__NAME = 0; + + /** + * The feature id for the '<em><b>Children</b></em>' containment reference + * list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CHILD_LEVEL1__CHILDREN = 1; + + /** + * The number of structural features of the '<em>Child Level1</em>' class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CHILD_LEVEL1_FEATURE_COUNT = 2; + + /** + * The number of operations of the '<em>Child Level1</em>' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CHILD_LEVEL1_OPERATION_COUNT = 0; + + /** + * The meta object id for the ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.ChildLevel2Impl + * <em>Child Level2</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.ChildLevel2Impl + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.TestTMDPackageImpl#getChildLevel2() + * @generated + */ + int CHILD_LEVEL2 = 2; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CHILD_LEVEL2__NAME = 0; + + /** + * The number of structural features of the '<em>Child Level2</em>' class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CHILD_LEVEL2_FEATURE_COUNT = 1; + + /** + * The number of operations of the '<em>Child Level2</em>' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CHILD_LEVEL2_OPERATION_COUNT = 0; + + /** + * Returns the meta object for class ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root + * <em>Root</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Root</em>'. + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root + * @generated + */ + EClass getRoot(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root#getName + * <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Name</em>'. + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root#getName() + * @see #getRoot() + * @generated + */ + EAttribute getRoot_Name(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root#getChildren + * <em>Children</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference list ' <em>Children</em>'. + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root#getChildren() + * @see #getRoot() + * @generated + */ + EReference getRoot_Children(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1 + * <em>Child Level1</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Child Level1</em>'. + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1 + * @generated + */ + EClass getChildLevel1(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1#getName + * <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Name</em>'. + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1#getName() + * @see #getChildLevel1() + * @generated + */ + EAttribute getChildLevel1_Name(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1#getChildren + * <em>Children</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference list ' <em>Children</em>'. + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1#getChildren() + * @see #getChildLevel1() + * @generated + */ + EReference getChildLevel1_Children(); + + /** + * Returns the meta object for class ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2 + * <em>Child Level2</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Child Level2</em>'. + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2 + * @generated + */ + EClass getChildLevel2(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2#getName + * <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Name</em>'. + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2#getName() + * @see #getChildLevel2() + * @generated + */ + EAttribute getChildLevel2_Name(); + + /** + * Returns the factory that creates the instances of the model. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the factory that creates the instances of the model. + * @generated + */ + TestTMDFactory getTestTMDFactory(); + + /** + * <!-- begin-user-doc --> Defines literals for the meta objects that + * represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * + * @generated + */ + interface Literals { + /** + * The meta object literal for the ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.RootImpl + * <em>Root</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.RootImpl + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.TestTMDPackageImpl#getRoot() + * @generated + */ + EClass ROOT = eINSTANCE.getRoot(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute ROOT__NAME = eINSTANCE.getRoot_Name(); + + /** + * The meta object literal for the '<em><b>Children</b></em>' + * containment reference list feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference ROOT__CHILDREN = eINSTANCE.getRoot_Children(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.ChildLevel1Impl + * <em>Child Level1</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.ChildLevel1Impl + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.TestTMDPackageImpl#getChildLevel1() + * @generated + */ + EClass CHILD_LEVEL1 = eINSTANCE.getChildLevel1(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute CHILD_LEVEL1__NAME = eINSTANCE.getChildLevel1_Name(); + + /** + * The meta object literal for the '<em><b>Children</b></em>' + * containment reference list feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference CHILD_LEVEL1__CHILDREN = eINSTANCE.getChildLevel1_Children(); + + /** + * The meta object literal for the ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.ChildLevel2Impl + * <em>Child Level2</em>}' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.ChildLevel2Impl + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.TestTMDPackageImpl#getChildLevel2() + * @generated + */ + EClass CHILD_LEVEL2 = eINSTANCE.getChildLevel2(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute + * feature. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute CHILD_LEVEL2__NAME = eINSTANCE.getChildLevel2_Name(); + + } + +} // TestTMDPackage
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/ChildLevel1Impl.java b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/ChildLevel1Impl.java new file mode 100644 index 0000000..b4a1fa7 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/ChildLevel1Impl.java
@@ -0,0 +1,241 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. + * + * 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: + * Eugen Neufeld - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Child Level1</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li> + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.ChildLevel1Impl#getName + * <em>Name</em>}</li> + * <li> + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.ChildLevel1Impl#getChildren + * <em>Children</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ChildLevel1Impl extends MinimalEObjectImpl.Container implements + ChildLevel1 { + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getChildren() <em>Children</em>}' + * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getChildren() + * @generated + * @ordered + */ + protected EList<ChildLevel2> children; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ChildLevel1Impl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TestTMDPackage.Literals.CHILD_LEVEL1; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setName(String newName) { + final String oldName = name; + name = newName; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, + TestTMDPackage.CHILD_LEVEL1__NAME, oldName, name)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<ChildLevel2> getChildren() { + if (children == null) { + children = new EObjectContainmentEList<ChildLevel2>( + ChildLevel2.class, this, + TestTMDPackage.CHILD_LEVEL1__CHILDREN); + } + return children; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, + int featureID, NotificationChain msgs) { + switch (featureID) { + case TestTMDPackage.CHILD_LEVEL1__CHILDREN: + return ((InternalEList<?>) getChildren()).basicRemove(otherEnd, + msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TestTMDPackage.CHILD_LEVEL1__NAME: + return getName(); + case TestTMDPackage.CHILD_LEVEL1__CHILDREN: + return getChildren(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TestTMDPackage.CHILD_LEVEL1__NAME: + setName((String) newValue); + return; + case TestTMDPackage.CHILD_LEVEL1__CHILDREN: + getChildren().clear(); + getChildren().addAll((Collection<? extends ChildLevel2>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TestTMDPackage.CHILD_LEVEL1__NAME: + setName(NAME_EDEFAULT); + return; + case TestTMDPackage.CHILD_LEVEL1__CHILDREN: + getChildren().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TestTMDPackage.CHILD_LEVEL1__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT + .equals(name); + case TestTMDPackage.CHILD_LEVEL1__CHILDREN: + return children != null && !children.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + final StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); //$NON-NLS-1$ + result.append(name); + result.append(')'); + return result.toString(); + } + +} // ChildLevel1Impl
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/ChildLevel2Impl.java b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/ChildLevel2Impl.java new file mode 100644 index 0000000..c1599c0 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/ChildLevel2Impl.java
@@ -0,0 +1,177 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. + * + * 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: + * Eugen Neufeld - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Child Level2</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li> + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.ChildLevel2Impl#getName + * <em>Name</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ChildLevel2Impl extends MinimalEObjectImpl.Container implements + ChildLevel2 { + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ChildLevel2Impl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TestTMDPackage.Literals.CHILD_LEVEL2; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setName(String newName) { + final String oldName = name; + name = newName; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, + TestTMDPackage.CHILD_LEVEL2__NAME, oldName, name)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TestTMDPackage.CHILD_LEVEL2__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TestTMDPackage.CHILD_LEVEL2__NAME: + setName((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TestTMDPackage.CHILD_LEVEL2__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TestTMDPackage.CHILD_LEVEL2__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT + .equals(name); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + final StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); //$NON-NLS-1$ + result.append(name); + result.append(')'); + return result.toString(); + } + +} // ChildLevel2Impl
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/RootImpl.java b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/RootImpl.java new file mode 100644 index 0000000..76cf43f --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/RootImpl.java
@@ -0,0 +1,239 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. + * + * 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: + * Eugen Neufeld - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage; + +/** + * <!-- begin-user-doc --> An implementation of the model object ' <em><b>Root</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li> + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.RootImpl#getName + * <em>Name</em>}</li> + * <li> + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl.RootImpl#getChildren + * <em>Children</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class RootImpl extends MinimalEObjectImpl.Container implements Root { + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getChildren() <em>Children</em>}' + * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #getChildren() + * @generated + * @ordered + */ + protected EList<ChildLevel1> children; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected RootImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TestTMDPackage.Literals.ROOT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void setName(String newName) { + final String oldName = name; + name = newName; + if (eNotificationRequired()) { + eNotify(new ENotificationImpl(this, Notification.SET, + TestTMDPackage.ROOT__NAME, oldName, name)); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EList<ChildLevel1> getChildren() { + if (children == null) { + children = new EObjectContainmentEList<ChildLevel1>( + ChildLevel1.class, this, TestTMDPackage.ROOT__CHILDREN); + } + return children; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, + int featureID, NotificationChain msgs) { + switch (featureID) { + case TestTMDPackage.ROOT__CHILDREN: + return ((InternalEList<?>) getChildren()).basicRemove(otherEnd, + msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TestTMDPackage.ROOT__NAME: + return getName(); + case TestTMDPackage.ROOT__CHILDREN: + return getChildren(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TestTMDPackage.ROOT__NAME: + setName((String) newValue); + return; + case TestTMDPackage.ROOT__CHILDREN: + getChildren().clear(); + getChildren().addAll((Collection<? extends ChildLevel1>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TestTMDPackage.ROOT__NAME: + setName(NAME_EDEFAULT); + return; + case TestTMDPackage.ROOT__CHILDREN: + getChildren().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TestTMDPackage.ROOT__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT + .equals(name); + case TestTMDPackage.ROOT__CHILDREN: + return children != null && !children.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) { + return super.toString(); + } + + final StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); //$NON-NLS-1$ + result.append(name); + result.append(')'); + return result.toString(); + } + +} // RootImpl
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/TestTMDFactoryImpl.java b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/TestTMDFactoryImpl.java new file mode 100644 index 0000000..68e64e1 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/TestTMDFactoryImpl.java
@@ -0,0 +1,135 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. + * + * 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: + * Eugen Neufeld - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.emf.ecore.plugin.EcorePlugin; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDFactory; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage; + +/** + * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- + * end-user-doc --> + * + * @generated + */ +public class TestTMDFactoryImpl extends EFactoryImpl implements TestTMDFactory { + /** + * Creates the default factory implementation. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public static TestTMDFactory init() { + try { + final TestTMDFactory theTestTMDFactory = (TestTMDFactory) EPackage.Registry.INSTANCE + .getEFactory(TestTMDPackage.eNS_URI); + if (theTestTMDFactory != null) { + return theTestTMDFactory; + } + } catch (final Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new TestTMDFactoryImpl(); + } + + /** + * Creates an instance of the factory. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public TestTMDFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case TestTMDPackage.ROOT: + return createRoot(); + case TestTMDPackage.CHILD_LEVEL1: + return createChildLevel1(); + case TestTMDPackage.CHILD_LEVEL2: + return createChildLevel2(); + default: + throw new IllegalArgumentException( + "The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Root createRoot() { + final RootImpl root = new RootImpl(); + return root; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ChildLevel1 createChildLevel1() { + final ChildLevel1Impl childLevel1 = new ChildLevel1Impl(); + return childLevel1; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public ChildLevel2 createChildLevel2() { + final ChildLevel2Impl childLevel2 = new ChildLevel2Impl(); + return childLevel2; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public TestTMDPackage getTestTMDPackage() { + return (TestTMDPackage) getEPackage(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @deprecated + * @generated + */ + @Deprecated + public static TestTMDPackage getPackage() { + return TestTMDPackage.eINSTANCE; + } + +} // TestTMDFactoryImpl
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/TestTMDPackageImpl.java b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/TestTMDPackageImpl.java new file mode 100644 index 0000000..c101789 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/impl/TestTMDPackageImpl.java
@@ -0,0 +1,313 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. + * + * 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: + * Eugen Neufeld - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDFactory; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage; + +/** + * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- + * end-user-doc --> + * + * @generated + */ +public class TestTMDPackageImpl extends EPackageImpl implements TestTMDPackage { + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass rootEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass childLevel1EClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass childLevel2EClass = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry + * EPackage.Registry} by the + * package package URI value. + * <p> + * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also + * performs initialization of the package, or returns the registered package, if one already exists. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage#eNS_URI + * @see #init() + * @generated + */ + private TestTMDPackageImpl() { + super(eNS_URI, TestTMDFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, + * and for any others upon which it depends. + * + * <p> + * This method is used to initialize {@link TestTMDPackage#eINSTANCE} when that field is accessed. Clients should + * not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static TestTMDPackage init() { + if (isInited) { + return (TestTMDPackage) EPackage.Registry.INSTANCE + .getEPackage(TestTMDPackage.eNS_URI); + } + + // Obtain or create and register package + final TestTMDPackageImpl theTestTMDPackage = (TestTMDPackageImpl) (EPackage.Registry.INSTANCE + .get(eNS_URI) instanceof TestTMDPackageImpl ? EPackage.Registry.INSTANCE + .get(eNS_URI) : new TestTMDPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theTestTMDPackage.createPackageContents(); + + // Initialize created meta-data + theTestTMDPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theTestTMDPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(TestTMDPackage.eNS_URI, + theTestTMDPackage); + return theTestTMDPackage; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getRoot() { + return rootEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getRoot_Name() { + return (EAttribute) rootEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getRoot_Children() { + return (EReference) rootEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getChildLevel1() { + return childLevel1EClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getChildLevel1_Name() { + return (EAttribute) childLevel1EClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EReference getChildLevel1_Children() { + return (EReference) childLevel1EClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EClass getChildLevel2() { + return childLevel2EClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EAttribute getChildLevel2_Name() { + return (EAttribute) childLevel2EClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public TestTMDFactory getTestTMDFactory() { + return (TestTMDFactory) getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is guarded to + * have no affect on any invocation but its first. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + public void createPackageContents() { + if (isCreated) { + return; + } + isCreated = true; + + // Create classes and their features + rootEClass = createEClass(ROOT); + createEAttribute(rootEClass, ROOT__NAME); + createEReference(rootEClass, ROOT__CHILDREN); + + childLevel1EClass = createEClass(CHILD_LEVEL1); + createEAttribute(childLevel1EClass, CHILD_LEVEL1__NAME); + createEReference(childLevel1EClass, CHILD_LEVEL1__CHILDREN); + + childLevel2EClass = createEClass(CHILD_LEVEL2); + createEAttribute(childLevel2EClass, CHILD_LEVEL2__NAME); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) { + return; + } + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + + // Initialize classes, features, and operations; add parameters + initEClass( + rootEClass, + Root.class, "Root", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute( + getRoot_Name(), + ecorePackage.getEString(), + "name", null, 1, 1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference( + getRoot_Children(), + getChildLevel1(), + null, + "children", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + + initEClass( + childLevel1EClass, + ChildLevel1.class, "ChildLevel1", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute( + getChildLevel1_Name(), + ecorePackage.getEString(), + "name", null, 1, 1, ChildLevel1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference( + getChildLevel1_Children(), + getChildLevel2(), + null, + "children", null, 0, -1, ChildLevel1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + + initEClass( + childLevel2EClass, + ChildLevel2.class, "ChildLevel2", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute( + getChildLevel2_Name(), + ecorePackage.getEString(), + "name", null, 1, 1, ChildLevel2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + + // Create resource + createResource(eNS_URI); + } + +} // TestTMDPackageImpl
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/util/TestTMDAdapterFactory.java b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/util/TestTMDAdapterFactory.java new file mode 100644 index 0000000..b21c016 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/util/TestTMDAdapterFactory.java
@@ -0,0 +1,172 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. + * + * 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: + * Eugen Neufeld - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage; + +/** + * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides + * an adapter <code>createXXX</code> method for each class of the model. <!-- + * end-user-doc --> + * + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage + * @generated + */ +public class TestTMDAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected static TestTMDPackage modelPackage; + + /** + * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public TestTMDAdapterFactory() { + if (modelPackage == null) { + modelPackage = TestTMDPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> This implementation returns <code>true</code> if + * the object is either the model's package or is an instance object of the + * model. <!-- end-user-doc --> + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject) object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected TestTMDSwitch<Adapter> modelSwitch = new TestTMDSwitch<Adapter>() { + @Override + public Adapter caseRoot(Root object) { + return createRootAdapter(); + } + + @Override + public Adapter caseChildLevel1(ChildLevel1 object) { + return createChildLevel1Adapter(); + } + + @Override + public Adapter caseChildLevel2(ChildLevel2 object) { + return createChildLevel2Adapter(); + } + + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the <code>target</code>. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @param target + * the object to adapt. + * @return the adapter for the <code>target</code>. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject) target); + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root + * <em>Root</em>}'. <!-- begin-user-doc --> This default implementation + * returns null so that we can easily ignore cases; it's useful to ignore a + * case when inheritance will catch all the cases anyway. <!-- end-user-doc + * --> + * + * @return the new adapter. + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root + * @generated + */ + public Adapter createRootAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1 + * <em>Child Level1</em>}'. <!-- begin-user-doc --> This default + * implementation returns null so that we can easily ignore cases; it's + * useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1 + * @generated + */ + public Adapter createChildLevel1Adapter() { + return null; + } + + /** + * Creates a new adapter for an object of class ' + * {@link org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2 + * <em>Child Level2</em>}'. <!-- begin-user-doc --> This default + * implementation returns null so that we can easily ignore cases; it's + * useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2 + * @generated + */ + public Adapter createChildLevel2Adapter() { + return null; + } + + /** + * Creates a new adapter for the default case. <!-- begin-user-doc --> This + * default implementation returns null. <!-- end-user-doc --> + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} // TestTMDAdapterFactory
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/util/TestTMDSwitch.java b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/util/TestTMDSwitch.java new file mode 100644 index 0000000..a2aa1bc --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TestTMD/util/TestTMDSwitch.java
@@ -0,0 +1,171 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. + * + * 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: + * Eugen Neufeld - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage; + +/** + * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance + * hierarchy. It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method + * for each class of the model, + * starting with the actual class of the object and proceeding up the + * inheritance hierarchy until a non-null result is returned, which is the + * result of the switch. <!-- end-user-doc --> + * + * @see org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDPackage + * @generated + */ +public class TestTMDSwitch<T> extends Switch<T> { + /** + * The cached model package <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected static TestTMDPackage modelPackage; + + /** + * Creates an instance of the switch. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public TestTMDSwitch() { + if (modelPackage == null) { + modelPackage = TestTMDPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns + * a non null result; it yields that result. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case TestTMDPackage.ROOT: { + final Root root = (Root) theEObject; + T result = caseRoot(root); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case TestTMDPackage.CHILD_LEVEL1: { + final ChildLevel1 childLevel1 = (ChildLevel1) theEObject; + T result = caseChildLevel1(childLevel1); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + case TestTMDPackage.CHILD_LEVEL2: { + final ChildLevel2 childLevel2 = (ChildLevel2) theEObject; + T result = caseChildLevel2(childLevel2); + if (result == null) { + result = defaultCase(theEObject); + } + return result; + } + default: + return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of ' <em>Root</em>'. <!-- begin-user-doc --> This + * implementation returns null; + * returning a non-null result will terminate the switch. <!-- end-user-doc + * --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' <em>Root</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRoot(Root object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' <em>Child Level1</em>'. <!-- begin-user-doc --> + * This implementation + * returns null; returning a non-null result will terminate the switch. <!-- + * end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' <em>Child Level1</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseChildLevel1(ChildLevel1 object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' <em>Child Level2</em>'. <!-- begin-user-doc --> + * This implementation + * returns null; returning a non-null result will terminate the switch. <!-- + * end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' <em>Child Level2</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseChildLevel2(ChildLevel2 object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of ' <em>EObject</em>'. <!-- begin-user-doc --> This + * implementation returns + * null; returning a non-null result will terminate the switch, but this is + * the last case anyway. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of ' <em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} // TestTMDSwitch
diff --git a/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TreeMasterDetailValidation_ITest.java b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TreeMasterDetailValidation_ITest.java new file mode 100644 index 0000000..7b8e314 --- /dev/null +++ b/tests/org.eclipse.emf.ecp.view.treemasterdetail.validation.test/src/org/eclipse/emf/ecp/view/treemasterdetail/validation/test/TreeMasterDetailValidation_ITest.java
@@ -0,0 +1,917 @@ +/******************************************************************************* + * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others. + * + * 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: + * Eugen Neufeld - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.ecp.view.treemasterdetail.validation.test; + +import static org.junit.Assert.assertEquals; + +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.ecp.view.spi.context.ViewModelContextFactory; +import org.eclipse.emf.ecp.view.spi.model.VDiagnostic; +import org.eclipse.emf.ecp.view.spi.model.VView; +import org.eclipse.emf.ecp.view.spi.model.VViewFactory; +import org.eclipse.emf.ecp.view.treemasterdetail.model.VTreeMasterDetail; +import org.eclipse.emf.ecp.view.treemasterdetail.model.VTreeMasterDetailFactory; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel1; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.ChildLevel2; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.Root; +import org.eclipse.emf.ecp.view.treemasterdetail.validation.test.TestTMD.TestTMDFactory; +import org.junit.Test; + +/** + * Validation tests for TreeMasterDetail. + * + * @author Eugen Neufeld + * + */ +public class TreeMasterDetailValidation_ITest { + + private static final String VALID_NAME = "test"; //$NON-NLS-1$ + + @Test + public void test_InvalidRoot() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + } + + @Test + public void test_ValidRoot() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.OK, diagnostic.getHighestSeverity(), 0); + assertEquals(0, diagnostic.getDiagnostics(root).size()); + } + + @Test + public void test_InvalidRootInvalidChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + root.getChildren().add(childLevel1); + + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(2, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel1, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(root, diagnostic.getDiagnostics(root).get(1).getData() + .get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + } + + @Test + public void test_ValidRootInvalidChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + root.getChildren().add(childLevel1); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel1, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + } + + @Test + public void test_InvalidRootValidChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + root.getChildren().add(childLevel1); + + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(root, diagnostic.getDiagnostics(root).get(0).getData() + .get(0)); + assertEquals(0, diagnostic.getDiagnostics(childLevel1).size()); + } + + @Test + public void test_ValidRootValidChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + root.getChildren().add(childLevel1); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.OK, diagnostic.getHighestSeverity(), 0); + assertEquals(0, diagnostic.getDiagnostics(root).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel1).size()); + } + + @Test + public void test_ValidRootInvalidChildren() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + root.getChildren().add(childLevel1); + final ChildLevel1 childLevel1_2 = TestTMDFactory.eINSTANCE.createChildLevel1(); + root.getChildren().add(childLevel1_2); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel1_2, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(0, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(1, diagnostic.getDiagnostics(childLevel1_2).size()); + } + + @Test + public void test_InvalidChildInvalidSubChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + root.getChildren().add(childLevel1); + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel1.getChildren().add(childLevel2); + + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(2, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel1, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(childLevel2, diagnostic.getDiagnostics(root).get(1) + .getData().get(0)); + assertEquals(2, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(childLevel1, diagnostic.getDiagnostics(childLevel1).get(0) + .getData().get(0)); + assertEquals(childLevel2, diagnostic.getDiagnostics(childLevel1).get(1) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel2).size()); + } + + @Test + public void test_ValidChildInvalidSubChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + root.getChildren().add(childLevel1); + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel1.getChildren().add(childLevel2); + + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel2, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(childLevel2, diagnostic.getDiagnostics(childLevel1).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel2).size()); + } + + @Test + public void test_InvalidChildValidSubChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel2.setName(VALID_NAME); + childLevel1.getChildren().add(childLevel2); + + root.getChildren().add(childLevel1); + + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel1, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel2).size()); + } + + @Test + public void test_ValidChildValidSubChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + root.getChildren().add(childLevel1); + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel2.setName(VALID_NAME); + childLevel1.getChildren().add(childLevel2); + + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.OK, diagnostic.getHighestSeverity(), 0); + assertEquals(0, diagnostic.getDiagnostics(root).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel2).size()); + } + + @Test + public void test_InvalidRootToValid() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + root.setName(VALID_NAME); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.OK, diagnostic.getHighestSeverity(), 0); + assertEquals(0, diagnostic.getDiagnostics(root).size()); + } + + @Test + public void test_ValidRootToInvalid() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + root.setName(null); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + } + + @Test + public void test_InvalidChildToValid() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + root.getChildren().add(childLevel1); + + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + childLevel1.setName(VALID_NAME); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.OK, diagnostic.getHighestSeverity(), 0); + assertEquals(0, diagnostic.getDiagnostics(root).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel1).size()); + } + + @Test + public void test_ValidChildToInvalid() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + root.getChildren().add(childLevel1); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + childLevel1.setName(null); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel1, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + } + + @Test + public void test_ValidRootAddValidChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + root.getChildren().add(childLevel1); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.OK, diagnostic.getHighestSeverity(), 0); + assertEquals(0, diagnostic.getDiagnostics(root).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel1).size()); + } + + @Test + public void test_ValidRootAddInvalidChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + root.getChildren().add(childLevel1); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel1, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + } + + @Test + public void test_InvalidRootAddValidChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + root.getChildren().add(childLevel1); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel1).size()); + } + + @Test + public void test_InvalidRootAddInvalidChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + root.getChildren().add(childLevel1); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(2, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel1, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(root, diagnostic.getDiagnostics(root).get(1).getData() + .get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + } + + @Test + public void test_ValidRootAddValidSubTree() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel2.setName(VALID_NAME); + childLevel1.getChildren().add(childLevel2); + + root.getChildren().add(childLevel1); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.OK, diagnostic.getHighestSeverity(), 0); + assertEquals(0, diagnostic.getDiagnostics(root).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel2).size()); + } + + @Test + public void test_ValidRootAddInvalidSubTree() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel2.setName(VALID_NAME); + childLevel1.getChildren().add(childLevel2); + + root.getChildren().add(childLevel1); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel1, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel2).size()); + } + + @Test + public void test_ValidRootAddInvalidSubTree2() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel1.getChildren().add(childLevel2); + + root.getChildren().add(childLevel1); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel2, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(childLevel2, diagnostic.getDiagnostics(childLevel1).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel2).size()); + } + + @Test + public void test_InvalidRootAddValidSubTree() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel2.setName(VALID_NAME); + childLevel1.getChildren().add(childLevel2); + + root.getChildren().add(childLevel1); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel2).size()); + } + + @Test + public void test_InvalidRootAddInvalidSubTree1() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel2.setName(VALID_NAME); + childLevel1.getChildren().add(childLevel2); + + root.getChildren().add(childLevel1); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(2, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel1, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(root, diagnostic.getDiagnostics(root).get(1).getData() + .get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel2).size()); + } + + @Test + public void test_InvalidRootAddInvalidSubTree2() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel1.getChildren().add(childLevel2); + + root.getChildren().add(childLevel1); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(2, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel2, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(root, diagnostic.getDiagnostics(root).get(1).getData() + .get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(childLevel2, diagnostic.getDiagnostics(childLevel1).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel2).size()); + } + + @Test + public void test_ValidRootWithChildAddInvalidSibling() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + root.getChildren().add(childLevel1); + + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel1 childLevel1_2 = TestTMDFactory.eINSTANCE.createChildLevel1(); + root.getChildren().add(childLevel1_2); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel1_2, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(0, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(1, diagnostic.getDiagnostics(childLevel1_2).size()); + } + + @Test + public void test_ValidChildAddValidSubChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + root.getChildren().add(childLevel1); + + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel2.setName(VALID_NAME); + childLevel1.getChildren().add(childLevel2); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.OK, diagnostic.getHighestSeverity(), 0); + assertEquals(0, diagnostic.getDiagnostics(root).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel2).size()); + } + + @Test + public void test_ValidChildAddInvalidSubChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + root.getChildren().add(childLevel1); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel1.getChildren().add(childLevel2); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel2, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(childLevel2, diagnostic.getDiagnostics(childLevel1).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel2).size()); + } + + @Test + public void test_InvalidChildAddValidSubChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + root.getChildren().add(childLevel1); + + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel2.setName(VALID_NAME); + root.getChildren().add(childLevel1); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel1, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(0, diagnostic.getDiagnostics(childLevel2).size()); + } + + @Test + public void test_InvalidChildAddInvalidSubChild() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + root.getChildren().add(childLevel1); + + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel1.getChildren().add(childLevel2); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(2, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel1, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(childLevel2, diagnostic.getDiagnostics(root).get(1) + .getData().get(0)); + assertEquals(2, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(childLevel1, diagnostic.getDiagnostics(childLevel1).get(0) + .getData().get(0)); + assertEquals(childLevel2, diagnostic.getDiagnostics(childLevel1).get(1) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel2).size()); + } + + @Test + public void test_ValidChildWithSubChildAddInvalidSibling() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + final ChildLevel2 childLevel2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel2.setName(VALID_NAME); + childLevel1.getChildren().add(childLevel2); + + root.getChildren().add(childLevel1); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel2 childLevel2_2 = TestTMDFactory.eINSTANCE.createChildLevel2(); + childLevel1.getChildren().add(childLevel2_2); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel2_2, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + assertEquals(childLevel2_2, diagnostic.getDiagnostics(childLevel1).get(0) + .getData().get(0)); + assertEquals(0, diagnostic.getDiagnostics(childLevel2).size()); + assertEquals(1, diagnostic.getDiagnostics(childLevel2_2).size()); + } + + @Test + public void test_ValidRootAddValidChildToInvalid() { + final VView view = VViewFactory.eINSTANCE.createView(); + final Root root = TestTMDFactory.eINSTANCE.createRoot(); + root.setName(VALID_NAME); + view.setRootEClass(root.eClass()); + + final VTreeMasterDetail control = VTreeMasterDetailFactory.eINSTANCE + .createTreeMasterDetail(); + + view.getChildren().add(control); + + ViewModelContextFactory.INSTANCE.createViewModelContext(view, root); + + final ChildLevel1 childLevel1 = TestTMDFactory.eINSTANCE.createChildLevel1(); + childLevel1.setName(VALID_NAME); + root.getChildren().add(childLevel1); + + childLevel1.setName(null); + + final VDiagnostic diagnostic = control.getDiagnostic(); + assertEquals(Diagnostic.ERROR, diagnostic.getHighestSeverity(), 0); + assertEquals(1, diagnostic.getDiagnostics(root).size()); + assertEquals(childLevel1, diagnostic.getDiagnostics(root).get(0) + .getData().get(0)); + assertEquals(1, diagnostic.getDiagnostics(childLevel1).size()); + } +}
diff --git a/tests/org.eclipse.emf.ecp.view.validation.test/AllValidationTests.launch b/tests/org.eclipse.emf.ecp.view.validation.test/AllValidationTests.launch index 042e20f..c203770 100644 --- a/tests/org.eclipse.emf.ecp.view.validation.test/AllValidationTests.launch +++ b/tests/org.eclipse.emf.ecp.view.validation.test/AllValidationTests.launch
@@ -32,8 +32,8 @@ <stringAttribute key="pde.version" value="3.3"/> <stringAttribute key="product" value="org.eclipse.emf.cdo.server.product.tcp_h2"/> <booleanAttribute key="run_in_ui_thread" value="true"/> -<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.commons.codec@default:default,org.apache.commons.logging@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.resources.win32.x86_64@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:false,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.databinding.edit@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.emf.emfstore.client.model.edit@default:default,org.eclipse.emf.emfstore.client@default:default,org.eclipse.emf.emfstore.common.model.edit@default:default,org.eclipse.emf.emfstore.common.model@default:default,org.eclipse.emf.emfstore.common@default:default,org.eclipse.emf.emfstore.examplemodel.edit@default:default,org.eclipse.emf.emfstore.examplemodel@default:default,org.eclipse.emf.emfstore.migration@default:default,org.eclipse.emf.emfstore.server.model.edit@default:default,org.eclipse.emf.emfstore.server.model@default:default,org.eclipse.emf.emfstore.server@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.equinox.util@default:default,org.eclipse.equinox.weaving.hook@default:false,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface@default:default,org.eclipse.net4j.util@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.hamcrest.core@default:default,org.hamcrest.library@default:default,org.junit@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/> -<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.ecp.common.ui@default:default,org.eclipse.emf.ecp.common@default:default,org.eclipse.emf.ecp.core@default:default,org.eclipse.emf.ecp.edit.swt@default:default,org.eclipse.emf.ecp.edit@default:default,org.eclipse.emf.ecp.editor.e3@default:default,org.eclipse.emf.ecp.emfstore.core@default:default,org.eclipse.emf.ecp.explorereditorbridge@default:default,org.eclipse.emf.ecp.ui.view.swt@default:default,org.eclipse.emf.ecp.ui.view.test@default:default,org.eclipse.emf.ecp.ui.view@default:default,org.eclipse.emf.ecp.ui@default:default,org.eclipse.emf.ecp.view.context.test@default:false,org.eclipse.emf.ecp.view.context@default:default,org.eclipse.emf.ecp.view.core.swt@default:default,org.eclipse.emf.ecp.view.custom.model@default:default,org.eclipse.emf.ecp.view.model.common@default:default,org.eclipse.emf.ecp.view.model.edit@default:default,org.eclipse.emf.ecp.view.model.provider.generator@default:default,org.eclipse.emf.ecp.view.model.provider.xmi@default:default,org.eclipse.emf.ecp.view.model@default:default,org.eclipse.emf.ecp.view.table.model.edit@default:default,org.eclipse.emf.ecp.view.table.model@default:default,org.eclipse.emf.ecp.view.table.validation@default:default,org.eclipse.emf.ecp.view.template.model@default:default,org.eclipse.emf.ecp.view.template.service@default:default,org.eclipse.emf.ecp.view.test.common.swt@default:default,org.eclipse.emf.ecp.view.test.common@default:default,org.eclipse.emf.ecp.view.util.swt@default:default,org.eclipse.emf.ecp.view.validation.test@default:false,org.eclipse.emf.ecp.view.validation@default:default,org.eclipse.emf.ecp.view.vertical.model@default:default"/> +<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.annotation@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.batik.css*1.7.0.v201011041433@default:default,org.apache.batik.util*1.7.0.v201011041433@default:default,org.apache.batik.util.gui*1.7.0.v200903091627@default:default,org.apache.commons.codec@default:default,org.apache.commons.logging@default:default,org.eclipse.ant.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.filesystem.java7@default:default,org.eclipse.core.filesystem.win32.x86_64@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.resources.win32.x86_64@default:false,org.eclipse.core.resources@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.e4.core.commands@default:default,org.eclipse.e4.core.contexts@default:default,org.eclipse.e4.core.di.extensions@default:default,org.eclipse.e4.core.di@default:default,org.eclipse.e4.core.services@default:default,org.eclipse.e4.ui.bindings@default:default,org.eclipse.e4.ui.css.core@default:default,org.eclipse.e4.ui.css.swt.theme@default:default,org.eclipse.e4.ui.css.swt@default:default,org.eclipse.e4.ui.di@default:default,org.eclipse.e4.ui.model.workbench@default:default,org.eclipse.e4.ui.services@default:default,org.eclipse.e4.ui.widgets@default:default,org.eclipse.e4.ui.workbench.addons.swt@default:default,org.eclipse.e4.ui.workbench.renderers.swt@default:default,org.eclipse.e4.ui.workbench.swt@default:default,org.eclipse.e4.ui.workbench3@default:default,org.eclipse.e4.ui.workbench@default:default,org.eclipse.emf.cdo.ecore.retrofit@default:false,org.eclipse.emf.common.ui@default:default,org.eclipse.emf.common@default:default,org.eclipse.emf.databinding.edit@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.edit@default:default,org.eclipse.emf.emfstore.client.model.edit@default:default,org.eclipse.emf.emfstore.client@default:default,org.eclipse.emf.emfstore.common.model.edit@default:default,org.eclipse.emf.emfstore.common.model@default:default,org.eclipse.emf.emfstore.common@default:default,org.eclipse.emf.emfstore.examplemodel.edit@default:default,org.eclipse.emf.emfstore.examplemodel@default:default,org.eclipse.emf.emfstore.migration@default:default,org.eclipse.emf.emfstore.server.model.edit@default:default,org.eclipse.emf.emfstore.server.model@default:default,org.eclipse.emf.emfstore.server@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.region@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.equinox.util@default:default,org.eclipse.equinox.weaving.hook@default:false,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface@default:default,org.eclipse.net4j.util@default:default,org.eclipse.osgi.compatibility.state@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.win32.win32.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.team.core@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.trace@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.hamcrest.core@default:default,org.hamcrest.library@default:default,org.junit@default:default,org.mockito.mockito-all@default:default,org.w3c.css.sac@default:default,org.w3c.dom.events@default:default,org.w3c.dom.smil@default:default,org.w3c.dom.svg@default:default"/> +<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.ecp.common.ui@default:default,org.eclipse.emf.ecp.common@default:default,org.eclipse.emf.ecp.core.test@default:default,org.eclipse.emf.ecp.core@default:default,org.eclipse.emf.ecp.edit.swt.nl_de@default:default,org.eclipse.emf.ecp.edit.swt.test@default:default,org.eclipse.emf.ecp.edit.swt@default:default,org.eclipse.emf.ecp.edit@default:default,org.eclipse.emf.ecp.editor.e3@default:default,org.eclipse.emf.ecp.emfstore.core@default:default,org.eclipse.emf.ecp.explorereditorbridge@default:default,org.eclipse.emf.ecp.ui.nl_de@default:default,org.eclipse.emf.ecp.ui.rcp@default:default,org.eclipse.emf.ecp.ui.view.swt.test@default:default,org.eclipse.emf.ecp.ui.view.swt@default:default,org.eclipse.emf.ecp.ui.view.test@default:default,org.eclipse.emf.ecp.ui.view@default:default,org.eclipse.emf.ecp.ui@default:default,org.eclipse.emf.ecp.view.context.test@default:false,org.eclipse.emf.ecp.view.context@default:default,org.eclipse.emf.ecp.view.core.swt.nl_de@default:default,org.eclipse.emf.ecp.view.core.swt.tests@default:default,org.eclipse.emf.ecp.view.core.swt@default:default,org.eclipse.emf.ecp.view.custom.model@default:default,org.eclipse.emf.ecp.view.label.model@default:default,org.eclipse.emf.ecp.view.model.common.test@default:default,org.eclipse.emf.ecp.view.model.common@default:default,org.eclipse.emf.ecp.view.model.edit.test@default:default,org.eclipse.emf.ecp.view.model.edit@default:default,org.eclipse.emf.ecp.view.model.provider.generator@default:default,org.eclipse.emf.ecp.view.model.provider.xmi.test@default:default,org.eclipse.emf.ecp.view.model.provider.xmi@default:default,org.eclipse.emf.ecp.view.model.test@default:default,org.eclipse.emf.ecp.view.model@default:default,org.eclipse.emf.ecp.view.table.model.edit@default:default,org.eclipse.emf.ecp.view.table.model@default:default,org.eclipse.emf.ecp.view.table.validation@default:default,org.eclipse.emf.ecp.view.template.model@default:default,org.eclipse.emf.ecp.view.template.service.test@default:default,org.eclipse.emf.ecp.view.template.service@default:default,org.eclipse.emf.ecp.view.test.common.swt@default:default,org.eclipse.emf.ecp.view.test.common@default:default,org.eclipse.emf.ecp.view.util.swt@default:default,org.eclipse.emf.ecp.view.validation.test@default:false,org.eclipse.emf.ecp.view.validation@default:default,org.eclipse.emf.ecp.view.vertical.model@default:default"/> <booleanAttribute key="show_selected_only" value="false"/> <booleanAttribute key="tracing" value="false"/> <booleanAttribute key="useCustomFeatures" value="false"/>
diff --git a/tests/org.eclipse.emf.ecp.view.validation.test/src/org/eclipse/emf/ecp/view/validation/test/TableValidationTest.java b/tests/org.eclipse.emf.ecp.view.validation.test/src/org/eclipse/emf/ecp/view/validation/test/TableValidationTest.java index af71db8..e0d8ddc 100644 --- a/tests/org.eclipse.emf.ecp.view.validation.test/src/org/eclipse/emf/ecp/view/validation/test/TableValidationTest.java +++ b/tests/org.eclipse.emf.ecp.view.validation.test/src/org/eclipse/emf/ecp/view/validation/test/TableValidationTest.java
@@ -37,7 +37,6 @@ import org.eclipse.emf.ecp.view.validation.test.model.TestFactory; import org.eclipse.emf.ecp.view.validation.test.model.TestPackage; import org.eclipse.emf.ecp.view.validation.test.model.Writer; -import org.junit.Ignore; import org.junit.Test; /** @@ -611,7 +610,6 @@ } @Test - @Ignore public void testTableWithDetailValidationOnDetail() { final VView view = VViewFactory.eINSTANCE.createView(); view.setRootEClass(TestPackage.eINSTANCE.getTableWithoutMultiplicityConcrete());