diff options
| author | pguilet | 2017-03-15 17:15:54 +0000 |
|---|---|---|
| committer | Pierre-Charles David | 2017-03-16 14:49:13 +0000 |
| commit | 804492cd0170136f4c3b2793852cb809d4b19cee (patch) | |
| tree | fc1e58b9f7b20d02dba0ed9a41da650cc9000971 | |
| parent | 1458b8a4ff92aa6cf832b1cf74999dc4a57cc095 (diff) | |
| download | org.eclipse.sirius-804492cd0170136f4c3b2793852cb809d4b19cee.tar.gz org.eclipse.sirius-804492cd0170136f4c3b2793852cb809d4b19cee.tar.xz org.eclipse.sirius-804492cd0170136f4c3b2793852cb809d4b19cee.zip | |
[508137] Cleanup SiriusFormatDataManagerWithMapping interface
The interface SiriusFormatDataManagerWithMapping introduced to avoid API
break is now removed.
Bug: 508137
Change-Id: I352b58bcd58de380c5bd44cf1842d6b693db2d8a
Signed-off-by: pguilet <pierre.guilet@obeo.fr>
8 files changed, 162 insertions, 223 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/format/AbstractSiriusFormatDataManager.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/format/AbstractSiriusFormatDataManager.java index e540f3e3e7..fb3663f9a6 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/format/AbstractSiriusFormatDataManager.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/format/AbstractSiriusFormatDataManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2016 THALES GLOBAL SERVICES and others. + * Copyright (c) 2009, 2017 THALES GLOBAL SERVICES 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 @@ -93,12 +93,10 @@ import com.google.common.collect.Sets; /** * An abstract implementation for {@link SiriusFormatDataManager}. <BR> - * Provide a method to store a format from a graphicalEditPart and iterates on - * it's children and apply a format. + * Provide a method to store a format from a graphicalEditPart and iterates on it's children and apply a format. * - * Regarding the store/apply format functionality, the subclass of this should - * implements {@link SiriusFormatDataManagerWithMapping} that handles more cases - * thanks to mapping information. + * Regarding the store/apply format functionality, the subclass of this should implements + * {@link SiriusFormatDataManagerWithMapping} that handles more cases thanks to mapping information. * * @author <a href="mailto:laurent.redor@obeo.fr">Laurent Redor</a> * @@ -166,8 +164,7 @@ public abstract class AbstractSiriusFormatDataManager implements SiriusFormatDat * Apply the format to the <code>rootEditPart</code>. * * @param rootEditPart - * The root edit from which we would try to apply the current - * stored format + * The root edit from which we would try to apply the current stored format * @param applyFormat * true if the format must be applied, false otherwise * @param applyStyle @@ -241,11 +238,7 @@ public abstract class AbstractSiriusFormatDataManager implements SiriusFormatDat */ private void applyFormat(final DEdge edge, final Edge gmfEdge, final EditPartViewer editPartViewer, boolean applyFormat, boolean applyStyle) { final EdgeFormatData formatData; - if (this instanceof SiriusFormatDataManagerWithMapping) { - formatData = (EdgeFormatData) ((SiriusFormatDataManagerWithMapping) this).getFormatData(createKey(edge), edge.getMapping()); - } else { - formatData = (EdgeFormatData) getFormatData(createKey(edge)); - } + formatData = (EdgeFormatData) this.getFormatData(createKey(edge), edge.getMapping()); if (formatData != null) { if (applyFormat) { @@ -352,8 +345,8 @@ public abstract class AbstractSiriusFormatDataManager implements SiriusFormatDat } /** - * Search a format corresponding to the semantic decorator and applies it to - * the node. Then it applies to it's children and outgoing edges. + * Search a format corresponding to the semantic decorator and applies it to the node. Then it applies to it's + * children and outgoing edges. * * @param semanticDecorator * The semantic decorator to search the corresponding format @@ -367,11 +360,7 @@ public abstract class AbstractSiriusFormatDataManager implements SiriusFormatDat boolean applyStyle) { FormatDataKey key = createKey(semanticDecorator); NodeFormatData formatData; - if (this instanceof SiriusFormatDataManagerWithMapping) { - formatData = (NodeFormatData) ((SiriusFormatDataManagerWithMapping) this).getFormatData(key, semanticDecorator.getMapping()); - } else { - formatData = (NodeFormatData) getFormatData(key); - } + formatData = (NodeFormatData) this.getFormatData(key, semanticDecorator.getMapping()); // If a direct child have the same format data and key than its parents, // look in the parent format data 's children for a child format data // with the expected id. @@ -466,8 +455,7 @@ public abstract class AbstractSiriusFormatDataManager implements SiriusFormatDat } /** - * Apply the Sirius style contained in <code>formatData</code> on the - * <code>semanticDecorator</code>. + * Apply the Sirius style contained in <code>formatData</code> on the <code>semanticDecorator</code>. * * @param semanticDecorator * The {@link DSemanticDecorator} on which to apply the style. @@ -496,15 +484,13 @@ public abstract class AbstractSiriusFormatDataManager implements SiriusFormatDat } /** - * Copies the appearance of the old view to the new view. Typically this - * means copying the visibility and the styles of the root and it's - * children. + * Copies the appearance of the old view to the new view. Typically this means copying the visibility and the styles + * of the root and it's children. * * @param newView * The new view to copy style features to * @param formatData - * The format data containing the old view to copy style features - * from + * The format data containing the old view to copy style features from */ @SuppressWarnings("unchecked") protected void applyGMFStyle(View newView, AbstractFormatData formatData) { @@ -599,11 +585,7 @@ public abstract class AbstractSiriusFormatDataManager implements SiriusFormatDat if (gmfNode != null) { FormatDataKey key = createKey(child); NodeFormatData formatData; - if (this instanceof SiriusFormatDataManagerWithMapping) { - formatData = (NodeFormatData) ((SiriusFormatDataManagerWithMapping) this).getFormatData(key, child.getMapping()); - } else { - formatData = (NodeFormatData) getFormatData(key); - } + formatData = (NodeFormatData) this.getFormatData(key, child.getMapping()); // If a direct child have the same format data and key than its // parents, look in the parent format data 's children for a @@ -788,8 +770,7 @@ public abstract class AbstractSiriusFormatDataManager implements SiriusFormatDat * @param gmfView * GMF view * @param discoveredKeys - * The {@link FormatDataKey} discovered during the current store - * action. + * The {@link FormatDataKey} discovered during the current store action. */ protected void addNodeChildren(final DNode parentNode, final NodeFormatData parentFormatData, final IGraphicalEditPart parentEditPart, final View gmfView, Collection<FormatDataKey> discoveredKeys) { @@ -810,8 +791,7 @@ public abstract class AbstractSiriusFormatDataManager implements SiriusFormatDat * @param parentSavedEditPart * The previous saved editPart (corresponds to parentFormatData) * @param discoveredKeys - * The {@link FormatDataKey} discovered during the current store - * action. + * The {@link FormatDataKey} discovered during the current store action. */ protected void checkDataAndAddChildFormat(final NodeFormatData parentFormatData, final AbstractDNode child, final IGraphicalEditPart parentSavedEditPart, Collection<FormatDataKey> discoveredKeys) { @@ -835,8 +815,7 @@ public abstract class AbstractSiriusFormatDataManager implements SiriusFormatDat * @param parentEditPart * The editPart corresponding to the parent FormatData * @param discoveredKeys - * The {@link FormatDataKey} discovered during the current store - * action. + * The {@link FormatDataKey} discovered during the current store action. */ protected void addNodeContainerChildren(final DNodeContainer container, final NodeFormatData parentFormatData, final IGraphicalEditPart parentEditPart, Collection<FormatDataKey> discoveredKeys) { for (final DDiagramElement child : container.getOwnedDiagramElements()) { @@ -859,8 +838,7 @@ public abstract class AbstractSiriusFormatDataManager implements SiriusFormatDat * @param parentEditPart * The editPart corresponding to the parent FormatData * @param discoveredKeys - * The {@link FormatDataKey} discovered during the current store - * action. + * The {@link FormatDataKey} discovered during the current store action. */ protected void addNodeListChildren(final DNodeList nodeList, final NodeFormatData parentFormatData, final IGraphicalEditPart parentEditPart, Collection<FormatDataKey> discoveredKeys) { for (final DNode child : nodeList.getOwnedBorderedNodes()) { @@ -916,21 +894,13 @@ public abstract class AbstractSiriusFormatDataManager implements SiriusFormatDat // inspected node, the previously computed data might be replaced. It // could so replaced one of the initially selected parts. if (!discoveredKeys.contains(childKey)) { - if (this instanceof SiriusFormatDataManagerWithMapping) { - ((SiriusFormatDataManagerWithMapping) this).addFormatData(childKey, child.getMapping(), childFormatData); - } else { - addFormatData(childKey, childFormatData); - } + this.addFormatData(childKey, child.getMapping(), childFormatData); discoveredKeys.add(childKey); } else if (parentFormatData == null) { // In this case, the same key is used for a root format data and for // an other view (child or border of an other view), the root data // should be stored. - if (this instanceof SiriusFormatDataManagerWithMapping) { - ((SiriusFormatDataManagerWithMapping) this).addFormatData(childKey, child.getMapping(), childFormatData); - } else { - addFormatData(childKey, childFormatData); - } + this.addFormatData(childKey, child.getMapping(), childFormatData); } if (child instanceof DNode) { @@ -986,20 +956,15 @@ public abstract class AbstractSiriusFormatDataManager implements SiriusFormatDat edgeFormatData.setId(edgeKey.getId()); // Add the edge format data. - if (this instanceof SiriusFormatDataManagerWithMapping) { - ((SiriusFormatDataManagerWithMapping) this).addFormatData(edgeKey, edge.getMapping(), edgeFormatData); - } else { - addFormatData(edgeKey, edgeFormatData); - } + this.addFormatData(edgeKey, edge.getMapping(), edgeFormatData); // Add the label format data (if exists). addLabelFormatData(edgeFormatData, gmfEdge); } } /** - * Add the format data of the label of the edge. This format data sets the - * <code>edgeLabelFormatData</code> of the {@link EdgeFormatData}. It's not - * added to the format data with a key in the manager. + * Add the format data of the label of the edge. This format data sets the <code>edgeLabelFormatData</code> of the + * {@link EdgeFormatData}. It's not added to the format data with a key in the manager. * * @param parentFormatData * The edge format data @@ -1020,9 +985,8 @@ public abstract class AbstractSiriusFormatDataManager implements SiriusFormatDat } /** - * Check for each attribute of newStyle if it is the same in oldStyle. On - * the other hand, this attribute is added to the custom features of the - * newStyle. + * Check for each attribute of newStyle if it is the same in oldStyle. On the other hand, this attribute is added to + * the custom features of the newStyle. * * @param oldStyle * The old style to compare with diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/format/SiriusFormatDataManager.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/format/SiriusFormatDataManager.java index 53ce4653f9..6862b5584c 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/format/SiriusFormatDataManager.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/format/SiriusFormatDataManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2016 THALES GLOBAL SERVICES. + * Copyright (c) 2009, 2017 THALES GLOBAL SERVICES. * 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 @@ -13,10 +13,11 @@ package org.eclipse.sirius.diagram.ui.tools.api.format; import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; import org.eclipse.sirius.diagram.formatdata.AbstractFormatData; import org.eclipse.sirius.viewpoint.DSemanticDecorator; +import org.eclipse.sirius.viewpoint.description.RepresentationElementMapping; /** - * An interface for all the SiriusFormatDataManager for mapping key ( - * {@link FormatDataKey}) and formatData ({@link AbstractFormatData}). + * An interface for all the SiriusFormatDataManager for mapping key ( {@link FormatDataKey}) and formatData ( + * {@link AbstractFormatData}). * * @author <a href="mailto:laurent.redor@obeo.fr">Laurent Redor</a> * @@ -24,40 +25,36 @@ import org.eclipse.sirius.viewpoint.DSemanticDecorator; public interface SiriusFormatDataManager { /** - * Get the format data corresponding to the key. + * Get the format data with the best corresponding to the key. * * @param key * The key + * @param mapping + * the mapping used to discriminate returned {@link AbstractFormatData} when the key is attached to more + * than one format. * @return the format data corresponding to the key or null if not found. - * @deprecated Replaced by - * {@link SiriusFormatDataManagerWithMapping#getFormatData(FormatDataKey, org.eclipse.sirius.viewpoint.description.RepresentationElementMapping)} - * handling more copy/paste cases by using mapping information. */ - @Deprecated - AbstractFormatData getFormatData(FormatDataKey key); + AbstractFormatData getFormatData(FormatDataKey key, RepresentationElementMapping mapping); /** - * Add a format data according to the key. + * Add a format data according to the key and the mapping information. * * @param key * The key + * @param mapping + * the mapping used to discriminate returned {@link AbstractFormatData} when the key is attached to more + * than one format. * @param formatData - * The format data - * @deprecated Replaced by - * {@link SiriusFormatDataManagerWithMapping#addFormatData(FormatDataKey, org.eclipse.sirius.viewpoint.description.RepresentationElementMapping, AbstractFormatData)} - * handling more copy/paste cases by using mapping information. + * The format data associated to the key and mapping. */ - @Deprecated - void addFormatData(FormatDataKey key, AbstractFormatData formatData); + void addFormatData(FormatDataKey key, RepresentationElementMapping mapping, AbstractFormatData formatData); /** - * Create a key corresponding to the semanticDecorator and available for - * this manager. + * Create a key corresponding to the semanticDecorator and available for this manager. * * @param semanticDecorator * the semantic decorator - * @return a new key corresponding to the semanticDecorator and available - * for this manager. + * @return a new key corresponding to the semanticDecorator and available for this manager. */ FormatDataKey createKey(DSemanticDecorator semanticDecorator); @@ -73,8 +70,7 @@ public interface SiriusFormatDataManager { * Apply the current format data to the rootEditPart. * * @param rootEditPart - * the root edit from which we would try to apply the current - * stored format + * the root edit from which we would try to apply the current stored format */ void applyFormat(IGraphicalEditPart rootEditPart); @@ -82,8 +78,7 @@ public interface SiriusFormatDataManager { * Apply the current layout data to the rootEditPart. * * @param rootEditPart - * the root edit from which we would try to apply the current - * stored format + * the root edit from which we would try to apply the current stored format */ void applyLayout(IGraphicalEditPart rootEditPart); @@ -91,8 +86,7 @@ public interface SiriusFormatDataManager { * Apply the current style data to the rootEditPart. * * @param rootEditPart - * the root edit from which we would try to apply the current - * stored style + * the root edit from which we would try to apply the current stored style */ void applyStyle(IGraphicalEditPart rootEditPart); diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/format/SiriusFormatDataManagerWithMapping.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/format/SiriusFormatDataManagerWithMapping.java deleted file mode 100644 index 6ac6a126a2..0000000000 --- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/api/format/SiriusFormatDataManagerWithMapping.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2016 THALES GLOBAL SERVICES. - * 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: - * Obeo - initial API and implementation - *******************************************************************************/ -package org.eclipse.sirius.diagram.ui.tools.api.format; - -import org.eclipse.sirius.diagram.formatdata.AbstractFormatData; -import org.eclipse.sirius.viewpoint.description.RepresentationElementMapping; - -/** - * An interface extending {@link SiriusFormatDataManager} to add the capacity to - * get formats during format pasting by taking in consideration the key and the - * mapping when more than one formats are associated to the key. - * - * @author <a href="mailto:pierre.guilet@obeo.fr">Pierre Guilet</a> - * - */ -public interface SiriusFormatDataManagerWithMapping extends SiriusFormatDataManager { - - /** - * Get the format data with the best corresponding to the key. - * - * @param key - * The key - * @param mapping - * the mapping used to discriminate returned - * {@link AbstractFormatData} when the key is attached to more - * than one format. - * @return the format data corresponding to the key or null if not found. - */ - AbstractFormatData getFormatData(FormatDataKey key, RepresentationElementMapping mapping); - - /** - * Add a format data according to the key and the mapping information. - * - * @param key - * The key - * @param mapping - * the mapping used to discriminate returned - * {@link AbstractFormatData} when the key is attached to more - * than one format. - * @param formatData - * The format data associated to the key and mapping. - */ - void addFormatData(FormatDataKey key, RepresentationElementMapping mapping, AbstractFormatData formatData); - -} diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/format/AdvancedSiriusFormatDataManager.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/format/AdvancedSiriusFormatDataManager.java index a3065b2aa3..ff5c04b997 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/format/AdvancedSiriusFormatDataManager.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/format/AdvancedSiriusFormatDataManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2016 THALES GLOBAL SERVICES. + * Copyright (c) 2009, 2017 THALES GLOBAL SERVICES. * 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 @@ -14,21 +14,18 @@ import java.util.Map; import org.eclipse.sirius.diagram.formatdata.EdgeFormatData; import org.eclipse.sirius.diagram.formatdata.NodeFormatData; -import org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManagerWithMapping; +import org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager; import org.eclipse.sirius.diagram.ui.tools.internal.format.semantic.SemanticEdgeFormatDataKey; /** - * Interface to manage - * {@link org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager} - * . + * Interface to manage {@link org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager} . * * @author dlecan */ -public interface AdvancedSiriusFormatDataManager extends SiriusFormatDataManagerWithMapping { +public interface AdvancedSiriusFormatDataManager extends SiriusFormatDataManager { /** - * Get only root node format data, that is to say only the format data - * without parent. + * Get only root node format data, that is to say only the format data without parent. * * @return Map. */ diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/format/semantic/SiriusFormatDataManagerForSemanticElements.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/format/semantic/SiriusFormatDataManagerForSemanticElements.java index ab6e9aac76..34904eea6c 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/format/semantic/SiriusFormatDataManagerForSemanticElements.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/format/semantic/SiriusFormatDataManagerForSemanticElements.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2016 THALES GLOBAL SERVICES. + * Copyright (c) 2009, 2017 THALES GLOBAL SERVICES. * 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 @@ -35,8 +35,7 @@ import com.google.common.base.Predicate; import com.google.common.collect.Maps; /** - * SiriusFormatDataManager drives by the semantic elements (EObject). Use for - * format duplication. + * SiriusFormatDataManager drives by the semantic elements (EObject). Use for format duplication. * * @author <a href="mailto:laurent.redor@obeo.fr">Laurent Redor</a> * @@ -44,17 +43,14 @@ import com.google.common.collect.Maps; public class SiriusFormatDataManagerForSemanticElements extends AbstractSiriusFormatDataManager implements AdvancedSiriusFormatDataManager { /** - * Error message used when this manager is added an - * {@link AbstractFormatData} which specific type is not supported. + * Error message used when this manager is added an {@link AbstractFormatData} which specific type is not supported. */ private static final String ERROR_MESSAGE_UNSUPPORTED_FORMAT_DATA_TYPE = "The default format data manager SiriusFormatDataManagerForSemanticElements does not support AbstractDataFormat of the type :"; //$NON-NLS-1$ /** - * Error message used when this format data manager is called by the - * obsolete method + * Error message used when this format data manager is called by the obsolete method * org.eclipse.sirius.diagram.ui.tools.internal.format.semantic. - * SiriusFormatDataManagerForSemanticElements.addFormatData(FormatDataKey, - * AbstractFormatData) or + * SiriusFormatDataManagerForSemanticElements.addFormatData(FormatDataKey, AbstractFormatData) or * org.eclipse.sirius.diagram.ui.tools.internal.format.semantic. * SiriusFormatDataManagerForSemanticElements.getFormatData(FormatDataKey). */ @@ -74,14 +70,14 @@ public class SiriusFormatDataManagerForSemanticElements extends AbstractSiriusFo }; /** - * The map containing node formats associated to its mapping id and indexed - * by the key as {@link SemanticNodeFormatDataKey}. + * The map containing node formats associated to its mapping id and indexed by the key as + * {@link SemanticNodeFormatDataKey}. */ private final Map<SemanticNodeFormatDataKey, Map<String, NodeFormatData>> nodeFormatDataMap = new HashMap<SemanticNodeFormatDataKey, Map<String, NodeFormatData>>(); /** - * The map containing edge formats associated to its mapping id and indexed - * by the key as {@link SemanticEdgeFormatDataKey}. + * The map containing edge formats associated to its mapping id and indexed by the key as + * {@link SemanticEdgeFormatDataKey}. */ private final Map<SemanticEdgeFormatDataKey, Map<String, EdgeFormatData>> edgeFormatDataMap = new HashMap<SemanticEdgeFormatDataKey, Map<String, EdgeFormatData>>(); @@ -92,18 +88,6 @@ public class SiriusFormatDataManagerForSemanticElements extends AbstractSiriusFo // Nothing. } - /** - * {@inheritDoc} - * - * @see org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager#addFormatData(org.eclipse.sirius.diagram.ui.tools.api.format.FormatDataKey, - * org.eclipse.sirius.diagram.formatdata.AbstractFormatData) - */ - @Override - public void addFormatData(final FormatDataKey key, final AbstractFormatData formatData) { - clearFormatData(); - throw new UnsupportedOperationException(ERROR_MESSAGE_UNSUPPORTED_METHOD_CALL); - } - @Override public void addFormatData(FormatDataKey key, RepresentationElementMapping mapping, AbstractFormatData formatData) { if (!checkKeyType(key)) { @@ -142,17 +126,6 @@ public class SiriusFormatDataManagerForSemanticElements extends AbstractSiriusFo } - /** - * {@inheritDoc} - * - * @see org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager#getFormatData(org.eclipse.sirius.diagram.ui.tools.api.format.FormatDataKey) - */ - @Override - public AbstractFormatData getFormatData(final FormatDataKey key) { - clearFormatData(); - throw new UnsupportedOperationException(ERROR_MESSAGE_UNSUPPORTED_METHOD_CALL); - } - @Override public AbstractFormatData getFormatData(FormatDataKey key, RepresentationElementMapping mapping) { AbstractFormatData result = null; diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html index 57b8209ed7..858cb50cd3 100644 --- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html +++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html @@ -13,7 +13,7 @@ <a href="#ReleaseNotesforSirius">Release Notes for Sirius</a> <ol style="list-style: disc;"> <li> - <a href="#sirius5.0.0M6">Changes in Sirius 5.0.0M6</a> + <a href="#sirius5.0.0M7">Changes in Sirius 5.0.0M7</a> <ol style="list-style: disc;"> <li> <a href="#UserVisibleChanges">User-Visible Changes</a> @@ -27,18 +27,21 @@ </ol> </li> <li> - <a href="#sirius4.1.2">Changes in Sirius 4.1.2</a> + <a href="#sirius5.0.0M6">Changes in Sirius 5.0.0M6</a> <ol style="list-style: disc;"> <li> <a href="#UserVisibleChanges2">User-Visible Changes</a> </li> <li> + <a href="#SpecifierVisibleChanges2">Specifier-Visible Changes</a> + </li> + <li> <a href="#DeveloperVisibleChanges2">Developer-Visible Changes</a> </li> </ol> </li> <li> - <a href="#sirius4.1.1">Changes in Sirius 4.1.1</a> + <a href="#sirius4.1.2">Changes in Sirius 4.1.2</a> <ol style="list-style: disc;"> <li> <a href="#UserVisibleChanges3">User-Visible Changes</a> @@ -49,21 +52,18 @@ </ol> </li> <li> - <a href="#sirius4.1.0">Changes in Sirius 4.1.0</a> + <a href="#sirius4.1.1">Changes in Sirius 4.1.1</a> <ol style="list-style: disc;"> <li> <a href="#UserVisibleChanges4">User-Visible Changes</a> </li> <li> - <a href="#SpecifierVisibleChanges2">Specifier-Visible Changes</a> - </li> - <li> <a href="#DeveloperVisibleChanges4">Developer-Visible Changes</a> </li> </ol> </li> <li> - <a href="#sirius4.0.0">Changes in Sirius 4.0.0</a> + <a href="#sirius4.1.0">Changes in Sirius 4.1.0</a> <ol style="list-style: disc;"> <li> <a href="#UserVisibleChanges5">User-Visible Changes</a> @@ -77,7 +77,7 @@ </ol> </li> <li> - <a href="#sirius3.1.0">Changes in Sirius 3.1.0</a> + <a href="#sirius4.0.0">Changes in Sirius 4.0.0</a> <ol style="list-style: disc;"> <li> <a href="#UserVisibleChanges6">User-Visible Changes</a> @@ -90,14 +90,52 @@ </li> </ol> </li> + <li> + <a href="#sirius3.1.0">Changes in Sirius 3.1.0</a> + <ol style="list-style: disc;"> + <li> + <a href="#UserVisibleChanges7">User-Visible Changes</a> + </li> + <li> + <a href="#SpecifierVisibleChanges5">Specifier-Visible Changes</a> + </li> + <li> + <a href="#DeveloperVisibleChanges7">Developer-Visible Changes</a> + </li> + </ol> + </li> </ol> </li> </ol> <p>This document contains the release notes for recent major releases of Sirius. See also <a href="Release_Notes_Previous.html">the release notes from previous versions</a> for details about older releases. </p> - <h2 id="sirius5.0.0M6">Changes in Sirius 5.0.0M6</h2> + <h2 id="sirius5.0.0M7">Changes in Sirius 5.0.0M7</h2> <h3 id="UserVisibleChanges">User-Visible Changes</h3> + <h3 id="SpecifierVisibleChanges">Specifier-Visible Changes</h3> + <h3 id="DeveloperVisibleChanges">Developer-Visible Changes</h3> + <h4 id="Changesinorg.eclipse.sirius.diagram.ui">Changes in + <code>org.eclipse.sirius.diagram.ui</code> + </h4> + <ul> + <li><span class="label label-info">Moved</span> The methods of interface + <code>org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManagerWithMapping</code> that are + <code>getFormatData(FormatDataKey, RepresentationElementMapping)</code> and + <code>addFormatData(FormatDataKey, RepresentationElementMapping, AbstractFormatData)</code> have been moved into the interface + <code>org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager</code> to reduce interface numbers for less complexity. + </li> + <li><span class="label label-danger">Removed</span> The methods + <code>getFormatData(FormatDataKey key)</code> and + <code>addFormatData(FormatDataKey key, AbstractFormatData formatData)</code> have been removed from interface + <code>org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager</code> because they were deprecated. + </li> + <li><span class="label label-danger">Removed</span> The interface + <code>org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManagerWithMapping</code> has been removed because all its methods have been moved into interface + <code>org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager</code> + </li> + </ul> + <h2 id="sirius5.0.0M6">Changes in Sirius 5.0.0M6</h2> + <h3 id="UserVisibleChanges2">User-Visible Changes</h3> <ul> <li><span class="label label-success">Added</span> An new <em>session editor</em> is available on @@ -110,7 +148,7 @@ <i>In case of multi-selection, the overlap check is done in the current context of existing border nodes and not in the context of location of border nodes after each straighten edges.</i>). </li> </ul> - <h3 id="SpecifierVisibleChanges">Specifier-Visible Changes</h3> + <h3 id="SpecifierVisibleChanges2">Specifier-Visible Changes</h3> <ul> <li><span class="label label-success">Added</span> It is now possible to create one or multiple pre-configured widget(s) in a group if its domain class and if the meta-models of the properties view containing it have been specified.</li> <li><span class="label label-success">Added</span> Property Views definitions now support extending and overriding Properties View Descriptions without modifying the original. See @@ -123,7 +161,7 @@ <code>package.Class</code> is still supported for compatibility. </li> </ul> - <h3 id="DeveloperVisibleChanges">Developer-Visible Changes</h3> + <h3 id="DeveloperVisibleChanges2">Developer-Visible Changes</h3> <h4 id="Changesinorg.eclipse.sirius">Changes in <code>org.eclipse.sirius</code> </h4> @@ -234,7 +272,7 @@ <code>NodeStyleIdentifier</code>) have been removed. </li> </ul> - <h4 id="Changesinorg.eclipse.sirius.diagram.ui">Changes in + <h4 id="Changesinorg.eclipse.sirius.diagram.ui2">Changes in <code>org.eclipse.sirius.diagram.ui</code> </h4> <ul> @@ -246,6 +284,21 @@ <code>DiagramEditPartService.getExportResolutionFactor(DiagramEditPart, SiriusDiagramImageGenerator)</code> and return <code>1.0</code> to get back to the previous behavior. </li> + <li><span class="label label-info">Moved</span> The methods of interface + <code>org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManagerWithMapping</code> that are + <code>getFormatData(FormatDataKey, RepresentationElementMapping)</code> and + <code>addFormatData(FormatDataKey, RepresentationElementMapping, AbstractFormatData)</code> have been moved into the interface + <code>org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager</code> to reduce interface numbers for less complexity. + </li> + <li><span class="label label-danger">Removed</span> The methods + <code>getFormatData(FormatDataKey key)</code> and + <code>addFormatData(FormatDataKey key, AbstractFormatData formatData)</code> have been removed from interface + <code>org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager</code> because they were deprecated. + </li> + <li><span class="label label-danger">Removed</span> The interface + <code>org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManagerWithMapping</code> has been removed because all its methods have been moved into interface + <code>org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager</code> + </li> </ul> <h4 id="Changesinorg.eclipse.sirius.tree.ui">Changes in <code>org.eclipse.sirius.tree.ui</code> @@ -345,7 +398,7 @@ SWTBotUtils.waitAllUiEvents(); </pre> <h2 id="sirius4.1.2">Changes in Sirius 4.1.2</h2> - <h3 id="UserVisibleChanges2">User-Visible Changes</h3> + <h3 id="UserVisibleChanges3">User-Visible Changes</h3> <ul> <li><span class="label label-success">Added</span> </li> </ul> @@ -354,7 +407,7 @@ SWTBotUtils.waitAllUiEvents(); <br/> <img border="0" src="./images/PreferencePageMaxTabName.png"/> </p> - <h3 id="DeveloperVisibleChanges2">Developer-Visible Changes</h3> + <h3 id="DeveloperVisibleChanges3">Developer-Visible Changes</h3> <ul> <li><span class="label label-success">Added</span> <code>org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManagerWithMapping</code> class has been added to handle copy/paste format with mapping information when an element target of a format pasting has many source diagram format corresponding to its key. In this case, we use the mapping information to get the more precise data format. And if no result matched, then we return the first found by using the key. @@ -385,18 +438,18 @@ SWTBotUtils.waitAllUiEvents(); <code>org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManagerWithMapping.addFormatData(FormatDataKey, RepresentationElementMapping, AbstractFormatData)</code> to better handle copy/paste format cases. </p> <h2 id="sirius4.1.1">Changes in Sirius 4.1.1</h2> - <h3 id="UserVisibleChanges3">User-Visible Changes</h3> + <h3 id="UserVisibleChanges4">User-Visible Changes</h3> <ul> <li><span class="label label-info">Modified</span>The “straighten to” actions were previously disabled when an edge is connected to border nodes that have several edges. It is now allowed.</li> </ul> - <h3 id="DeveloperVisibleChanges3">Developer-Visible Changes</h3> + <h3 id="DeveloperVisibleChanges4">Developer-Visible Changes</h3> <ul> <li><span class="label label-success">Added</span> <code>org.eclipse.sirius.table.business.api.helper.TableHelper.getEStructuralFeature(DLine, DColumn)</code> method has been added to retrieve the EStructuralFeature associated to a table column. </li> </ul> <h2 id="sirius4.1.0">Changes in Sirius 4.1.0</h2> - <h3 id="UserVisibleChanges4">User-Visible Changes</h3> + <h3 id="UserVisibleChanges5">User-Visible Changes</h3> <ul> <li><span class="label label-success">Added</span> Copy/Paste Layout has been completed with Copy/Paste Style and Copy/Paste Format. <em>Paste Format</em> is equivalent to paste @@ -460,7 +513,7 @@ SWTBotUtils.waitAllUiEvents(); <em>Ctrl+HOME</em>. </li> </ul> - <h3 id="SpecifierVisibleChanges2">Specifier-Visible Changes</h3> + <h3 id="SpecifierVisibleChanges3">Specifier-Visible Changes</h3> <ul> <li><span class="label label-success">Added</span> It is now possible to inline a copy of the default Properties Views model inside the VSM. This is a copy of the model Sirius would use if no <em>Properties View Description</em> was specified. It can be used as a starting point for manual customization, or as a complement for elements for which you do not provide any custom rules. @@ -512,7 +565,7 @@ SWTBotUtils.waitAllUiEvents(); <code>org.eclipse.sirius.diagram.ui.formatDataManager</code>. The deprecated extension point will be removed in the next 5.0 Sirius major release. Several classes associated with this deprecated extension point are also deprecated (see Developer-Visible Changes for details). </li> </ul> - <h3 id="DeveloperVisibleChanges4">Developer-Visible Changes</h3> + <h3 id="DeveloperVisibleChanges5">Developer-Visible Changes</h3> <ul> <li><span class="label label-success">Added</span> As the first step to save the DRepresentation in its own resource, <code>org.eclipse.sirius.viewpoint.DView.getOwnedRepresentationDescriptors()</code> has been added as a wrapper of the @@ -712,7 +765,7 @@ SWTBotUtils.waitAllUiEvents(); <code>allowsCopyPasteLayout(DSemanticDecorator)</code> will be removed in the new major version. </li> </ul> - <h4 id="Changesinorg.eclipse.sirius.diagram.ui2">Changes in + <h4 id="Changesinorg.eclipse.sirius.diagram.ui3">Changes in <code>org.eclipse.sirius.diagram.ui</code> </h4> <ul> @@ -914,7 +967,7 @@ SWTBotUtils.waitAllUiEvents(); </li> </ul> <h2 id="sirius4.0.0">Changes in Sirius 4.0.0</h2> - <h3 id="UserVisibleChanges5">User-Visible Changes</h3> + <h3 id="UserVisibleChanges6">User-Visible Changes</h3> <ul> <li><span class="label label-success">Added</span> The user can now filter elements according to a Typed variable (String, Integer, EEnum or any EDataType). If a user applies a filter containing Typed Variables, a dialog is displayed to allow user entering the Typed Variable values. That values can be used as variables in the Condition Expression of the Variable Filter.</li> <li><span class="label label-success">Added</span> When the diagram is larger than the editor, you can move it in all directions pressing the middle-button and dragging the mouse (keeping the button pressed).</li> @@ -934,7 +987,7 @@ SWTBotUtils.waitAllUiEvents(); <code>Apply Appearance Properties</code> action has been modified to use the last selected element as base style instead of the first one. </li> </ul> - <h3 id="SpecifierVisibleChanges3">Specifier-Visible Changes</h3> + <h3 id="SpecifierVisibleChanges4">Specifier-Visible Changes</h3> <ul> <li><span class="label label-success">Added</span> Sirius 4.0 introduces <strong>experimental</strong> support for specifying the properties views of your modelers directly from inside the VSM. This feature uses the same dynamic approach as for specifying diagrams, tables and trees, with a very flexible configuration language and no code generation involved (including live preview of any change). As of Sirius 4.0, this feature should be considered in an experimental state with details subject to changes until Sirius 4.1, and is not installed by default. To install it, make sure either @@ -1000,7 +1053,7 @@ SWTBotUtils.waitAllUiEvents(); </li> <li><span class="label label-info">Modified</span> The variable under VariableFilter, previously named “Variable”, is renamed to “Select Model Element Variable”. It is functionally equivalent.</li> </ul> - <h3 id="DeveloperVisibleChanges5">Developer-Visible Changes</h3> + <h3 id="DeveloperVisibleChanges6">Developer-Visible Changes</h3> <ul> <li><span class="label label-success">Added</span> It is now possible to provide a full customized tab-bar by implementing the <code>ITabbarContributor</code> through the @@ -1198,7 +1251,7 @@ SWTBotUtils.waitAllUiEvents(); <code>org.eclipse.sirius.ui.business.api.editor.SpecificSessionManager</code> has been removed. </li> </ul> - <h4 id="Changesinorg.eclipse.sirius.diagram.ui3">Changes in + <h4 id="Changesinorg.eclipse.sirius.diagram.ui4">Changes in <code>org.eclipse.sirius.diagram.ui</code> </h4> <ul> @@ -1396,7 +1449,7 @@ SWTBotUtils.waitAllUiEvents(); </li> </ul> <h2 id="sirius3.1.0">Changes in Sirius 3.1.0</h2> - <h3 id="UserVisibleChanges6">User-Visible Changes</h3> + <h3 id="UserVisibleChanges7">User-Visible Changes</h3> <ul> <li><span class="label label-success">Added</span> A new feature allows to snap to all shapes (instead of just to snap to sibling shapes). The <kdb>F4</kdb> shortcut key activates this mode when you resize a node, move a node or move a bendpoint of an edge, see <a href="./user/diagrams/Diagrams.html#snap_to_shapes">the documentation</a> for details. @@ -1435,7 +1488,7 @@ SWTBotUtils.waitAllUiEvents(); <em>Arrange Linked Border Nodes</em> as it is border nodes which are layouted and not bordered nodes. </li> </ul> - <h3 id="SpecifierVisibleChanges4">Specifier-Visible Changes</h3> + <h3 id="SpecifierVisibleChanges5">Specifier-Visible Changes</h3> <ul> <li><span class="label label-info">Modified</span> The <em>Acceleo Query Language</em> (AQL) interpreter has been improved. AQL, and its support in Sirius, is no longer considered experimental, and instead is now the recommended query language to use for new VSMs. Improvements mostly concern better completion and validation, and more precise error reporting. In particular AQL expressions will now be able to display warnings and errors in the Interpreter view. The message displayed in the Interpreter view after an evaluation has also been improved to display the qualified name of the type of the value computed ( @@ -1482,7 +1535,7 @@ SWTBotUtils.waitAllUiEvents(); <code>IPermissionAuthority</code>) of the potential to delete objects. This is the reverse order of what was done before, and can have performance impacts if the precondition is slow. The specifier will to take care to ensure a good performance for the precondition expression of the delete tool. </li> </ul> - <h3 id="DeveloperVisibleChanges6">Developer-Visible Changes</h3> + <h3 id="DeveloperVisibleChanges7">Developer-Visible Changes</h3> <h4 id="Partialsupportforinternationalization">Partial support for internationalization</h4> <p>Sirius 3.1 introduces partial support for internationalization: all literal strings from the runtime part of Sirius are now externalized and can be localized by third parties by providing the appropriate “language packs” as OSGi fragments. Note that this does not concern the VSM editor’s UI, the VSMs themselves, or the parts of the UI inherited from Eclipse/EMF/GEF/GMF and other libraries and frameworks used by Sirius.</p> <p>Some API changes were required to enable this. While technically breaking changes if interpreting strictly the OSGi versioning rules, the major version number of the impacted bundles was not incremented as the changes only concern classes that should not impact the vast majority of users. Most breaking changes concern the plug-in/activator classes from each bundle. They are:</p> @@ -1784,7 +1837,7 @@ SWTBotUtils.waitAllUiEvents(); <code>IEditorPart</code> through the navigation history view. </li> </ul> - <h4 id="Changesinorg.eclipse.sirius.diagram.ui4">Changes in + <h4 id="Changesinorg.eclipse.sirius.diagram.ui5">Changes in <code>org.eclipse.sirius.diagram.ui</code> </h4> <ul> diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile index 038487f992..dcded9bbf3 100644 --- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile +++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile @@ -4,6 +4,20 @@ h1. Release Notes for Sirius This document contains the release notes for recent major releases of Sirius. See also "the release notes from previous versions":Release_Notes_Previous.html for details about older releases. +h2(#sirius5.0.0M7). Changes in Sirius 5.0.0M7 + +h3. User-Visible Changes + +h3. Specifier-Visible Changes + +h3. Developer-Visible Changes + +h4. Changes in @org.eclipse.sirius.diagram.ui@ + +* <span class="label label-info">Moved</span> The methods of interface @org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManagerWithMapping@ that are @getFormatData(FormatDataKey, RepresentationElementMapping)@ and @addFormatData(FormatDataKey, RepresentationElementMapping, AbstractFormatData)@ have been moved into the interface @org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager@ to reduce interface numbers for less complexity. +* <span class="label label-danger">Removed</span> The methods @getFormatData(FormatDataKey key)@ and @addFormatData(FormatDataKey key, AbstractFormatData formatData)@ have been removed from interface @org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager@ because they were deprecated. +* <span class="label label-danger">Removed</span> The interface @org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManagerWithMapping@ has been removed because all its methods have been moved into interface @org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager@ + h2(#sirius5.0.0M6). Changes in Sirius 5.0.0M6 h3. User-Visible Changes @@ -52,6 +66,9 @@ h4. Changes in @org.eclipse.sirius.diagram@ h4. Changes in @org.eclipse.sirius.diagram.ui@ * <span class="label label-info">Modified</span> The @org.eclipse.sirius.diagram.ui.tools.api.part.DiagramEditPartService.DiagramEditPartService@ class which can be used to export diagrams as images is now automatically adapting the output resolution for raster image based on maximum buffer size specified through the @plugin.propeties@ file of the @org.eclipse.sirius.diagram.ui@ plugin. This leads to a noticeable increase of the export image size (you can expect a 10 factor on small diagrams) and the method will no longer fail with OutOfMemory errors as bigger diagrams will lead to a lower output resolution. Implementers using this class can override the @DiagramEditPartService.getMaximumTotalSize()@ method to return their own limit or @DiagramEditPartService.getExportResolutionFactor(DiagramEditPart, SiriusDiagramImageGenerator)@ and return @1.0@ to get back to the previous behavior. +* <span class="label label-info">Moved</span> The methods of interface @org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManagerWithMapping@ that are @getFormatData(FormatDataKey, RepresentationElementMapping)@ and @addFormatData(FormatDataKey, RepresentationElementMapping, AbstractFormatData)@ have been moved into the interface @org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager@ to reduce interface numbers for less complexity. +* <span class="label label-danger">Removed</span> The methods @getFormatData(FormatDataKey key)@ and @addFormatData(FormatDataKey key, AbstractFormatData formatData)@ have been removed from interface @org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager@ because they were deprecated. +* <span class="label label-danger">Removed</span> The interface @org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManagerWithMapping@ has been removed because all its methods have been moved into interface @org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager@ h4. Changes in @org.eclipse.sirius.tree.ui@ diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/format/data/manager/extension/SampleManager.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/format/data/manager/extension/SampleManager.java index 2db5ae0e67..d517c92e26 100644 --- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/format/data/manager/extension/SampleManager.java +++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/format/data/manager/extension/SampleManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2016 THALES GLOBAL SERVICES. + * Copyright (c) 2010, 2017 THALES GLOBAL SERVICES. * 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 @@ -30,6 +30,7 @@ import org.eclipse.sirius.tests.unit.diagram.format.data.manager.extension.keys. import org.eclipse.sirius.tests.unit.diagram.format.data.manager.extension.keys.SampleEdgeFormatDataKey; import org.eclipse.sirius.tests.unit.diagram.format.data.manager.extension.keys.SampleNodeFormatDataKey; import org.eclipse.sirius.viewpoint.DSemanticDecorator; +import org.eclipse.sirius.viewpoint.description.RepresentationElementMapping; import org.eclipse.sirius.viewpoint.description.Viewpoint; import com.google.common.collect.Lists; @@ -63,15 +64,11 @@ public class SampleManager extends AbstractSiriusFormatDataManager implements Si SessionManager.INSTANCE.addSessionsListener(sessionMgrListener); } - /** - * {@inheritDoc} - */ @Override - public AbstractFormatData getFormatData(FormatDataKey key) { + public AbstractFormatData getFormatData(FormatDataKey key, RepresentationElementMapping mapping) { if (key instanceof AbstractSampleFormatDataKey && validateKey((AbstractSampleFormatDataKey) key)) { return getLinkedFormatData((AbstractSampleFormatDataKey) key); } - return null; } @@ -122,11 +119,8 @@ public class SampleManager extends AbstractSiriusFormatDataManager implements Si return result; } - /** - * {@inheritDoc} - */ @Override - public void addFormatData(FormatDataKey key, AbstractFormatData formatData) { + public void addFormatData(FormatDataKey key, RepresentationElementMapping mapping, AbstractFormatData formatData) { if (key instanceof AbstractSampleFormatDataKey && validateKey((AbstractSampleFormatDataKey) key)) { formatDataMap.put((AbstractSampleFormatDataKey) key, formatData); } |
