diff options
author | Remi Schnekenburger | 2015-04-27 06:31:15 +0000 |
---|---|---|
committer | Remi Schnekenburger | 2015-04-27 06:31:15 +0000 |
commit | ad791127919679a3972182966868ddba3a428574 (patch) | |
tree | 92756d0649b2f84e1dcd6301df3d80e6cf5b3416 | |
parent | b60272ea194c1dc1009051dde65162306a872156 (diff) | |
parent | 6daac06228f0cf85370e40bb060fc2f8f8bc0746 (diff) | |
download | org.eclipse.papyrus-ad791127919679a3972182966868ddba3a428574.tar.gz org.eclipse.papyrus-ad791127919679a3972182966868ddba3a428574.tar.xz org.eclipse.papyrus-ad791127919679a3972182966868ddba3a428574.zip |
Merge branch 'master' of
ssh://rschnekenbu@git.eclipse.org:29418/papyrus/org.eclipse.papyrus.git
Conflicts:
extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/MessageSetEditHelperAdvice.java
extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolContainerUtils.java
160 files changed, 10318 insertions, 9776 deletions
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/MessageSetEditHelperAdvice.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/MessageSetEditHelperAdvice.java index e971811e1f7..3c359824a3e 100644 --- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/MessageSetEditHelperAdvice.java +++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/MessageSetEditHelperAdvice.java @@ -15,19 +15,25 @@ package org.eclipse.papyrus.umlrt.custom.advice; import java.util.Arrays; import java.util.List; +import java.util.Map; import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.common.core.command.CompositeCommand; import org.eclipse.gmf.runtime.common.core.command.ICommand; import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; import org.eclipse.gmf.runtime.emf.type.core.IElementType; +import org.eclipse.gmf.runtime.emf.type.core.commands.MoveElementsCommand; import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest; import org.eclipse.papyrus.umlrt.custom.IUMLRTElementTypes; +import org.eclipse.papyrus.umlrt.custom.utils.MessageUtils; import org.eclipse.papyrus.umlrt.internals.Activator; +import org.eclipse.uml2.uml.CallEvent; import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.Operation; /** @@ -43,9 +49,33 @@ public class MessageSetEditHelperAdvice extends AbstractEditHelperAdvice { return super.getAfterEditContextCommand(request); } + + /** + * {@inheritDoc} + */ @Override - protected ICommand getAfterMoveCommand(MoveRequest request) { - return super.getAfterMoveCommand(request); + protected ICommand getAfterMoveCommand(final MoveRequest request) { + CompositeCommand compositeMoveCommand = new CompositeCommand("Composite Move Command"); + + Map<?, ?> elementsToMove = request.getElementsToMove(); + if (!elementsToMove.isEmpty()) { + for (Object elementToMove : elementsToMove.keySet()) { + if (elementToMove instanceof Operation) { + final Operation operation = (Operation) elementToMove; + final CallEvent callEvent = MessageUtils.getCallEvent(operation); + if (callEvent != null) { + MoveElementsCommand command = MessageUtils.createMoveCallEventCommand(request, callEvent); + compositeMoveCommand.add(command); + } + } + } + } + + if (compositeMoveCommand.isEmpty()) { + compositeMoveCommand.add(super.getAfterMoveCommand(request)); + } + + return compositeMoveCommand; } /** diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/MessageUtils.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/MessageUtils.java new file mode 100644 index 00000000000..abbab20c021 --- /dev/null +++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/MessageUtils.java @@ -0,0 +1,78 @@ +/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.umlrt.custom.utils;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.emf.type.core.commands.MoveElementsCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
+import org.eclipse.uml2.uml.CallEvent;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Package;
+
+/**
+ * Utility class for UMLRT::Protocols
+ */
+public class MessageUtils {
+
+ /**
+ * Returns the corresponding CallEvent of a given operation if exists. Returns null otherwise.
+ *
+ * @param operation
+ */
+ public static CallEvent getCallEvent(Operation operation) {
+ CallEvent result = null;
+
+ Package nearestPackage = operation.getNearestPackage();
+ for (Element element : nearestPackage.getOwnedElements()) {
+ if (element instanceof CallEvent) {
+ final CallEvent callEvent = (CallEvent) element;
+ if (callEvent.getOperation().equals(operation)) {
+ result = callEvent;
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ public static MoveElementsCommand createMoveCallEventCommand(final MoveRequest request, final CallEvent callEvent) {
+ MoveElementsCommand moveElementsCommand = new MoveElementsCommand(request) {
+ /**
+ * @see org.eclipse.gmf.runtime.emf.type.core.commands.MoveElementsCommand#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
+ *
+ * @param monitor
+ * @param info
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ EObject protocolContainer = ProtocolContainerUtils.getProtocolContainer(request.getTargetContainer());
+ MoveRequest callEventMoveRequest = new MoveRequest(protocolContainer, callEvent);
+ MoveElementsCommand command = new MoveElementsCommand(callEventMoveRequest);
+ command.execute(monitor, info);
+
+ return super.doExecuteWithResult(monitor, info);
+ }
+ };
+ return moveElementsCommand;
+ }
+
+}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolContainerUtils.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolContainerUtils.java index 057887d716d..dc82c0a8860 100644 --- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolContainerUtils.java +++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolContainerUtils.java @@ -253,7 +253,31 @@ public class ProtocolContainerUtils { return returnList; } + /** + * Returns ProtocolContainer of a given UML::PackagableElement. + * @param element + * @return + */ + public static Package getProtocolContainer(PackageableElement element) { + return element.getNearestPackage(); + } + /** + * Returns ProtocolContainer of a given EObject. + * @param eObject + * @return + */ + public static EObject getProtocolContainer(EObject eObject) { + EObject result = null; + + if (eObject instanceof Package) { + result = eObject; + } else { + result = getProtocolContainer(eObject.eContainer()); + } + + return result; + } diff --git a/plugins/editor/org.eclipse.papyrus.editor/plugin.xml b/plugins/editor/org.eclipse.papyrus.editor/plugin.xml index e93975eabfb..656c9b7a877 100644 --- a/plugins/editor/org.eclipse.papyrus.editor/plugin.xml +++ b/plugins/editor/org.eclipse.papyrus.editor/plugin.xml @@ -1,25 +1,75 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor"
- contributorClass="org.eclipse.papyrus.editor.PapyrusActionBarContributor"
- default="true"
- extensions="di"
- icon="icons/papyrus/Papyrus_16x16.gif"
- id="org.eclipse.papyrus.infra.core.papyrusEditor"
- matchingStrategy="org.eclipse.papyrus.editor.PapyrusMatchingStrategy"
- name="Papyrus Editor Core">
- </editor>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- description="this a category of papyrus commands"
- id="org.eclipse.papyrus.editor.category"
- name="Papyrus Category">
- </category>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.2"?> +<plugin> + <extension point="org.eclipse.ui.editors"> + <editor + class="org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor" + contributorClass="org.eclipse.papyrus.editor.PapyrusActionBarContributor" + default="true" + extensions="di" + icon="icons/papyrus/Papyrus_16x16.gif" + id="org.eclipse.papyrus.infra.core.papyrusEditor" + matchingStrategy="org.eclipse.papyrus.editor.PapyrusMatchingStrategy" + name="Papyrus Editor Core"> + </editor> + </extension> + <extension + point="org.eclipse.ui.commands"> + <category + description="this a category of papyrus commands" + id="org.eclipse.papyrus.editor.category" + name="Papyrus Category"> + </category> + + <command + categoryId="org.eclipse.ui.category.navigate" + id="org.eclipse.papyrus.editor.nextTabCommand" + name="Next Tab"> + </command> + <command + categoryId="org.eclipse.ui.category.navigate" + id="org.eclipse.papyrus.editor.previousTabCommand" + name="Previous Tab"> + </command> + </extension> + <extension + point="org.eclipse.ui.bindings"> + <key + commandId="org.eclipse.papyrus.editor.nextTabCommand" + contextId="org.eclipse.ui.contexts.window" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" + sequence="CTRL+TAB"> + </key> + <key + commandId="org.eclipse.papyrus.editor.previousTabCommand" + contextId="org.eclipse.ui.contexts.window" + schemeId="org.eclipse.ui.defaultAcceleratorConfiguration" + sequence="CTRL+M2+TAB"> + </key> + </extension> + <extension + point="org.eclipse.ui.handlers"> + <handler + class="org.eclipse.papyrus.editor.handlers.NextTabHandler" + commandId="org.eclipse.papyrus.editor.nextTabCommand"> + <activeWhen> + <with variable="activeEditorId"> + <equals value="org.eclipse.papyrus.infra.core.papyrusEditor"/> + </with> + </activeWhen> + </handler> + <handler + class="org.eclipse.papyrus.editor.handlers.PreviousTabHandler" + commandId="org.eclipse.papyrus.editor.previousTabCommand"> + <activeWhen> + <with + variable="activeEditorId"> + <equals + value="org.eclipse.papyrus.infra.core.papyrusEditor"> + </equals> + </with> + </activeWhen> + </handler> + </extension> + +</plugin> diff --git a/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/NextTabHandler.java b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/NextTabHandler.java new file mode 100644 index 00000000000..99f02589ba2 --- /dev/null +++ b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/NextTabHandler.java @@ -0,0 +1,29 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST 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: + * Shuai Li (CEA LIST) <shuai.li@cea.fr> - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.editor.handlers; + +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; + +/** + * The handler for the next tab command that lets the user navigate to + * the next page of the active tab-folder with Ctrl+Tab + * + * @author Shuai Li + */ +public class NextTabHandler extends TraverseTabHandler { + public NextTabHandler() { + super(false); + } +} diff --git a/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/PreviousTabHandler.java b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/PreviousTabHandler.java new file mode 100644 index 00000000000..ae42ef0170c --- /dev/null +++ b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/PreviousTabHandler.java @@ -0,0 +1,29 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST 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: + * Shuai Li (CEA LIST) <shuai.li@cea.fr> - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.editor.handlers; + +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; + +/** + * The handler for the previous tab command that lets the user navigate to + * the previous page of the active tab-folder with Ctrl+Shift+Tab + * + * @author Shuai Li + */ +public class PreviousTabHandler extends TraverseTabHandler { + public PreviousTabHandler() { + super(true); + } +} diff --git a/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/TraverseTabHandler.java b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/TraverseTabHandler.java new file mode 100644 index 00000000000..dba5f87e2e9 --- /dev/null +++ b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/TraverseTabHandler.java @@ -0,0 +1,69 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST 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: + * Shuai Li (CEA LIST) <shuai.li@cea.fr> - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.editor.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.papyrus.editor.Activator; +import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor; +import org.eclipse.papyrus.infra.core.sasheditor.editor.IPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; + +/** + * The handler for the next/previous tab commands that let the user navigate to + * the next/previous page of the active tab-folder with Ctrl+Shift/Ctrl+Shift+Tab + * + * @author Shuai Li + */ +public abstract class TraverseTabHandler extends AbstractHandler { + private final boolean isPrevious; + + public TraverseTabHandler() { + isPrevious = false; + } + + public TraverseTabHandler(boolean isPrevious) { + this.isPrevious = isPrevious; + } + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + + if (activeWorkbenchWindow != null) { + IWorkbenchPart activePart = activeWorkbenchWindow.getActivePage().getActivePart(); + + if (activePart instanceof PapyrusMultiDiagramEditor) { + PapyrusMultiDiagramEditor papyrusEditor = (PapyrusMultiDiagramEditor) activePart; + try { + IPage nextPage = null; + if (isPrevious) { + nextPage = papyrusEditor.getISashWindowsContainer().getPreviousPage(); + } else { + nextPage = papyrusEditor.getISashWindowsContainer().getNextPage(); + } + + papyrusEditor.getISashWindowsContainer().selectPage(nextPage); + } catch (Exception e) { + Activator.log.error(e); + } + } + } + + return null; + } +} diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/ISashWindowsContainer.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/ISashWindowsContainer.java index a559d16e237..94e96cf856f 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/ISashWindowsContainer.java +++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/ISashWindowsContainer.java @@ -1,145 +1,159 @@ -package org.eclipse.papyrus.infra.core.sasheditor.editor;
-
-import java.util.List;
-
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashWindowsContentProvider;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ITabFolderModel;
-import org.eclipse.papyrus.infra.core.sasheditor.utils.IObservableList;
-import org.eclipse.ui.IEditorPart;
-
-public interface ISashWindowsContainer {
-
- /**
- * Get the currently active editor, or null if none is active.
- *
- * @return
- */
- public abstract IEditorPart getActiveEditor();
-
- /**
- * Get the currently active SashWindows Page.
- * This is s
- *
- * @return An {@link IPage} allowing to access current page data.
- */
- public abstract IPage getActiveSashWindowsPage();
-
- /**
- * Get the {@link ITabFolderModel} of the currently selected folder.
- *
- * @return
- */
- public ITabFolderModel getSelectedTabFolderModel();
-
- /**
- * Get the list of visible IPages. The visible IPages are the one that have there diagram area
- * visible.
- *
- * @return
- */
- public List<IPage> getVisiblePages();
-
- /**
- * Return a list of all folders opened in this SashContainer. The list should only
- * be used as a 'view' list. It should not be modified or written. The list
- * is observable.
- *
- * @return a read only and observable list of {@link IFolder}.
- */
- public IObservableList<IFolder> getIFolderList();
-
- /**
- * Get the list of visible IEditorPart obtain from the pages of type IEditorPage.
- * The visible IPages are the one that have there diagram area
- * visible.
- *
- * @return
- */
- public List<IEditorPart> getVisibleIEditorParts();
-
- /**
- * The <code>AbstractMultiPageSashEditor</code> implementation of this <code>IWorkbenchPart</code> method sets focus on the active nested
- * editor, if there is one.
- * <p>
- * Subclasses may extend or reimplement.
- * </p>
- */
- public abstract void setFocus();
-
- /**
- * Refresh the SashWindows.
- * Synchronize the internal structure with the {@link ISashWindowsContentProvider}.
- */
- public abstract void refreshTabs();
-
- /**
- * Add a PageChangedListener to the list of listeners.
- *
- * @param pageEventsManager
- */
- public abstract void addPageChangedListener(IPageChangedListener pageChangedListener);
-
- /**
- * Remove the PageChangedListener from the list of listeners.
- *
- * @param pageEventsManager
- */
- public abstract void removePageChangedListener(IPageChangedListener pageChangedListener);
-
- /**
- * Add a listener on Page LifeCycle events.
- * This implementation delegates to the internal PageTracker.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
- * @param listener
- *
- */
- public void addPageLifeCycleListener(IPageLifeCycleEventsListener listener);
-
- /**
- * Remove a listener on Page LifeCycle events.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
- * @param listener
- *
- */
- public void removePageLifeCycleListener(IPageLifeCycleEventsListener listener);
-
- /**
- * Add a listener {@link ITabMouseEventsListener} on folder's tabs events.
- *
- * @param listener
- */
- public void addFolderTabMouseEventListener(ITabMouseEventsListener listener);
-
- /**
- * Remove a listener on Page LifeCycle events.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
- * @param listener
- *
- */
- public void removeFolderTabMouseEventListener(ITabMouseEventsListener listener);
-
- /**
- * Set a {@link MenuManager} used to manage a contextual menu that is shown on the tabs area of the folders.
- *
- * @param menuManager
- * The {@link MenuManager} used to create the menu on the tab area.
- */
- public abstract void setFolderTabMenuManager(MenuManager menuManager);
-
- public abstract IPage lookupIPageByIEditorPart(IEditorPart editor);
-
- public abstract IPage lookupModelPage(Object rawModel);
-
- public abstract void selectPage(IPage page);
-
- public abstract void visit(IPageVisitor pageVisitor);
-
- /**
- * @return <code>true</code> if already disposed
- */
- public boolean isDisposed();
-}
+package org.eclipse.papyrus.infra.core.sasheditor.editor; + +import java.util.List; + +import org.eclipse.jface.action.MenuManager; +import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashWindowsContentProvider; +import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ITabFolderModel; +import org.eclipse.papyrus.infra.core.sasheditor.utils.IObservableList; +import org.eclipse.ui.IEditorPart; + +public interface ISashWindowsContainer { + + /** + * Get the currently active editor, or null if none is active. + * + * @return + */ + public abstract IEditorPart getActiveEditor(); + + /** + * Get the currently active SashWindows Page. + * This is s + * + * @return An {@link IPage} allowing to access current page data. + */ + public abstract IPage getActiveSashWindowsPage(); + + /** + * Get the {@link ITabFolderModel} of the currently selected folder. + * + * @return + */ + public ITabFolderModel getSelectedTabFolderModel(); + + /** + * Get the list of visible IPages. The visible IPages are the one that have there diagram area + * visible. + * + * @return + */ + public List<IPage> getVisiblePages(); + + /** + * Get the next IPage in the tabs list. + * + * @return + */ + public IPage getNextPage(); + + /** + * Get the next IPage in the tabs list. + * + * @return + */ + public IPage getPreviousPage(); + + /** + * Return a list of all folders opened in this SashContainer. The list should only + * be used as a 'view' list. It should not be modified or written. The list + * is observable. + * + * @return a read only and observable list of {@link IFolder}. + */ + public IObservableList<IFolder> getIFolderList(); + + /** + * Get the list of visible IEditorPart obtain from the pages of type IEditorPage. + * The visible IPages are the one that have there diagram area + * visible. + * + * @return + */ + public List<IEditorPart> getVisibleIEditorParts(); + + /** + * The <code>AbstractMultiPageSashEditor</code> implementation of this <code>IWorkbenchPart</code> method sets focus on the active nested + * editor, if there is one. + * <p> + * Subclasses may extend or reimplement. + * </p> + */ + public abstract void setFocus(); + + /** + * Refresh the SashWindows. + * Synchronize the internal structure with the {@link ISashWindowsContentProvider}. + */ + public abstract void refreshTabs(); + + /** + * Add a PageChangedListener to the list of listeners. + * + * @param pageEventsManager + */ + public abstract void addPageChangedListener(IPageChangedListener pageChangedListener); + + /** + * Remove the PageChangedListener from the list of listeners. + * + * @param pageEventsManager + */ + public abstract void removePageChangedListener(IPageChangedListener pageChangedListener); + + /** + * Add a listener on Page LifeCycle events. + * This implementation delegates to the internal PageTracker. + * + * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener) + * @param listener + * + */ + public void addPageLifeCycleListener(IPageLifeCycleEventsListener listener); + + /** + * Remove a listener on Page LifeCycle events. + * + * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener) + * @param listener + * + */ + public void removePageLifeCycleListener(IPageLifeCycleEventsListener listener); + + /** + * Add a listener {@link ITabMouseEventsListener} on folder's tabs events. + * + * @param listener + */ + public void addFolderTabMouseEventListener(ITabMouseEventsListener listener); + + /** + * Remove a listener on Page LifeCycle events. + * + * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener) + * @param listener + * + */ + public void removeFolderTabMouseEventListener(ITabMouseEventsListener listener); + + /** + * Set a {@link MenuManager} used to manage a contextual menu that is shown on the tabs area of the folders. + * + * @param menuManager + * The {@link MenuManager} used to create the menu on the tab area. + */ + public abstract void setFolderTabMenuManager(MenuManager menuManager); + + public abstract IPage lookupIPageByIEditorPart(IEditorPart editor); + + public abstract IPage lookupModelPage(Object rawModel); + + public abstract void selectPage(IPage page); + + public abstract void visit(IPageVisitor pageVisitor); + + /** + * @return <code>true</code> if already disposed + */ + public boolean isDisposed(); +} diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainer.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainer.java index d32e94b8dc5..c141eb52742 100644 --- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainer.java +++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainer.java @@ -1,1362 +1,1464 @@ -/*****************************************************************************
- * Copyright (c) 2009, 2014 LIFL, CEA LIST, 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:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 437217
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.core.sasheditor.internal;
-
-import static org.eclipse.papyrus.infra.core.sasheditor.Activator.log;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.util.Geometry;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IComponentModel;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashWindowsContentProvider;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ITabFolderModel;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IEditorPage;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IFolder;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IPage;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageLifeCycleEventsListener;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageVisitor;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.ITabMouseEventsListener;
-import org.eclipse.papyrus.infra.core.sasheditor.utils.IObservableList;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.internal.DragCursors;
-import org.eclipse.ui.internal.dnd.DragUtil;
-import org.eclipse.ui.internal.dnd.IDragOverListener;
-import org.eclipse.ui.internal.dnd.IDropTarget;
-
-
-/**
- * Main entry class of the SashWindows system.
- * This class allows to have a multitab window with sashes.
- * The class require a ContentProvider describing the content to be shown.
- *
- * @author dumoulin
- */
-@SuppressWarnings("restriction")
-public class SashWindowsContainer implements ISashWindowsContainer {
-
- /**
- * The content provider describing the sashes, folders and tabs.
- */
- private ISashWindowsContentProvider contentProvider;
-
- /**
- * The manager used to get Main editor properties like Site, ActionBars, ...
- */
- private IMultiEditorManager multiEditorManager;
-
- /**
- * Tracker tracking the current active page. The tracker also disconnect last active page and connect
- * the new one.
- */
- private ActivePageTracker activePageTracker;
-
- /**
- * Event provider firing Pages life cycle events to registered listeners. Inner parts call the fireXxxEvents
- * when appropriate.
- */
- private SashContainerEventsProvider lifeCycleEventProvider;
-
- /**
- * Event provider firing Folder life cycle events to registered listeners. Inner parts call the fireXxxEvents
- * when appropriate.
- */
- private SashContainerFolderEventsProvider folderLifeCycleEventProvider;
-
- /**
- * Event provider firing mouse events from tabs.
- *
- */
- private TabMouseEventsProvider tabMouseEventsProvider;
-
- /**
- * A manager used to maintain a view list of available {@link TabFolderPart}. This list should
- * only be used in a READ way. It should not be modified by something else than its manager.
- *
- */
- private TabFolderListManager folderListManager;
-
- /**
- * The part used as root. We use an extra class as root in order to separate the code dedicated to
- * ITilePart.
- */
- private RootPart rootPart;
-
- /**
- * The SWT container associated to this part. This is generally the container of the
- * parent.
- */
- private Composite container;
-
- /**
- * The drop target.
- */
- protected DropTarget dropTarget;
-
- /** A flag that indicates that the model is being synchronized. */
- private AtomicBoolean isRefreshing = new AtomicBoolean(false);
-
- /**
- * The cached value of the menu manager, if any.
- */
- private MenuManager folderTabMenuManager;
-
- /**
- * Listener on widget diposed event.
- */
- private DisposeListener widgetDisposedListener = new DisposeListener() {
-
- /**
- * Called when the widget is disposed.
- *
- * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent)
- *
- * @param e
- */
- @Override
- public void widgetDisposed(DisposeEvent e) {
- // We dispose the container.
- dispose();
- }
- };
-
- /**
- * Constructor.
- * Build a Container without IEditor management. Trying to add a EditorPart will result in an Exception.
- * The ContentProvider should not contain IEditorModel.
- */
- public SashWindowsContainer() {
- this(null);
- }
-
- /**
- * Constructor.
- * Build a container with EditorPart management. The container will allow to add EditorPart
- * (and thus IEditorModel to the ContentProvider).
- *
- * @param multiEditorManager
- * The manager allowing to use {@link IEditorModel} in the model.
- * If null, the sash will not render IEditorModel.
- *
- */
- public SashWindowsContainer(IMultiEditorManager multiEditorManager) {
- this.multiEditorManager = multiEditorManager;
- activePageTracker = new ActivePageTracker();
-
- if (multiEditorManager != null) {
- // Add listener on activePageChange.
- // This listener will take in charge editor services switching.
- activePageTracker.addActiveEditorChangedListener(new ActiveEditorServicesSwitcher(multiEditorManager.getEditorSite()));
- }
-
- // Life cycle event provider
- lifeCycleEventProvider = new SashContainerEventsProvider();
-
- // Tab mouve event provider
- tabMouseEventsProvider = new TabMouseEventsProvider();
-
- // Folder list view
- initTabFolderListManager();
- }
-
- /**
- * @return the contentProvider
- */
- protected ISashWindowsContentProvider getContentProvider() {
- // Content provider should have been set.
- assert (contentProvider != null);
- // Double check for development
- if (contentProvider == null) {
- throw new IllegalStateException("ContentProvider should be set before calling any method requiring it.");
- }
-
- return contentProvider;
- }
-
- /**
- * Set the content provider describing the sashes, folders and tabs.
- *
- * @param contentProvider
- * the contentProvider to set
- */
- public void setContentProvider(ISashWindowsContentProvider contentProvider) {
- // Use a delegate
- // The delegate is used as a central point performing calls to the
- // external implementation.
- this.contentProvider = new DelegateContentProvider(contentProvider);
- }
-
- /**
- * Creates control associated to this Container.
- * This method should be called when the parent is build.
- *
- * @param parent
- * The parent in which the editor should be created; must not be <code>null</code>.
- */
- public void createPartControl(Composite parent) {
- this.container = parent;
-
- rootPart = createRootPart();
- // Create the tree of tile part.
- rootPart.createPartControl(container);
- // TODO 20130205
- // Read lastActivePart from ContentProvider, and set it
- // before refresh. Like this, sash will select the last save page
-
- // Create children
- refreshTabs();
- // Set selection
- // TODO 20130205 remove next, because refresh already do it
- selectPage(lookupFirstValidPage());
-
- // postCreatePartControl();
- // TODO reactivate next
- initDrag(container);
- // activate();
-
- // Listen for disposale
- container.addDisposeListener(widgetDisposedListener);
- }
-
- /**
- * Create the root part for the model.
- */
- private RootPart createRootPart() {
- RootPart part = new RootPart(this);
- return part;
- }
-
- /**
- * Dispose the Container. All referenced resources will be disposed.
- * The container should not be used anymore once disposed.
- * The result of calling a method after a dispose() is unpredictable. <br>
- * This method can be called several times. <br>
- * <br>
- * How the method works:
- * <ul>
- * <li>The {@link SashWindowsContainer} has two trees, the SWT tree and a Part tree ({@link #rootPart}).</li>
- * <li>The SWT tree is disposed first.</li>
- * <ul>
- * <li>This prevent events fired from user interaction or from Widget modifiaction</li>
- * <li>The SWT disposal stop before nested editors SWT (thanks to the DISPOSE event in {@link EditorPart}). At this point, the nested editor dispose() method is called.</li>
- * <li>This allow to let the nested editor receive one single dispose call.</li>
- * <li></li>
- * </ul>
- * <li>The Part tree is disposed second (by calling rootPart.disposeThisAndChildren() )</li>
- * <ul>
- * <li>properties are cleaned in order to help the GC</li>
- * <li>swt controls are not disposed again</li>
- * </ul>
- * <li></li> <li></li> <li></li> <li></li> <li></li> </ul>
- *
- */
- public void dispose() {
- // Check if already disposed
- if (isDisposed()) {
- return;
- }
-
- // End disposing children's SWT controls.
- // It is possible to recall the dispose() method on a Widget, even if we are called by the dispose event.
- // Recalling the dispose method will continue disposing SWT children's.
-
- // DO NOT dispose the container composite, as we did not create it!
- if (container != null) {
- for (Control next : container.getChildren()) {
- next.dispose();
- }
- }
-
- // dispose part children
- if (rootPart != null) {
- // rootPart can be null if createPartControl has not been called.
- // This can happen in tests.
- rootPart.disposeThisAndChildren();
- }
-
- // clean up properties to help GC
- activePageTracker = null;
- container = null;
- contentProvider = null;
- dragOverListener = null;
- folderTabMenuManager = null;
- lifeCycleEventProvider = null;
- multiEditorManager = null;
- rootPart = null;
- }
-
- /**
- * Return true if the container is disposed, false otherwise.
- *
- * @return
- */
- @Override
- public boolean isDisposed() {
- // Use the activePageTracker as a flag.
- return activePageTracker == null;
- }
-
- /**
- * Notifies this page container that the specified page has been activated. This method
- * is called after the current tabs has been changed, either by refreshing the tabs, or by a user
- * UI action.
- * This method just set correctly the active page value in the Container, and fire pageChanged events if needed.
- * It does not change the selected page in the Part.
- *
- * Propagate the event to activePageTracker.
- * Removed since 0.10
- *
- * @param childPart
- */
- // protected void pageChanged(PagePart childPart) {
- // activePageTracker.setActiveEditor(childPart);
- // lifeCycleEventProvider.firePageActivatedEvent(childPart);
- // }
-
- /**
- * Notifies this page container that a pageChanged event has been fired by one swt Control.
- * This method is usually called after the user selects a different tab.
- *
- * The method notify the ContentProvider, and calls {@link #pageChanged(PagePart)}.
- * Removed since 0.10
- *
- * @param childPart
- */
- // protected void pageChangedEvent(PagePart childPart) {
- //
- // // Check if it is really a change before changing the model (which can throw change event)
- // // The folder model change is done before the tracker fires the listeners, like this
- // // listeners can check the model.
- // if(getActivePage() == childPart)
- // return;
- //
- // pageChanged(childPart);
- // }
-
- /**
- * Set the active page. The current active page will be the specified page. Throw events indicating that
- * the current ActivePage has changed. <br>
- * Do not set the activeSelection.
- *
- *
- * @param childPart
- */
- protected void setActivePage(PagePart childPart) {
-
- // Do nothing if the activePage has not changed
- if (childPart == null || getActivePage() == childPart) {
- return;
- }
-
- // TODO 20130205 remove next
- contentProvider.setCurrentFolder(childPart.getParent().getRawModel());
-
- activePageTracker.setActiveEditor(childPart);
- lifeCycleEventProvider.firePageActivatedEvent(childPart);
- }
-
- /**
- * This method allow to change current activePage. It set the activePage, and select it in
- * the folder. <br>
- * This method fires notifications (activePageChanged).
- *
- * @param newActivePage
- * The page that should become the active one.
- */
- protected void setActivePageAndSelection(PagePart newActivePage) {
-
- PagePart oldSelection = getActivePage();
- // First, set the selection, like this the observers will see the correct selection.
- synchronizeActiveSelection(newActivePage);
- try {
- // Set the active page
- setActivePage(newActivePage);
-
- } catch (RuntimeException e) {
- // Restore selection in case of exception
- synchronizeActiveSelection(oldSelection);
- // lets propagate
- throw e;
- }
- }
-
- /**
- * Synchronize the active selection to be the page of the activePage.
- * This should be called when the activePage is set, but the selection is not
- * yet set. <br>
- * This should not throw events (neither selctionChanged or pageChanged event).
- *
- */
- protected void synchronizeActiveSelection() {
- PagePart activePage = getActivePage();
-
- synchronizeActiveSelection(activePage);
- }
-
- /**
- * Synchronize the active selection to be the specified page. Do not synchronize with the activePage. <br>
- * This should not throw events (neither selctionChanged or pageChanged event).
- *
- * @param page
- */
- private void synchronizeActiveSelection(PagePart page) {
- if (page == null) {
- return;
- }
- TabFolderPart folder = page.getParent();
-
- // Folder can be null in case of tests
- if (folder != null) {
- folder.setSelection(page);
- }
-
- }
-
- /**
- * A change has happen in one of the inner parts. Relay the event.
- * This method is called by inner parts whenever the event happen in one of the part.
- * It collects and relay the firePropertyChange(int propertyId) calls from the inner IEditor.
- *
- * @param propertyId
- */
- protected void firePropertyChange(int propertyId) {
- // For now, we do nothing with this event.
- }
-
- /**
- * Create the part for the specified newModel.
- *
- * @param parent
- * The parent of the created part.
- * @param partModel
- * The model for which a part should be created.
- * @return
- */
- protected PagePart createPagePart(TabFolderPart parent, IPageModel partModel, Object rawModel) {
-
-
- if (partModel instanceof IEditorModel) {
- // Check if we can use IEditorModel
- if (multiEditorManager == null) {
- throw new IllegalArgumentException("Container can't accept IEditorModel as no IMultiEditorManager is set. Please set a IMultiEditorManager.");
- }
-
- return new EditorPart(parent, (IEditorModel) partModel, rawModel, multiEditorManager);
- } else if (partModel instanceof IComponentModel) {
- return new ComponentPart(parent, (IComponentModel) partModel, rawModel);
- } else {
- // Return a default part
- }
-
- // TODO return a default part showing an error instead.
- throw new IllegalArgumentException("No Part found for the model '" + rawModel + "'");
- }
-
- /**
- * Get the {@link ITabFolderModel} of the currently selected folder.
- *
- * @return
- */
- @Override
- public ITabFolderModel getSelectedTabFolderModel() {
-
- // Get the activePage. The seleted folder is its parent.
- PagePart activePage = activePageTracker.getActiveEditor();
- if (activePage != null && activePage.getParent() != null) {
- return activePage.getParent().getPartModel();
- }
- // No active page exist, but their should be a folder
- TabFolderPart folder = lookupFirstValidFolder();
- return folder.getPartModel();
- }
-
- /**
- * Lookup the first valid folder in this sash system.
- * There is always a valid folder.
- *
- * @return The first valid folder.
- */
- private TabFolderPart lookupFirstValidFolder() {
-
- LookupFirstFolderVisitor visitor = new LookupFirstFolderVisitor();
- rootPart.visit(visitor);
- return visitor.result();
- }
-
- /**
- * Get the active page.
- *
- * @return
- */
- private PagePart getActivePage() {
- return activePageTracker.getActiveEditor();
- }
-
- /**
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#getActiveEditor()
- * @return
- *
- */
- @Override
- public IEditorPart getActiveEditor() {
- PagePart pagePart = getActivePage();
- if (pagePart instanceof EditorPart) {
- return ((EditorPart) pagePart).getIEditorPart();
- } else {
- return null;
- }
- }
-
- /**
- * Get the active page public API.
- *
- * @return
- */
- @Override
- public IPage getActiveSashWindowsPage() {
- return getActivePage();
- }
-
- /**
- * Get the list of visible IPages. The visible IPages are the one that have there diagram area
- * visible.
- *
- * @return
- */
- @Override
- public List<IPage> getVisiblePages() {
- CollectVisiblePageVisitor visitor = new CollectVisiblePageVisitor();
-
- rootPart.visit(visitor);
-
- return visitor.getVisiblePages();
- }
-
- /**
- * Get the list of visible IPages. The visible IPages are the one that have there diagram area
- * visible.
- *
- * @return
- */
- // public List<IEditorPage> getVisibleIEditorPages() {
- // CollectVisiblePageVisitor visitor = new CollectVisiblePageVisitor( IEditorPage.class);
- //
- // rootPart.visit(visitor);
- //
- // return visitor.getVisiblePages();
- // }
-
- /**
- * Get the list of visible IPages. The visible IPages are the one that have there diagram area
- * visible.
- *
- * @return
- */
- @Override
- public List<IEditorPart> getVisibleIEditorParts() {
- CollectVisibleIEditorPart visitor = new CollectVisibleIEditorPart();
- rootPart.visit(visitor);
-
- return visitor.getVisiblePages();
- }
-
-
- /**
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#setFocus()
- *
- */
- @Override
- public void setFocus() {
- setFocus(getActivePage());
- }
-
- /**
- * Sets focus to the control for the given page. If the page has an editor,
- * this calls its <code>setFocus()</code> method. Otherwise, this calls <code>setFocus</code> on the control for the page.
- *
- * @param pageIndex
- * the index of the page
- */
- private void setFocus(PagePart part) {
- if (part != null) {
- part.setFocus();
- }
- }
-
-
- /**
- * Refresh the tabs.
- * Is we are already currently refreshing, simply return.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#refreshTabs()
- *
- */
- @Override
- public void refreshTabs() {
-
- // Check if we arent already refreshing
- if (isRefreshing.compareAndSet(false, true)) {
- try {
- refreshTabsInternal();
- } finally {
- isRefreshing.set(false);
- }
- } else {
- log.warn("refresh inside refresh !");
- }
-
- }
-
- /**
- * Refresh the tab of the page, (i.e the name and icon in the page's tab).
- *
- * @param page
- * The page for which the name and icon should be refreshed.
- */
- public void refreshPageTab(IPage page) {
- if (page instanceof PagePart) {
- ((PagePart) page).refreshTab();
- } else {
- // TODO : lookup for the corresponding PagePart, and call refresh.
-
- }
- }
-
- /**
- * Real implementation of refreshTab.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#refreshTabs()
- *
- */
- private void refreshTabsInternal() {
- // System.out.println("start synchronize2() ------------------------");
- // showTilesStatus();
-
- // Get the currently selected folder
- PagePart oldActivePage = getActivePage();
-
- // Do refresh
- container.setRedraw(false);
- // Create map of parts
- // PartMap<T> partMap = new PartMap<T>();
- PartLists garbageMaps = new PartLists();
- rootPart.fillPartMap(garbageMaps);
-
- // Synchronize parts
- rootPart.synchronize2(garbageMaps);
-
-
- // Remove orphaned parts (no more used)
- garbageMaps.garbage();
-
- // set active page if needed
- setActivePageAndSelection(checkAndGetActivePage(oldActivePage, garbageMaps));
-
- // Reenable SWT and force layout
- container.setRedraw(true);
- container.layout(true, true);
- // System.out.println("end synchronize2() ------------------------");
- // showTilesStatus();
- }
-
- /**
- * Select the specified page in the Parts. The specified page will becomes the active one.
- * Appropriate events are fired.
- * This is the programatic counterpart of selecting a page in the UI.
- * If the provided page is null, do nothing.
- * Removed since 0.10
- *
- * @param page
- * The page to select or null.
- */
- // protected void selectPage(PagePart page) {
- // if(page == null)
- // return;
- // TabFolderPart folder = page.getParent();
- // folder.setActiveEditor(page);
- // }
-
- /**
- * Select the specified page in the Parts. The specified page will becomes the active one.
- * Appropriate events are fired if needed.
- * This is the programmatic counterpart of selecting a page in the UI.
- * If the provided page is null, do nothing.
- *
- * @param page
- * The page to select or null. The IPage should
- * be an instance previously returned by the SashContainer.
- *
- */
- @Override
- public void selectPage(IPage page) {
- if (page == null) {
- return;
- }
-
- // check if we are a correct instance.
- if (!(page instanceof PagePart)) {
- return;
- }
-
- setActivePageAndSelection((PagePart) page);
- }
-
- /**
- * Lookup the {@link IPage} used to render the specified rawModel.
- *
- * @param rawModel
- * The model for which the IPage is requested.
- * If the model is not rendered, return null;
- *
- * @return The corresponding IPage or null if not found.
- */
- @Override
- public IPage lookupModelPage(Object rawModel) {
- // Use a visitor to lookup the first IPage
- LookupModelPageVisitor visitor = new LookupModelPageVisitor(rawModel);
- rootPart.visit(visitor);
- return visitor.result();
- }
-
- /**
- * Lookup the {@link IPage} used to render the specified IEditorPart.
- *
- * @param editor
- * The IEditorPart for which the IPage is requested.
- * If the IEditorPart is not rendered, return null;
- *
- * @return The corresponding IPage or null if not found.
- */
- @Override
- public IPage lookupIPageByIEditorPart(IEditorPart editor) {
- // Use a visitor to lookup the first IPage
- LookupIPageByIEditorPartVisitor visitor = new LookupIPageByIEditorPartVisitor(editor);
- rootPart.visit(visitor);
- return visitor.result();
- }
-
- /**
- * Check if the oldActivePage still alive, and set it if needed.
- * If the oldActivePage is null, set an active page if one exist.
- * If the oldActivePage still alive, let it as the active one. If it is
- * disposed, get arbitrarily an active page if one exist.
- *
- * @param oldActivePage
- * @param partLists
- * @param garbageMaps
- * @return A valid active page or null if none exists.
- */
- private PagePart checkAndGetActivePage(PagePart oldActivePage, PartLists partLists) {
-
- // Check if there is a created page
- PagePart activePage = partLists.getFirstCreatedPage();
- if (activePage != null) {
- // There is a created page. Set it as the selected and active one
- return activePage;
- }
-
- // Check oldActivePage validity (in case it has been deleted)
- if (oldActivePage != null && !(oldActivePage.isOrphaned() || oldActivePage.isUnchecked())) {
- return oldActivePage;
- }
-
- // Get an active page if any
- return lookupFirstValidPage();
- }
-
- /**
- * Lookup for a valid active Page. Return null if none is found.
- * TODO Use a visitor to implements this method.
- *
- * @return
- */
- private PagePart lookupFirstValidPage() {
- // First get a list of active editors
- PartLists garbageMaps = new PartLists();
- rootPart.fillPartMap(garbageMaps);
- return garbageMaps.getFirstValidPage();
- }
-
- /**
- * Set a {@link MenuManager} used to manage a contextual menu that is shown on the tabs area of the folders.
- *
- * @param menuManager
- * The {@link MenuManager} used to create the menu on the tab area.
- */
- @Override
- public void setFolderTabMenuManager(MenuManager menuManager) {
- this.folderTabMenuManager = menuManager;
- // Set the MenuManager in each existing folder.
- // Use a visitor.
- SetFolderTabMenuVisitor visitor = new SetFolderTabMenuVisitor(menuManager);
- rootPart.visit(visitor);
- }
-
- /**
- * @return the menuManager
- */
- protected MenuManager getFolderTabMenuManager() {
- return folderTabMenuManager;
- }
-
- /**
- * Show the status of the different Tiles composing the sash system.
- * Used for debug purpose.
- */
- public void showTilesStatus() {
- ShowPartStatusVisitor visitor = new ShowPartStatusVisitor();
- rootPart.visit(visitor);
- }
-
-
- /**
- * Visit all the Pages (IEditorPage and IComponentPage), allowing to access to the public interface.
- */
- @Override
- public void visit(IPageVisitor pageVisitor) {
- PageVisitorWrapper visitor = new PageVisitorWrapper(pageVisitor);
- rootPart.visit(visitor);
- }
-
- /**
- * Visit the Part associated to the container. This method visibility is protected in order to be able to access it
- * from junit tests.
- * It is not intended to be used by public API or from outside.
- */
- protected void visit(IPartVisitor visitor) {
- rootPart.visit(visitor);
- }
-
- /* ***************************************************** */
- /* Drag and Drop methods */
- /* ***************************************************** */
-
- /**
- *
- */
- private void initDrag(Composite container) {
- DragUtil.addDragTarget(container, dragOverListener);
-
- }
-
- IDragOverListener dragOverListener = new IDragOverListener() {
-
- /**
- *
- * @see org.eclipse.ui.internal.dnd.IDragOverListener#drag(org.eclipse.swt.widgets.Control, java.lang.Object, org.eclipse.swt.graphics.Point, org.eclipse.swt.graphics.Rectangle)
- */
- @Override
- public IDropTarget drag(Control currentControl, Object draggedObject, Point position, Rectangle dragRectangle) {
- // TODO remove the cast by changing the method. Only folder can be source and target
- final TabFolderPart sourcePart = (TabFolderPart) rootPart.findPart(draggedObject); // (ITilePart) draggedObject;
- // Compute src tab index
- // TODO move that and previous in the sender of drag event. Use a class containing both as draggedObject.
- final int srcTabIndex = PTabFolder.getDraggedObjectTabIndex(draggedObject);
-
- // System.out.println("drag to position=" + position);
- Rectangle containerDisplayBounds = DragUtil.getDisplayBounds(container);
- AbstractPanelPart targetPart = null;
-
- // Check if the cursor is inside the container
- if (containerDisplayBounds.contains(position)) {
-
- if (rootPart != null) {
- targetPart = (AbstractPanelPart) rootPart.findPart(position);
- // System.out.println("targetPart=" + targetPart
- // + ", position=" + position
- // + "container.toControl(position)=" + container.toControl(position));
- }
-
- if (targetPart != null) {
- final Control targetControl = targetPart.getControl();
-
- final Rectangle targetBounds = DragUtil.getDisplayBounds(targetControl);
-
- int side = Geometry.getClosestSide(targetBounds, position);
- int distance = Geometry.getDistanceFromEdge(targetBounds, position, side);
-
- // Reserve the 5 pixels around the edge of the part for the drop-on-edge cursor
- // Check if the target can handle the drop.
- if (distance >= 5) {
- // Otherwise, ask the part if it has any special meaning for this drop location
- // TODO remove cast; change return type of findPart()
- IDropTarget target = targetPart.getDropTarget(draggedObject, sourcePart, position);
- if (target != null) {
- return target;
- }
- } else {
- // We are on the boarder, try to drop on the parent
- // Warning : the parent could be the rootPart
- // System.out.println("DropTarget near the border");
- }
- //
- if (distance > 30) {
- side = SWT.CENTER;
- }
- //
- // // If the part doesn't want to override this drop location then drop on the edge
- //
- // // A "pointless drop" would be one that will put the dragged object back where it started.
- // // Note that it should be perfectly valid to drag an object back to where it came from -- however,
- // // the drop should be ignored.
- //
- @SuppressWarnings("unused")
- boolean pointlessDrop = false;
-
- if (sourcePart == targetPart) {
- pointlessDrop = true;
- }
-
- return createDropTarget(sourcePart, srcTabIndex, side, side, targetPart);
- }
- } else {
- // Cursor is outside the container
- // System.out.println("Outside container bounds");
- // This will be used to create a new Window.
- // We only allow dropping into a stack, not creating one
- // if (differentWindows)
- // return null;
-
- int side = Geometry.getClosestSide(containerDisplayBounds, position);
-
- boolean pointlessDrop = false;
- int cursor = Geometry.getOppositeSide(side);
-
- if (pointlessDrop) {
- side = SWT.NONE;
- }
-
- return createDropTarget(sourcePart, srcTabIndex, side, cursor, null);
- }
- return null;
- }
-
- };
-
-
- /**
- * Create the drop target
- */
- private DropTarget createDropTarget(final TabFolderPart sourcePart, int srcTabIndex, int side, int cursor, AbstractPart targetPart) {
- if (dropTarget == null) {
- dropTarget = new DropTarget(sourcePart, srcTabIndex, side, cursor, targetPart);
- } else {
- dropTarget.setTarget(sourcePart, srcTabIndex, side, cursor, targetPart);
- }
- return dropTarget;
- }
-
- /**
- * Class implementing methods required by drop targets.
- */
- protected class DropTarget implements IDropTarget {
-
- int count = 0;
-
- int cursor = SWT.TOP;
-
- private int side;
-
- private AbstractPanelPart targetPart;
-
- private int srcTabIndex;
-
- private TabFolderPart sourcePart;
-
- /**
- * Constructor.
- */
- public DropTarget(TabFolderPart sourcePart, int srcTabIndex, int cursor, int side, AbstractPart targetPart) {
- this.cursor = cursor;
- this.side = side;
- this.sourcePart = sourcePart;
- this.srcTabIndex = srcTabIndex;
- this.targetPart = (AbstractPanelPart) targetPart;
- }
-
- public void setTarget(TabFolderPart sourcePart, int srcTabIndex, int cursor, int side, AbstractPart targetPart) {
- this.cursor = cursor;
- this.side = side;
- this.sourcePart = sourcePart;
- this.srcTabIndex = srcTabIndex;
- this.targetPart = (AbstractPanelPart) targetPart;
- }
-
- /**
- * A folder is dropped.
- *
- * @see org.eclipse.ui.internal.dnd.IDropTarget#drop()
- */
- @Override
- public void drop() {
- // @TODO remove next cast
- if (side == SWT.CENTER) { // Add to target folder
- contentProvider.movePage(sourcePart.getPartModel(), srcTabIndex, ((TabFolderPart) targetPart).getPartModel(), -1);
- } else { // Create a new folder
- contentProvider.createFolder(sourcePart.getPartModel(), srcTabIndex, ((TabFolderPart) targetPart).getPartModel(), side);
- }
- }
-
- /**
- * Return the cursor used during drag.
- *
- * @see org.eclipse.ui.internal.dnd.IDropTarget#getCursor()
- */
- @Override
- public Cursor getCursor() {
- // System.out.println(SashWindowsContainer.this.getClass().getSimpleName() + ".getCursor()-" + count++);
- return DragCursors.getCursor(DragCursors.positionToDragCursor(cursor));
-
- }
-
- @Override
- public Rectangle getSnapRectangle() {
- // System.out.println(SashWindowsContainer.this.getClass().getSimpleName() + ".getSnapRectangle(" + "sourcePart=" + sourcePart + ", targetPart=" + targetPart + ", side=" + side);
- Rectangle targetDisplayBounds;
-
- if (targetPart != null) {
- targetDisplayBounds = DragUtil.getDisplayBounds(targetPart.getControl());
- } else {
- // targetBounds = DragUtil.getDisplayBounds(getParent());
- targetDisplayBounds = DragUtil.getDisplayBounds(container);
- }
-
- if (side == SWT.CENTER || side == SWT.NONE) {
- return targetDisplayBounds;
- }
-
- int distance = Geometry.getDimension(targetDisplayBounds, !Geometry.isHorizontal(side));
-
- return Geometry.getExtrudedEdge(targetDisplayBounds, (int) (distance * getDockingRatio(sourcePart, targetPart)), side);
- }
-
- protected float getDockingRatio(AbstractPart dragged, AbstractPart target) {
- return 0.5f;
- }
-
- }
-
-
- /**
- * @return the lifeCycleEventProvider
- */
- protected SashContainerEventsProvider getLifeCycleEventProvider() {
- return lifeCycleEventProvider;
- }
-
- /**
- * @return the folderLifeCycleEventProvider
- */
- protected SashContainerFolderEventsProvider getFolderLifeCycleEventProvider() {
- return folderLifeCycleEventProvider;
- }
-
- /**
- * Get the event provider used to throw TabMouseEvents.
- *
- * @return the TabMouseEventsProvider
- */
- public TabMouseEventsProvider getFolderTabMouseEventProvider() {
- return tabMouseEventsProvider;
- }
-
- /**
- * Return a list of all folders opened in this SashContainer. The list should only
- * be used as a 'view' list. It should not be modified or written. The list
- * is observable. <br>
- * Actually, the folders are never removed from the list. This is because
- * TabFolderPart.dispose() is never called.
- * TODO Let TabFolderPart.dispose() be called.
- *
- * @return a read only and observable list of {@link IFolder}.
- */
- @Override
- public IObservableList<IFolder> getIFolderList() {
- return folderListManager.getFolderList();
- }
-
- /**
- * Init the folderListManager and let it listen to folder events.
- */
- private void initTabFolderListManager() {
- folderLifeCycleEventProvider = new SashContainerFolderEventsProvider();
- folderListManager = new TabFolderListManager();
- // Listen to folder events.
- folderLifeCycleEventProvider.addListener(folderListManager);
- }
-
- /**
- * Add a listener on pageChanged event.
- * This implementation delegates to the internal PageTracker.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
- * @param pageChangedListener
- *
- */
- @Override
- public void addPageChangedListener(IPageChangedListener pageChangedListener) {
- activePageTracker.addPageChangedListener(pageChangedListener);
- }
-
- /**
- * Remove a listener on pageChanged event.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
- * @param pageChangedListener
- *
- */
- @Override
- public void removePageChangedListener(IPageChangedListener pageChangedListener) {
- activePageTracker.removePageChangedListener(pageChangedListener);
- }
-
- /**
- * Add a listener on Page LifeCycle events.
- * This implementation delegates to the internal PageTracker.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
- * @param listener
- *
- */
- @Override
- public void addPageLifeCycleListener(IPageLifeCycleEventsListener listener) {
- lifeCycleEventProvider.addListener(listener);
- }
-
-
- /**
- * Remove a listener on Page LifeCycle events.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
- * @param listener
- *
- */
- @Override
- public void removePageLifeCycleListener(IPageLifeCycleEventsListener listener) {
- lifeCycleEventProvider.removeListener(listener);
- }
-
- /**
- * Add a listener {@link ITabMouseEventsListener} on folder's tabs events.
- *
- * @param listener
- */
- @Override
- public void addFolderTabMouseEventListener(ITabMouseEventsListener listener) {
- tabMouseEventsProvider.addListener(listener);
- }
-
- /**
- * Add a listener {@link ITabMouseEventsListener} on folder's tabs events.
- *
- * @param listener
- */
- @Override
- public void removeFolderTabMouseEventListener(ITabMouseEventsListener listener) {
- tabMouseEventsProvider.removeListener(listener);
- }
-
- /* ***************************************************** */
- /* Internal Visitors */
- /* ***************************************************** */
-
-
- /**
- * Inner class.
- * A visitor setting the {@link MenuManager} on each folder.
- */
- private class SetFolderTabMenuVisitor extends PartVisitor {
-
-
- private MenuManager menuManager;
-
- /**
- * Constructor.
- *
- * @param menuManager
- */
- public SetFolderTabMenuVisitor(MenuManager menuManager) {
- this.menuManager = menuManager;
- }
-
- /**
- * Set the menu if the visited node is a folder.
- */
- @Override
- public boolean accept(TabFolderPart part) {
- part.setFolderTabMenuManager(menuManager);
- return true;
- }
-
- }
-
- /**
- * Inner class.
- * A visitor used to collect all visible page in the sashcontainer.
- * A visible page is a page whose the diagram area is visible.
- */
- private class CollectVisiblePageVisitor extends PartVisitor {
-
- private List<IPage> visiblePages = new ArrayList<IPage>();
-
- private Class<? extends IPage> expectedClass;
-
- /**
- * Constructor.
- *
- * @param menuManager
- */
- public CollectVisiblePageVisitor() {
-
- }
-
- /**
- * Constructor.
- *
- * @param menuManager
- */
- @SuppressWarnings("unused")
- public CollectVisiblePageVisitor(Class<? extends IPage> expectedClass) {
- this.expectedClass = expectedClass;
- }
-
- /**
- * Get the result list.
- *
- * @param <T>
- * @return
- */
- @SuppressWarnings("unchecked")
- public <T> List<T> getVisiblePages() {
- return (List<T>) visiblePages;
- }
-
- /**
- * Set the menu if the visited node is a folder.
- */
- @Override
- public boolean accept(TabFolderPart part) {
-
- IPage page = part.getVisiblePagePart();
- if (part != null) {
- if (expectedClass != null && expectedClass.isInstance(page)) {
- visiblePages.add(page);
- } else {
- visiblePages.add(page);
- }
-
- }
-
- return true;
- }
-
- }
-
- /**
- * Inner class.
- * A visitor used to collect all visible page in the sashcontainer.
- * A visible page is a page whose the diagram area is visible.
- */
- private class AbstractCollectIEditorPart extends PartVisitor {
-
- protected List<IEditorPart> editorParts = new ArrayList<IEditorPart>();
-
- /**
- * Constructor.
- *
- * @param menuManager
- */
- public AbstractCollectIEditorPart() {
-
- }
-
- /**
- * Get the result list.
- *
- * @param <T>
- * @return
- */
- public List<IEditorPart> getVisiblePages() {
- return editorParts;
- }
-
- }
-
- /**
- * Inner class.
- * A visitor used to collect all visible page in the sashcontainer.
- * A visible page is a page whose the diagram area is visible.
- */
- private class CollectVisibleIEditorPart extends AbstractCollectIEditorPart {
-
- /**
- * Set the menu if the visited node is a folder.
- */
- @Override
- public boolean accept(TabFolderPart part) {
-
- IPage page = part.getVisiblePagePart();
- if (page != null && page instanceof IEditorPage) {
- IEditorPage editorPage = (IEditorPage) page;
- editorParts.add(editorPage.getIEditorPart());
-
- }
- // continue searching
- return true;
- }
-
- }
-
- /**
- * Inner class.
- * A visitor used to collect all parts in the sashcontainer.
- * A visible page is a page whose the diagram area is visible.
- */
- @SuppressWarnings("unused")
- private class CollectIEditorParts extends AbstractCollectIEditorPart {
-
- /**
- * Add the part to thecollection.
- */
- @Override
- public boolean accept(EditorPart part) {
-
- IEditorPart editorPart = part.getIEditorPart();
- if (editorPart != null) {
- editorParts.add(editorPart);
- }
-
- // continue searching
- return true;
- }
-
- }
-
-
-
-}
+/***************************************************************************** + * Copyright (c) 2009, 2014 LIFL, CEA LIST, 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: + * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation + * Christian W. Damus (CEA) - bug 437217 + * + *****************************************************************************/ +package org.eclipse.papyrus.infra.core.sasheditor.internal; + +import static org.eclipse.papyrus.infra.core.sasheditor.Activator.log; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.atomic.AtomicBoolean; + +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.util.Geometry; +import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IComponentModel; +import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel; +import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel; +import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashWindowsContentProvider; +import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ITabFolderModel; +import org.eclipse.papyrus.infra.core.sasheditor.editor.IEditorPage; +import org.eclipse.papyrus.infra.core.sasheditor.editor.IFolder; +import org.eclipse.papyrus.infra.core.sasheditor.editor.IPage; +import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener; +import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageLifeCycleEventsListener; +import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageVisitor; +import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer; +import org.eclipse.papyrus.infra.core.sasheditor.editor.ITabMouseEventsListener; +import org.eclipse.papyrus.infra.core.sasheditor.utils.IObservableList; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CTabFolder; +import org.eclipse.swt.events.DisposeEvent; +import org.eclipse.swt.events.DisposeListener; +import org.eclipse.swt.graphics.Cursor; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.internal.DragCursors; +import org.eclipse.ui.internal.dnd.DragUtil; +import org.eclipse.ui.internal.dnd.IDragOverListener; +import org.eclipse.ui.internal.dnd.IDropTarget; + + +/** + * Main entry class of the SashWindows system. + * This class allows to have a multitab window with sashes. + * The class require a ContentProvider describing the content to be shown. + * + * @author dumoulin + */ +@SuppressWarnings("restriction") +public class SashWindowsContainer implements ISashWindowsContainer { + + /** + * The content provider describing the sashes, folders and tabs. + */ + private ISashWindowsContentProvider contentProvider; + + /** + * The manager used to get Main editor properties like Site, ActionBars, ... + */ + private IMultiEditorManager multiEditorManager; + + /** + * Tracker tracking the current active page. The tracker also disconnect last active page and connect + * the new one. + */ + private ActivePageTracker activePageTracker; + + /** + * Event provider firing Pages life cycle events to registered listeners. Inner parts call the fireXxxEvents + * when appropriate. + */ + private SashContainerEventsProvider lifeCycleEventProvider; + + /** + * Event provider firing Folder life cycle events to registered listeners. Inner parts call the fireXxxEvents + * when appropriate. + */ + private SashContainerFolderEventsProvider folderLifeCycleEventProvider; + + /** + * Event provider firing mouse events from tabs. + * + */ + private TabMouseEventsProvider tabMouseEventsProvider; + + /** + * A manager used to maintain a view list of available {@link TabFolderPart}. This list should + * only be used in a READ way. It should not be modified by something else than its manager. + * + */ + private TabFolderListManager folderListManager; + + /** + * The part used as root. We use an extra class as root in order to separate the code dedicated to + * ITilePart. + */ + private RootPart rootPart; + + /** + * The SWT container associated to this part. This is generally the container of the + * parent. + */ + private Composite container; + + /** + * The drop target. + */ + protected DropTarget dropTarget; + + /** A flag that indicates that the model is being synchronized. */ + private AtomicBoolean isRefreshing = new AtomicBoolean(false); + + /** + * The cached value of the menu manager, if any. + */ + private MenuManager folderTabMenuManager; + + /** + * Listener on widget diposed event. + */ + private DisposeListener widgetDisposedListener = new DisposeListener() { + + /** + * Called when the widget is disposed. + * + * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent) + * + * @param e + */ + @Override + public void widgetDisposed(DisposeEvent e) { + // We dispose the container. + dispose(); + } + }; + + /** + * Constructor. + * Build a Container without IEditor management. Trying to add a EditorPart will result in an Exception. + * The ContentProvider should not contain IEditorModel. + */ + public SashWindowsContainer() { + this(null); + } + + /** + * Constructor. + * Build a container with EditorPart management. The container will allow to add EditorPart + * (and thus IEditorModel to the ContentProvider). + * + * @param multiEditorManager + * The manager allowing to use {@link IEditorModel} in the model. + * If null, the sash will not render IEditorModel. + * + */ + public SashWindowsContainer(IMultiEditorManager multiEditorManager) { + this.multiEditorManager = multiEditorManager; + activePageTracker = new ActivePageTracker(); + + if (multiEditorManager != null) { + // Add listener on activePageChange. + // This listener will take in charge editor services switching. + activePageTracker.addActiveEditorChangedListener(new ActiveEditorServicesSwitcher(multiEditorManager.getEditorSite())); + } + + // Life cycle event provider + lifeCycleEventProvider = new SashContainerEventsProvider(); + + // Tab mouve event provider + tabMouseEventsProvider = new TabMouseEventsProvider(); + + // Folder list view + initTabFolderListManager(); + } + + /** + * @return the contentProvider + */ + protected ISashWindowsContentProvider getContentProvider() { + // Content provider should have been set. + assert (contentProvider != null); + // Double check for development + if (contentProvider == null) { + throw new IllegalStateException("ContentProvider should be set before calling any method requiring it."); + } + + return contentProvider; + } + + /** + * Set the content provider describing the sashes, folders and tabs. + * + * @param contentProvider + * the contentProvider to set + */ + public void setContentProvider(ISashWindowsContentProvider contentProvider) { + // Use a delegate + // The delegate is used as a central point performing calls to the + // external implementation. + this.contentProvider = new DelegateContentProvider(contentProvider); + } + + /** + * Creates control associated to this Container. + * This method should be called when the parent is build. + * + * @param parent + * The parent in which the editor should be created; must not be <code>null</code>. + */ + public void createPartControl(Composite parent) { + this.container = parent; + + rootPart = createRootPart(); + // Create the tree of tile part. + rootPart.createPartControl(container); + // TODO 20130205 + // Read lastActivePart from ContentProvider, and set it + // before refresh. Like this, sash will select the last save page + + // Create children + refreshTabs(); + // Set selection + // TODO 20130205 remove next, because refresh already do it + selectPage(lookupFirstValidPage()); + + // postCreatePartControl(); + // TODO reactivate next + initDrag(container); + // activate(); + + // Listen for disposale + container.addDisposeListener(widgetDisposedListener); + } + + /** + * Create the root part for the model. + */ + private RootPart createRootPart() { + RootPart part = new RootPart(this); + return part; + } + + /** + * Dispose the Container. All referenced resources will be disposed. + * The container should not be used anymore once disposed. + * The result of calling a method after a dispose() is unpredictable. <br> + * This method can be called several times. <br> + * <br> + * How the method works: + * <ul> + * <li>The {@link SashWindowsContainer} has two trees, the SWT tree and a Part tree ({@link #rootPart}).</li> + * <li>The SWT tree is disposed first.</li> + * <ul> + * <li>This prevent events fired from user interaction or from Widget modifiaction</li> + * <li>The SWT disposal stop before nested editors SWT (thanks to the DISPOSE event in {@link EditorPart}). At this point, the nested editor dispose() method is called.</li> + * <li>This allow to let the nested editor receive one single dispose call.</li> + * <li></li> + * </ul> + * <li>The Part tree is disposed second (by calling rootPart.disposeThisAndChildren() )</li> + * <ul> + * <li>properties are cleaned in order to help the GC</li> + * <li>swt controls are not disposed again</li> + * </ul> + * <li></li> <li></li> <li></li> <li></li> <li></li> </ul> + * + */ + public void dispose() { + // Check if already disposed + if (isDisposed()) { + return; + } + + // End disposing children's SWT controls. + // It is possible to recall the dispose() method on a Widget, even if we are called by the dispose event. + // Recalling the dispose method will continue disposing SWT children's. + + // DO NOT dispose the container composite, as we did not create it! + if (container != null) { + for (Control next : container.getChildren()) { + next.dispose(); + } + } + + // dispose part children + if (rootPart != null) { + // rootPart can be null if createPartControl has not been called. + // This can happen in tests. + rootPart.disposeThisAndChildren(); + } + + // clean up properties to help GC + activePageTracker = null; + container = null; + contentProvider = null; + dragOverListener = null; + folderTabMenuManager = null; + lifeCycleEventProvider = null; + multiEditorManager = null; + rootPart = null; + } + + /** + * Return true if the container is disposed, false otherwise. + * + * @return + */ + @Override + public boolean isDisposed() { + // Use the activePageTracker as a flag. + return activePageTracker == null; + } + + /** + * Notifies this page container that the specified page has been activated. This method + * is called after the current tabs has been changed, either by refreshing the tabs, or by a user + * UI action. + * This method just set correctly the active page value in the Container, and fire pageChanged events if needed. + * It does not change the selected page in the Part. + * + * Propagate the event to activePageTracker. + * Removed since 0.10 + * + * @param childPart + */ + // protected void pageChanged(PagePart childPart) { + // activePageTracker.setActiveEditor(childPart); + // lifeCycleEventProvider.firePageActivatedEvent(childPart); + // } + + /** + * Notifies this page container that a pageChanged event has been fired by one swt Control. + * This method is usually called after the user selects a different tab. + * + * The method notify the ContentProvider, and calls {@link #pageChanged(PagePart)}. + * Removed since 0.10 + * + * @param childPart + */ + // protected void pageChangedEvent(PagePart childPart) { + // + // // Check if it is really a change before changing the model (which can throw change event) + // // The folder model change is done before the tracker fires the listeners, like this + // // listeners can check the model. + // if(getActivePage() == childPart) + // return; + // + // pageChanged(childPart); + // } + + /** + * Set the active page. The current active page will be the specified page. Throw events indicating that + * the current ActivePage has changed. <br> + * Do not set the activeSelection. + * + * + * @param childPart + */ + protected void setActivePage(PagePart childPart) { + + // Do nothing if the activePage has not changed + if (childPart == null || getActivePage() == childPart) { + return; + } + + // TODO 20130205 remove next + contentProvider.setCurrentFolder(childPart.getParent().getRawModel()); + + activePageTracker.setActiveEditor(childPart); + lifeCycleEventProvider.firePageActivatedEvent(childPart); + } + + /** + * This method allow to change current activePage. It set the activePage, and select it in + * the folder. <br> + * This method fires notifications (activePageChanged). + * + * @param newActivePage + * The page that should become the active one. + */ + protected void setActivePageAndSelection(PagePart newActivePage) { + + PagePart oldSelection = getActivePage(); + // First, set the selection, like this the observers will see the correct selection. + synchronizeActiveSelection(newActivePage); + try { + // Set the active page + setActivePage(newActivePage); + + } catch (RuntimeException e) { + // Restore selection in case of exception + synchronizeActiveSelection(oldSelection); + // lets propagate + throw e; + } + } + + /** + * Synchronize the active selection to be the page of the activePage. + * This should be called when the activePage is set, but the selection is not + * yet set. <br> + * This should not throw events (neither selctionChanged or pageChanged event). + * + */ + protected void synchronizeActiveSelection() { + PagePart activePage = getActivePage(); + + synchronizeActiveSelection(activePage); + } + + /** + * Synchronize the active selection to be the specified page. Do not synchronize with the activePage. <br> + * This should not throw events (neither selctionChanged or pageChanged event). + * + * @param page + */ + private void synchronizeActiveSelection(PagePart page) { + if (page == null) { + return; + } + TabFolderPart folder = page.getParent(); + + // Folder can be null in case of tests + if (folder != null) { + folder.setSelection(page); + } + + } + + /** + * A change has happen in one of the inner parts. Relay the event. + * This method is called by inner parts whenever the event happen in one of the part. + * It collects and relay the firePropertyChange(int propertyId) calls from the inner IEditor. + * + * @param propertyId + */ + protected void firePropertyChange(int propertyId) { + // For now, we do nothing with this event. + } + + /** + * Create the part for the specified newModel. + * + * @param parent + * The parent of the created part. + * @param partModel + * The model for which a part should be created. + * @return + */ + protected PagePart createPagePart(TabFolderPart parent, IPageModel partModel, Object rawModel) { + + + if (partModel instanceof IEditorModel) { + // Check if we can use IEditorModel + if (multiEditorManager == null) { + throw new IllegalArgumentException("Container can't accept IEditorModel as no IMultiEditorManager is set. Please set a IMultiEditorManager."); + } + + return new EditorPart(parent, (IEditorModel) partModel, rawModel, multiEditorManager); + } else if (partModel instanceof IComponentModel) { + return new ComponentPart(parent, (IComponentModel) partModel, rawModel); + } else { + // Return a default part + } + + // TODO return a default part showing an error instead. + throw new IllegalArgumentException("No Part found for the model '" + rawModel + "'"); + } + + /** + * Get the {@link ITabFolderModel} of the currently selected folder. + * + * @return + */ + @Override + public ITabFolderModel getSelectedTabFolderModel() { + + // Get the activePage. The seleted folder is its parent. + PagePart activePage = activePageTracker.getActiveEditor(); + if (activePage != null && activePage.getParent() != null) { + return activePage.getParent().getPartModel(); + } + // No active page exist, but their should be a folder + TabFolderPart folder = lookupFirstValidFolder(); + return folder.getPartModel(); + } + + /** + * Lookup the first valid folder in this sash system. + * There is always a valid folder. + * + * @return The first valid folder. + */ + private TabFolderPart lookupFirstValidFolder() { + + LookupFirstFolderVisitor visitor = new LookupFirstFolderVisitor(); + rootPart.visit(visitor); + return visitor.result(); + } + + /** + * Get the active page. + * + * @return + */ + private PagePart getActivePage() { + return activePageTracker.getActiveEditor(); + } + + /** + * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#getActiveEditor() + * @return + * + */ + @Override + public IEditorPart getActiveEditor() { + PagePart pagePart = getActivePage(); + if (pagePart instanceof EditorPart) { + return ((EditorPart) pagePart).getIEditorPart(); + } else { + return null; + } + } + + /** + * Get the active page public API. + * + * @return + */ + @Override + public IPage getActiveSashWindowsPage() { + return getActivePage(); + } + + /** + * Get the list of visible IPages. The visible IPages are the one that have there diagram area + * visible. + * + * @return + */ + @Override + public List<IPage> getVisiblePages() { + CollectVisiblePageVisitor visitor = new CollectVisiblePageVisitor(); + + rootPart.visit(visitor); + + return visitor.getVisiblePages(); + } + + /** + * + * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#getNextPage() + * + * @return + */ + @Override + public IPage getNextPage() { + CollectNextPageVisitor visitor = new CollectNextPageVisitor(false); + return getPage(visitor); + } + + /** + * + * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#getNextPage() + * + * @return + */ + @Override + public IPage getPreviousPage() { + CollectNextPageVisitor visitor = new CollectNextPageVisitor(true); + return getPage(visitor); + } + + /** + * Use the provided visitor to get the next page and return it. + */ + private IPage getPage(CollectNextPageVisitor visitor) { + if (visitor != null) { + rootPart.visit(visitor); + if (!visitor.getNextPages().isEmpty()) { + return (IPage) visitor.getNextPages().get(0); + } + } + return null; + } + + /** + * Get the list of visible IPages. The visible IPages are the one that have there diagram area + * visible. + * + * @return + */ + // public List<IEditorPage> getVisibleIEditorPages() { + // CollectVisiblePageVisitor visitor = new CollectVisiblePageVisitor( IEditorPage.class); + // + // rootPart.visit(visitor); + // + // return visitor.getVisiblePages(); + // } + + /** + * Get the list of visible IPages. The visible IPages are the one that have there diagram area + * visible. + * + * @return + */ + @Override + public List<IEditorPart> getVisibleIEditorParts() { + CollectVisibleIEditorPart visitor = new CollectVisibleIEditorPart(); + rootPart.visit(visitor); + + return visitor.getVisiblePages(); + } + + + /** + * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#setFocus() + * + */ + @Override + public void setFocus() { + setFocus(getActivePage()); + } + + /** + * Sets focus to the control for the given page. If the page has an editor, + * this calls its <code>setFocus()</code> method. Otherwise, this calls <code>setFocus</code> on the control for the page. + * + * @param pageIndex + * the index of the page + */ + private void setFocus(PagePart part) { + if (part != null) { + part.setFocus(); + } + } + + + /** + * Refresh the tabs. + * Is we are already currently refreshing, simply return. + * + * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#refreshTabs() + * + */ + @Override + public void refreshTabs() { + + // Check if we arent already refreshing + if (isRefreshing.compareAndSet(false, true)) { + try { + refreshTabsInternal(); + } finally { + isRefreshing.set(false); + } + } else { + log.warn("refresh inside refresh !"); + } + + } + + /** + * Refresh the tab of the page, (i.e the name and icon in the page's tab). + * + * @param page + * The page for which the name and icon should be refreshed. + */ + public void refreshPageTab(IPage page) { + if (page instanceof PagePart) { + ((PagePart) page).refreshTab(); + } else { + // TODO : lookup for the corresponding PagePart, and call refresh. + + } + } + + /** + * Real implementation of refreshTab. + * + * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#refreshTabs() + * + */ + private void refreshTabsInternal() { + // System.out.println("start synchronize2() ------------------------"); + // showTilesStatus(); + + // Get the currently selected folder + PagePart oldActivePage = getActivePage(); + + // Do refresh + container.setRedraw(false); + // Create map of parts + // PartMap<T> partMap = new PartMap<T>(); + PartLists garbageMaps = new PartLists(); + rootPart.fillPartMap(garbageMaps); + + // Synchronize parts + rootPart.synchronize2(garbageMaps); + + + // Remove orphaned parts (no more used) + garbageMaps.garbage(); + + // set active page if needed + setActivePageAndSelection(checkAndGetActivePage(oldActivePage, garbageMaps)); + + // Reenable SWT and force layout + container.setRedraw(true); + container.layout(true, true); + // System.out.println("end synchronize2() ------------------------"); + // showTilesStatus(); + } + + /** + * Select the specified page in the Parts. The specified page will becomes the active one. + * Appropriate events are fired. + * This is the programatic counterpart of selecting a page in the UI. + * If the provided page is null, do nothing. + * Removed since 0.10 + * + * @param page + * The page to select or null. + */ + // protected void selectPage(PagePart page) { + // if(page == null) + // return; + // TabFolderPart folder = page.getParent(); + // folder.setActiveEditor(page); + // } + + /** + * Select the specified page in the Parts. The specified page will becomes the active one. + * Appropriate events are fired if needed. + * This is the programmatic counterpart of selecting a page in the UI. + * If the provided page is null, do nothing. + * + * @param page + * The page to select or null. The IPage should + * be an instance previously returned by the SashContainer. + * + */ + @Override + public void selectPage(IPage page) { + if (page == null) { + return; + } + + // check if we are a correct instance. + if (!(page instanceof PagePart)) { + return; + } + + setActivePageAndSelection((PagePart) page); + } + + /** + * Lookup the {@link IPage} used to render the specified rawModel. + * + * @param rawModel + * The model for which the IPage is requested. + * If the model is not rendered, return null; + * + * @return The corresponding IPage or null if not found. + */ + @Override + public IPage lookupModelPage(Object rawModel) { + // Use a visitor to lookup the first IPage + LookupModelPageVisitor visitor = new LookupModelPageVisitor(rawModel); + rootPart.visit(visitor); + return visitor.result(); + } + + /** + * Lookup the {@link IPage} used to render the specified IEditorPart. + * + * @param editor + * The IEditorPart for which the IPage is requested. + * If the IEditorPart is not rendered, return null; + * + * @return The corresponding IPage or null if not found. + */ + @Override + public IPage lookupIPageByIEditorPart(IEditorPart editor) { + // Use a visitor to lookup the first IPage + LookupIPageByIEditorPartVisitor visitor = new LookupIPageByIEditorPartVisitor(editor); + rootPart.visit(visitor); + return visitor.result(); + } + + /** + * Check if the oldActivePage still alive, and set it if needed. + * If the oldActivePage is null, set an active page if one exist. + * If the oldActivePage still alive, let it as the active one. If it is + * disposed, get arbitrarily an active page if one exist. + * + * @param oldActivePage + * @param partLists + * @param garbageMaps + * @return A valid active page or null if none exists. + */ + private PagePart checkAndGetActivePage(PagePart oldActivePage, PartLists partLists) { + + // Check if there is a created page + PagePart activePage = partLists.getFirstCreatedPage(); + if (activePage != null) { + // There is a created page. Set it as the selected and active one + return activePage; + } + + // Check oldActivePage validity (in case it has been deleted) + if (oldActivePage != null && !(oldActivePage.isOrphaned() || oldActivePage.isUnchecked())) { + return oldActivePage; + } + + // Get an active page if any + return lookupFirstValidPage(); + } + + /** + * Lookup for a valid active Page. Return null if none is found. + * TODO Use a visitor to implements this method. + * + * @return + */ + private PagePart lookupFirstValidPage() { + // First get a list of active editors + PartLists garbageMaps = new PartLists(); + rootPart.fillPartMap(garbageMaps); + return garbageMaps.getFirstValidPage(); + } + + /** + * Set a {@link MenuManager} used to manage a contextual menu that is shown on the tabs area of the folders. + * + * @param menuManager + * The {@link MenuManager} used to create the menu on the tab area. + */ + @Override + public void setFolderTabMenuManager(MenuManager menuManager) { + this.folderTabMenuManager = menuManager; + // Set the MenuManager in each existing folder. + // Use a visitor. + SetFolderTabMenuVisitor visitor = new SetFolderTabMenuVisitor(menuManager); + rootPart.visit(visitor); + } + + /** + * @return the menuManager + */ + protected MenuManager getFolderTabMenuManager() { + return folderTabMenuManager; + } + + /** + * Show the status of the different Tiles composing the sash system. + * Used for debug purpose. + */ + public void showTilesStatus() { + ShowPartStatusVisitor visitor = new ShowPartStatusVisitor(); + rootPart.visit(visitor); + } + + + /** + * Visit all the Pages (IEditorPage and IComponentPage), allowing to access to the public interface. + */ + @Override + public void visit(IPageVisitor pageVisitor) { + PageVisitorWrapper visitor = new PageVisitorWrapper(pageVisitor); + rootPart.visit(visitor); + } + + /** + * Visit the Part associated to the container. This method visibility is protected in order to be able to access it + * from junit tests. + * It is not intended to be used by public API or from outside. + */ + protected void visit(IPartVisitor visitor) { + rootPart.visit(visitor); + } + + /* ***************************************************** */ + /* Drag and Drop methods */ + /* ***************************************************** */ + + /** + * + */ + private void initDrag(Composite container) { + DragUtil.addDragTarget(container, dragOverListener); + + } + + IDragOverListener dragOverListener = new IDragOverListener() { + + /** + * + * @see org.eclipse.ui.internal.dnd.IDragOverListener#drag(org.eclipse.swt.widgets.Control, java.lang.Object, org.eclipse.swt.graphics.Point, org.eclipse.swt.graphics.Rectangle) + */ + @Override + public IDropTarget drag(Control currentControl, Object draggedObject, Point position, Rectangle dragRectangle) { + // TODO remove the cast by changing the method. Only folder can be source and target + final TabFolderPart sourcePart = (TabFolderPart) rootPart.findPart(draggedObject); // (ITilePart) draggedObject; + // Compute src tab index + // TODO move that and previous in the sender of drag event. Use a class containing both as draggedObject. + final int srcTabIndex = PTabFolder.getDraggedObjectTabIndex(draggedObject); + + // System.out.println("drag to position=" + position); + Rectangle containerDisplayBounds = DragUtil.getDisplayBounds(container); + AbstractPanelPart targetPart = null; + + // Check if the cursor is inside the container + if (containerDisplayBounds.contains(position)) { + + if (rootPart != null) { + targetPart = (AbstractPanelPart) rootPart.findPart(position); + // System.out.println("targetPart=" + targetPart + // + ", position=" + position + // + "container.toControl(position)=" + container.toControl(position)); + } + + if (targetPart != null) { + final Control targetControl = targetPart.getControl(); + + final Rectangle targetBounds = DragUtil.getDisplayBounds(targetControl); + + int side = Geometry.getClosestSide(targetBounds, position); + int distance = Geometry.getDistanceFromEdge(targetBounds, position, side); + + // Reserve the 5 pixels around the edge of the part for the drop-on-edge cursor + // Check if the target can handle the drop. + if (distance >= 5) { + // Otherwise, ask the part if it has any special meaning for this drop location + // TODO remove cast; change return type of findPart() + IDropTarget target = targetPart.getDropTarget(draggedObject, sourcePart, position); + if (target != null) { + return target; + } + } else { + // We are on the boarder, try to drop on the parent + // Warning : the parent could be the rootPart + // System.out.println("DropTarget near the border"); + } + // + if (distance > 30) { + side = SWT.CENTER; + } + // + // // If the part doesn't want to override this drop location then drop on the edge + // + // // A "pointless drop" would be one that will put the dragged object back where it started. + // // Note that it should be perfectly valid to drag an object back to where it came from -- however, + // // the drop should be ignored. + // + @SuppressWarnings("unused") + boolean pointlessDrop = false; + + if (sourcePart == targetPart) { + pointlessDrop = true; + } + + return createDropTarget(sourcePart, srcTabIndex, side, side, targetPart); + } + } else { + // Cursor is outside the container + // System.out.println("Outside container bounds"); + // This will be used to create a new Window. + // We only allow dropping into a stack, not creating one + // if (differentWindows) + // return null; + + int side = Geometry.getClosestSide(containerDisplayBounds, position); + + boolean pointlessDrop = false; + int cursor = Geometry.getOppositeSide(side); + + if (pointlessDrop) { + side = SWT.NONE; + } + + return createDropTarget(sourcePart, srcTabIndex, side, cursor, null); + } + return null; + } + + }; + + + /** + * Create the drop target + */ + private DropTarget createDropTarget(final TabFolderPart sourcePart, int srcTabIndex, int side, int cursor, AbstractPart targetPart) { + if (dropTarget == null) { + dropTarget = new DropTarget(sourcePart, srcTabIndex, side, cursor, targetPart); + } else { + dropTarget.setTarget(sourcePart, srcTabIndex, side, cursor, targetPart); + } + return dropTarget; + } + + /** + * Class implementing methods required by drop targets. + */ + protected class DropTarget implements IDropTarget { + + int count = 0; + + int cursor = SWT.TOP; + + private int side; + + private AbstractPanelPart targetPart; + + private int srcTabIndex; + + private TabFolderPart sourcePart; + + /** + * Constructor. + */ + public DropTarget(TabFolderPart sourcePart, int srcTabIndex, int cursor, int side, AbstractPart targetPart) { + this.cursor = cursor; + this.side = side; + this.sourcePart = sourcePart; + this.srcTabIndex = srcTabIndex; + this.targetPart = (AbstractPanelPart) targetPart; + } + + public void setTarget(TabFolderPart sourcePart, int srcTabIndex, int cursor, int side, AbstractPart targetPart) { + this.cursor = cursor; + this.side = side; + this.sourcePart = sourcePart; + this.srcTabIndex = srcTabIndex; + this.targetPart = (AbstractPanelPart) targetPart; + } + + /** + * A folder is dropped. + * + * @see org.eclipse.ui.internal.dnd.IDropTarget#drop() + */ + @Override + public void drop() { + // @TODO remove next cast + if (side == SWT.CENTER) { // Add to target folder + contentProvider.movePage(sourcePart.getPartModel(), srcTabIndex, ((TabFolderPart) targetPart).getPartModel(), -1); + } else { // Create a new folder + contentProvider.createFolder(sourcePart.getPartModel(), srcTabIndex, ((TabFolderPart) targetPart).getPartModel(), side); + } + } + + /** + * Return the cursor used during drag. + * + * @see org.eclipse.ui.internal.dnd.IDropTarget#getCursor() + */ + @Override + public Cursor getCursor() { + // System.out.println(SashWindowsContainer.this.getClass().getSimpleName() + ".getCursor()-" + count++); + return DragCursors.getCursor(DragCursors.positionToDragCursor(cursor)); + + } + + @Override + public Rectangle getSnapRectangle() { + // System.out.println(SashWindowsContainer.this.getClass().getSimpleName() + ".getSnapRectangle(" + "sourcePart=" + sourcePart + ", targetPart=" + targetPart + ", side=" + side); + Rectangle targetDisplayBounds; + + if (targetPart != null) { + targetDisplayBounds = DragUtil.getDisplayBounds(targetPart.getControl()); + } else { + // targetBounds = DragUtil.getDisplayBounds(getParent()); + targetDisplayBounds = DragUtil.getDisplayBounds(container); + } + + if (side == SWT.CENTER || side == SWT.NONE) { + return targetDisplayBounds; + } + + int distance = Geometry.getDimension(targetDisplayBounds, !Geometry.isHorizontal(side)); + + return Geometry.getExtrudedEdge(targetDisplayBounds, (int) (distance * getDockingRatio(sourcePart, targetPart)), side); + } + + protected float getDockingRatio(AbstractPart dragged, AbstractPart target) { + return 0.5f; + } + + } + + + /** + * @return the lifeCycleEventProvider + */ + protected SashContainerEventsProvider getLifeCycleEventProvider() { + return lifeCycleEventProvider; + } + + /** + * @return the folderLifeCycleEventProvider + */ + protected SashContainerFolderEventsProvider getFolderLifeCycleEventProvider() { + return folderLifeCycleEventProvider; + } + + /** + * Get the event provider used to throw TabMouseEvents. + * + * @return the TabMouseEventsProvider + */ + public TabMouseEventsProvider getFolderTabMouseEventProvider() { + return tabMouseEventsProvider; + } + + /** + * Return a list of all folders opened in this SashContainer. The list should only + * be used as a 'view' list. It should not be modified or written. The list + * is observable. <br> + * Actually, the folders are never removed from the list. This is because + * TabFolderPart.dispose() is never called. + * TODO Let TabFolderPart.dispose() be called. + * + * @return a read only and observable list of {@link IFolder}. + */ + @Override + public IObservableList<IFolder> getIFolderList() { + return folderListManager.getFolderList(); + } + + /** + * Init the folderListManager and let it listen to folder events. + */ + private void initTabFolderListManager() { + folderLifeCycleEventProvider = new SashContainerFolderEventsProvider(); + folderListManager = new TabFolderListManager(); + // Listen to folder events. + folderLifeCycleEventProvider.addListener(folderListManager); + } + + /** + * Add a listener on pageChanged event. + * This implementation delegates to the internal PageTracker. + * + * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener) + * @param pageChangedListener + * + */ + @Override + public void addPageChangedListener(IPageChangedListener pageChangedListener) { + activePageTracker.addPageChangedListener(pageChangedListener); + } + + /** + * Remove a listener on pageChanged event. + * + * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener) + * @param pageChangedListener + * + */ + @Override + public void removePageChangedListener(IPageChangedListener pageChangedListener) { + activePageTracker.removePageChangedListener(pageChangedListener); + } + + /** + * Add a listener on Page LifeCycle events. + * This implementation delegates to the internal PageTracker. + * + * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener) + * @param listener + * + */ + @Override + public void addPageLifeCycleListener(IPageLifeCycleEventsListener listener) { + lifeCycleEventProvider.addListener(listener); + } + + + /** + * Remove a listener on Page LifeCycle events. + * + * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener) + * @param listener + * + */ + @Override + public void removePageLifeCycleListener(IPageLifeCycleEventsListener listener) { + lifeCycleEventProvider.removeListener(listener); + } + + /** + * Add a listener {@link ITabMouseEventsListener} on folder's tabs events. + * + * @param listener + */ + @Override + public void addFolderTabMouseEventListener(ITabMouseEventsListener listener) { + tabMouseEventsProvider.addListener(listener); + } + + /** + * Add a listener {@link ITabMouseEventsListener} on folder's tabs events. + * + * @param listener + */ + @Override + public void removeFolderTabMouseEventListener(ITabMouseEventsListener listener) { + tabMouseEventsProvider.removeListener(listener); + } + + /* ***************************************************** */ + /* Internal Visitors */ + /* ***************************************************** */ + + + /** + * Inner class. + * A visitor setting the {@link MenuManager} on each folder. + */ + private class SetFolderTabMenuVisitor extends PartVisitor { + + + private MenuManager menuManager; + + /** + * Constructor. + * + * @param menuManager + */ + public SetFolderTabMenuVisitor(MenuManager menuManager) { + this.menuManager = menuManager; + } + + /** + * Set the menu if the visited node is a folder. + */ + @Override + public boolean accept(TabFolderPart part) { + part.setFolderTabMenuManager(menuManager); + return true; + } + + } + + /** + * Inner class. + * A visitor used to collect all visible page in the sashcontainer. + * A visible page is a page whose the diagram area is visible. + */ + private class CollectVisiblePageVisitor extends PartVisitor { + + private List<IPage> visiblePages = new ArrayList<IPage>(); + + private Class<? extends IPage> expectedClass; + + /** + * Constructor. + * + * @param menuManager + */ + public CollectVisiblePageVisitor() { + + } + + /** + * Constructor. + * + * @param menuManager + */ + @SuppressWarnings("unused") + public CollectVisiblePageVisitor(Class<? extends IPage> expectedClass) { + this.expectedClass = expectedClass; + } + + /** + * Get the result list. + * + * @param <T> + * @return + */ + @SuppressWarnings("unchecked") + public <T> List<T> getVisiblePages() { + return (List<T>) visiblePages; + } + + /** + * Set the menu if the visited node is a folder. + */ + @Override + public boolean accept(TabFolderPart part) { + + IPage page = part.getVisiblePagePart(); + if (part != null) { + if (expectedClass != null && expectedClass.isInstance(page)) { + visiblePages.add(page); + } else { + visiblePages.add(page); + } + + } + + return true; + } + + } + + /** + * Inner class. + * A visitor used to collect the next page of the next opened tab (right or left). + * A tab is opened if it is visible in the editor. + */ + private class CollectNextPageVisitor extends PartVisitor { + + private List<IPage> nextPages = new ArrayList<IPage>(); + + private final boolean isPrevious; + + /** + * Constructor + */ + public CollectNextPageVisitor(boolean isPrevious) { + this.isPrevious = isPrevious; + } + + /** + * Get the results list. + */ + public List<IPage> getNextPages() { + return nextPages; + } + + /** + * Get the index of the currently active tab and then increments/decrements the index by 1 + * to select the next/previous tab. The page of the tab is returned. + */ + @Override + public boolean accept(TabFolderPart part) { + PagePart activePage = activePageTracker.getActiveEditor(); + PagePart visiblePage = part.getVisiblePagePart(); + + if (activePage == visiblePage) { + CTabFolder tabFolder = part.getTabFolder(); + int itemCount = tabFolder.getItemCount(); + + if (itemCount > 1) { + int selectionIndex = tabFolder.getSelectionIndex(); + + if (isPrevious) { + selectionIndex--; + if (selectionIndex < 0) { + selectionIndex = itemCount - 1; + } + } else { + selectionIndex++; + if (selectionIndex >= itemCount) { + selectionIndex = 0; + } + } + + IPage nextPage = part.getPagePart(selectionIndex); + if (nextPage != null) { + nextPages.add(nextPage); + } + } + } + + return true; + } + } + + /** + * Inner class. + * A visitor used to collect all visible page in the sashcontainer. + * A visible page is a page whose the diagram area is visible. + */ + private class AbstractCollectIEditorPart extends PartVisitor { + + protected List<IEditorPart> editorParts = new ArrayList<IEditorPart>(); + + /** + * Constructor. + * + * @param menuManager + */ + public AbstractCollectIEditorPart() { + + } + + /** + * Get the result list. + * + * @param <T> + * @return + */ + public List<IEditorPart> getVisiblePages() { + return editorParts; + } + + } + + /** + * Inner class. + * A visitor used to collect all visible page in the sashcontainer. + * A visible page is a page whose the diagram area is visible. + */ + private class CollectVisibleIEditorPart extends AbstractCollectIEditorPart { + + /** + * Set the menu if the visited node is a folder. + */ + @Override + public boolean accept(TabFolderPart part) { + + IPage page = part.getVisiblePagePart(); + if (page != null && page instanceof IEditorPage) { + IEditorPage editorPage = (IEditorPage) page; + editorParts.add(editorPage.getIEditorPart()); + + } + // continue searching + return true; + } + + } + + /** + * Inner class. + * A visitor used to collect all parts in the sashcontainer. + * A visible page is a page whose the diagram area is visible. + */ + @SuppressWarnings("unused") + private class CollectIEditorParts extends AbstractCollectIEditorPart { + + /** + * Add the part to thecollection. + */ + @Override + public boolean accept(EditorPart part) { + + IEditorPart editorPart = part.getIEditorPart(); + if (editorPart != null) { + editorParts.add(editorPart); + } + + // continue searching + return true; + } + + } + + + +} diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF index f3a12619561..da6b819d9a8 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/META-INF/MANIFEST.MF @@ -59,7 +59,6 @@ Require-Bundle: org.eclipse.emf.edit.ui;bundle-version="2.5.0", org.eclipse.core.databinding.property;bundle-version="1.4.200", org.eclipse.gmf.runtime.draw2d.ui.render;bundle-version="1.4.1", org.eclipse.core.expressions, - org.eclipse.papyrus.uml.tools;bundle-version="1.1.0", org.apache.batik.util;bundle-version="[1.6.0,1.7.0)", org.apache.batik.svggen;bundle-version="[1.6.0,1.7.0)", org.w3c.dom.svg;bundle-version="1.1.0", @@ -74,7 +73,6 @@ Require-Bundle: org.eclipse.emf.edit.ui;bundle-version="2.5.0", org.eclipse.papyrus.infra.services.markerlistener;bundle-version="1.1.0", org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0", org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0", - org.eclipse.papyrus.uml.tools;bundle-version="1.1.0", org.eclipse.gmf.runtime.diagram.ui.providers;bundle-version="1.7.0", org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.1.0", org.eclipse.papyrus.infra.elementtypesconfigurations;bundle-version="1.1.0", @@ -83,7 +81,7 @@ Require-Bundle: org.eclipse.emf.edit.ui;bundle-version="2.5.0", org.eclipse.core.runtime, org.eclipse.emf.ecore;visibility:=reexport, org.eclipse.emf.ecore.xmi;visibility:=reexport, - org.eclipse.papyrus.uml.extensionpoints;bundle-version="1.1.0" + org.eclipse.papyrus.uml.tools;bundle-version="1.1.0" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-ClassPath: . diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/DiagramExpansionsRegistry.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/DiagramExpansionsRegistry.java index 56fcfbbff2b..2e6186013f3 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/DiagramExpansionsRegistry.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/expansion/DiagramExpansionsRegistry.java @@ -24,29 +24,27 @@ import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; import org.eclipse.emf.ecore.util.Diagnostician; import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; -import org.eclipse.papyrus.infra.core.services.IServiceFactory; import org.eclipse.papyrus.infra.gmfdiag.common.Activator; import org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.DiagramExpansion; -import org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.ExpansionmodelPackage; import org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.UseContext; -import org.eclipse.papyrus.uml.extensionpoints.utils.Util; import org.osgi.framework.Bundle; /** * This class is used to load all extension point call org.eclipse.papyrus.infra.gmfdiag.diagramexpansion * It gives the set of all Diagram expansion that has to be used - * #Req org.eclipse.papyrus.infra.gmfdiag.expansion.Req_060 - * + * #Req org.eclipse.papyrus.infra.gmfdiag.expansion.Req_060 + * */ public class DiagramExpansionsRegistry { protected final String EXPANSION_MODEL_EXTENSION_ID = "org.eclipse.papyrus.infra.gmfdiag.common.diagramExpansion"; //$NON-NLS-1$ protected final String MODEL_ID = "model"; //$NON-NLS-1$ protected ArrayList<DiagramExpansion> diagramExpansions = new ArrayList<DiagramExpansion>(); - protected HashMap<String,UseContext > usages= new HashMap<String, UseContext>(); - public HashMap<String,ChildrenListRepresentation > mapChildreen= new HashMap<String, ChildrenListRepresentation>(); + protected HashMap<String, UseContext> usages = new HashMap<String, UseContext>(); + public HashMap<String, ChildrenListRepresentation> mapChildreen = new HashMap<String, ChildrenListRepresentation>(); protected static final boolean DEBUG_EXPANSION = "true".equalsIgnoreCase(Platform.getDebugOption( "org.eclipse.papyrus.infra.gmfdiag.common/debug/expansion")); @@ -64,51 +62,46 @@ public class DiagramExpansionsRegistry { */ public void init() { // Obtain a new resource set - ResourceSet resourceSet = Util.createTemporaryResourceSet(); - resourceSet.getPackageRegistry().put(ExpansionmodelPackage.eINSTANCE.getNsURI(), ExpansionmodelPackage.eINSTANCE); + ResourceSet resourceSet = new ResourceSetImpl(); // Reading data from plugins IConfigurationElement[] configElements = Platform.getExtensionRegistry().getConfigurationElementsFor(EXPANSION_MODEL_EXTENSION_ID); for (int i = 0; i < configElements.length; i++) { - DiagramExpansion diagramExpansion=initializeOneModel(resourceSet, configElements[i]); + DiagramExpansion diagramExpansion = initializeOneModel(resourceSet, configElements[i]); installExpansionModel(diagramExpansion); } } protected void installExpansionModel(DiagramExpansion diagramExpansion) { - Diagnostic diagnostic=Diagnostician.INSTANCE.validate(diagramExpansion); - if( diagnostic.getSeverity()==Diagnostic.OK){ - //load only valid models + Diagnostic diagnostic = Diagnostician.INSTANCE.validate(diagramExpansion); + if (diagnostic.getSeverity() == Diagnostic.OK) { + // load only valid models diagramExpansions.add(diagramExpansion); for (UseContext usage : diagramExpansion.getUsages()) { - if( (usages.get(usage.getDiagramType()))==null){ + if ((usages.get(usage.getDiagramType())) == null) { usages.put(usage.getDiagramType(), usage); - ChildrenListRepresentation childrenListRepresentation= new ChildrenListRepresentation(usage); + ChildrenListRepresentation childrenListRepresentation = new ChildrenListRepresentation(usage); mapChildreen.put(usage.getDiagramType(), childrenListRepresentation); - if(DEBUG_EXPANSION){ + if (DEBUG_EXPANSION) { Activator.log.debug(childrenListRepresentation.toString()); } - } - else{ - //there is two ewtension oon the smae diagram! - //do not load --error + } else { + // there is two ewtension oon the smae diagram! + // do not load --error Activator.log.warn("Several expansions has been defined for the same diagram"); } } - } - else{ + } else { Activator.log.warn("Expansion model not loaded"); - for (Iterator<Diagnostic> i=diagnostic.getChildren().iterator(); i.hasNext();) - { - Diagnostic childDiagnostic = (Diagnostic)i.next(); - switch (childDiagnostic.getSeverity()) - { - case Diagnostic.ERROR: - case Diagnostic.WARNING: - Activator.log.warn("\t" + childDiagnostic.getMessage()); - } - } + for (Iterator<Diagnostic> i = diagnostic.getChildren().iterator(); i.hasNext();) { + Diagnostic childDiagnostic = i.next(); + switch (childDiagnostic.getSeverity()) { + case Diagnostic.ERROR: + case Diagnostic.WARNING: + Activator.log.warn("\t" + childDiagnostic.getMessage()); + } + } } } @@ -122,10 +115,12 @@ public class DiagramExpansionsRegistry { /** * get the usecontext associate to a diagram type - * @param diagramType the id of a diagram of the id of a view prototype + * + * @param diagramType + * the id of a diagram of the id of a view prototype * @return a useConstext or null if not usage exist. */ - public UseContext getUsage(String diagramType){ + public UseContext getUsage(String diagramType) { return usages.get(diagramType); } @@ -182,23 +177,25 @@ public class DiagramExpansionsRegistry { /** * this method is used to load a model expansion at runtime. - * see #Req org.eclipse.papyrus.infra.gmfdiag.expansion.Req_0100 - * @param resourceURI the URI of the model expansion. + * see #Req org.eclipse.papyrus.infra.gmfdiag.expansion.Req_0100 + * + * @param resourceURI + * the URI of the model expansion. */ - public void loadExpansion(URI resourceURI){ + public void loadExpansion(URI resourceURI) { // Obtain a new resource set - ResourceSet resourceSet = Util.createTemporaryResourceSet(); - resourceSet.getPackageRegistry().put(ExpansionmodelPackage.eINSTANCE.getNsURI(), ExpansionmodelPackage.eINSTANCE); + ResourceSet resourceSet = new ResourceSetImpl(); Resource resource = resourceSet.getResource(resourceURI, true); if (resource.getContents().get(0) instanceof DiagramExpansion) { - DiagramExpansion diagramExpansion= (DiagramExpansion) resource.getContents().get(0); + DiagramExpansion diagramExpansion = (DiagramExpansion) resource.getContents().get(0); installExpansionModel(diagramExpansion); } } + /** - * this method is used to clear the registry about all expansion. + * this method is used to clear the registry about all expansion. */ - public void clear(){ + public void clear() { diagramExpansions.clear(); usages.clear(); mapChildreen.clear(); diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java index ababc0d72e6..f8c191908af 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/providers/NotationLabelProvider.java @@ -11,8 +11,6 @@ *****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.providers;
-import javax.swing.text.Element;
-
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart;
@@ -27,7 +25,6 @@ import org.eclipse.papyrus.infra.gmfdiag.common.types.NotationTypesMap; import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.uml2.uml.NamedElement;
/**
* A Label Provider for GMF Notation model
@@ -65,7 +62,8 @@ public class NotationLabelProvider extends EMFLabelProvider { * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
*
* @param element
- * @return <ul>
+ * @return
+ * <ul>
* <li>if element is a {@link NamedElement}, we return its name</li>
* <li>else if element is a {@link Element}, we return its type + a index</li>
* <li>else return Messages#EditorLabelProvider_No_name</li>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/MDTUtil.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/MDTUtil.java index 99338d6da97..938bde0008d 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/MDTUtil.java +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/utils/MDTUtil.java @@ -35,13 +35,12 @@ import org.eclipse.gef.EditPart; import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; import org.eclipse.gmf.runtime.notation.Diagram; import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.papyrus.infra.tools.util.EditorHelper; import org.eclipse.papyrus.infra.gmfdiag.common.Activator; +import org.eclipse.papyrus.infra.tools.util.EditorHelper; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.IURIEditorInput; -import org.eclipse.uml2.common.util.CacheAdapter; import org.osgi.framework.Bundle; import org.osgi.framework.Constants; @@ -232,7 +231,7 @@ public class MDTUtil { * @return the editor rootelement */ public static EObject getEditorRootelement(IEditorPart editorPart) { - EditPart rootEditPart = (EditPart) editorPart.getAdapter(EditPart.class); + EditPart rootEditPart = editorPart.getAdapter(EditPart.class); if (rootEditPart == null) { return null; } @@ -268,11 +267,11 @@ public class MDTUtil { */ public static List<EObject> getRootElementsFromFile(IEditorInput input, ResourceSet resourceSet) { URI uri = null; - IURIEditorInput uriEditorInput = (IURIEditorInput) Platform.getAdapterManager().getAdapter(input, IURIEditorInput.class); + IURIEditorInput uriEditorInput = Platform.getAdapterManager().getAdapter(input, IURIEditorInput.class); if (uriEditorInput != null) { uri = URI.createURI(uriEditorInput.getURI().toString()); } else { - IFileEditorInput fileEditorInput = (IFileEditorInput) Platform.getAdapterManager().getAdapter(input, IFileEditorInput.class); + IFileEditorInput fileEditorInput = Platform.getAdapterManager().getAdapter(input, IFileEditorInput.class); if (fileEditorInput != null) { uri = URI.createURI(fileEditorInput.getFile().getLocationURI().toString()); } @@ -419,7 +418,7 @@ public class MDTUtil { if (resource != null && resource.getContents().size() > 0) { // look for a Diagram in the whole Resource for (EObject eObject : resource.getContents()) { - Diagram diagram = (Diagram) Platform.getAdapterManager().getAdapter(eObject, Diagram.class); + Diagram diagram = Platform.getAdapterManager().getAdapter(eObject, Diagram.class); if (diagram != null) { // the first Diagram found is returned. return diagram; diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/META-INF/MANIFEST.MF index f7d639718e6..1a7428f6ba9 100644 --- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/META-INF/MANIFEST.MF +++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/META-INF/MANIFEST.MF @@ -8,7 +8,6 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
org.eclipse.core.databinding;bundle-version="1.4.1",
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF index 401b77abb09..0f87b1effa2 100644 --- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF +++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF @@ -64,7 +64,7 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.1.0", org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.1.0", org.eclipse.core.databinding.observable, - org.eclipse.papyrus.uml.diagram.clazz + org.eclipse.papyrus.uml.diagram.clazz;bundle-version="1.1.0" Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy Bundle-Version: 1.1.0.qualifier diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/BDDSpecification.notation b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/BDDSpecification.notation index b818d78ecdc..1a6a9840d14 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/BDDSpecification.notation +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/BDDSpecification.notation @@ -96,46 +96,46 @@ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OF3ezeLIEeSv5dwvZ9NSDw" id="(1.0,0.64)"/> </edges> </notation:Diagram> - <nattable:Table xmi:id="_UF8KoOLIEeSv5dwvZ9NSDw" name="RequirementTable" currentRowAxisProvider="_UF8xtOLIEeSv5dwvZ9NSDw" currentColumnAxisProvider="_UF8xsOLIEeSv5dwvZ9NSDw"> + <css:ModelStyleSheets xmi:id="_MXBlUOc1EeSLdPGe2q9R0g"/> + <nattable:Table xmi:id="_JLAf0Oc2EeSLdPGe2q9R0g" name="Blocks Requirement" currentRowAxisProvider="_JLAf1ec2EeSLdPGe2q9R0g" currentColumnAxisProvider="_JLAf0ec2EeSLdPGe2q9R0g"> <context xmi:type="uml:Package" href="BDDSpecification.uml#_MKZekOc1EeSLdPGe2q9R0g"/> - <owner xmi:type="uml:Model" href="BDDSpecification.uml#_OFsfcuLIEeSv5dwvZ9NSDw"/> + <owner xmi:type="uml:Package" href="BDDSpecification.uml#_MKZekOc1EeSLdPGe2q9R0g"/> <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/> <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/> - <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_UF8xsOLIEeSv5dwvZ9NSDw" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider"> - <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_UF8xseLIEeSv5dwvZ9NSDw" element="property_of_stereotype:/SysML::Requirements::Requirement::id"> - <styles xmi:type="nattablestyle:IntValueStyle" xmi:id="_3f6MgOc0EeSLdPGe2q9R0g" name="axisWidth" intValue="220"/> + <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_JLAf0ec2EeSLdPGe2q9R0g" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider"> + <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JLAf0uc2EeSLdPGe2q9R0g" element="property_of_stereotype:/SysML::Requirements::Requirement::id"> <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/> </axis> - <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_UF8xsuLIEeSv5dwvZ9NSDw"> - <styles xmi:type="nattablestyle:IntValueStyle" xmi:id="_3f7aoOc0EeSLdPGe2q9R0g" name="axisWidth" intValue="220"/> + <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JLAf0-c2EeSLdPGe2q9R0g"> <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/> <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/> </axis> - <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_UF8xs-LIEeSv5dwvZ9NSDw" element="property_of_stereotype:/SysML::Requirements::Requirement::text"> - <styles xmi:type="nattablestyle:IntValueStyle" xmi:id="_3fYBAOc0EeSLdPGe2q9R0g" name="axisWidth" intValue="305"/> + <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JLAf1Oc2EeSLdPGe2q9R0g" element="property_of_stereotype:/SysML::Requirements::Requirement::text"> <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/> </axis> </columnAxisProvidersHistory> - <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_UF8xtOLIEeSv5dwvZ9NSDw" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/> + <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_JLAf1ec2EeSLdPGe2q9R0g" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/> </nattable:Table> - <css:ModelStyleSheets xmi:id="_MXBlUOc1EeSLdPGe2q9R0g"/> - <nattable:Table xmi:id="_JLAf0Oc2EeSLdPGe2q9R0g" name="Blocks Requirement" currentRowAxisProvider="_JLAf1ec2EeSLdPGe2q9R0g" currentColumnAxisProvider="_JLAf0ec2EeSLdPGe2q9R0g"> - <context xmi:type="uml:Package" href="BDDSpecification.uml#_MKZekOc1EeSLdPGe2q9R0g"/> - <owner xmi:type="uml:Package" href="BDDSpecification.uml#_MKZekOc1EeSLdPGe2q9R0g"/> + <nattable:Table xmi:id="_FB4isOgEEeSUQvXhEVQh8w" name="Palette Requirement Table" currentRowAxisProvider="_FB4itegEEeSUQvXhEVQh8w" currentColumnAxisProvider="_FB4isegEEeSUQvXhEVQh8w"> + <context xmi:type="uml:Model" href="BDDSpecification.uml#_OFsfcuLIEeSv5dwvZ9NSDw"/> + <owner xmi:type="uml:Model" href="BDDSpecification.uml#_OFsfcuLIEeSv5dwvZ9NSDw"/> <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb3txhEeOqHvRyiN87hA"/> <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/> - <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_JLAf0ec2EeSLdPGe2q9R0g" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider"> - <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JLAf0uc2EeSLdPGe2q9R0g" element="property_of_stereotype:/SysML::Requirements::Requirement::id"> + <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_FB4isegEEeSUQvXhEVQh8w" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider"> + <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FB4isugEEeSUQvXhEVQh8w" element="property_of_stereotype:/SysML::Requirements::Requirement::id"> + <styles xmi:type="nattablestyle:IntValueStyle" xmi:id="_0CX7UOgIEeSUQvXhEVQh8w" name="axisWidth" intValue="320"/> <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/> </axis> - <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_JLAf0-c2EeSLdPGe2q9R0g"> + <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_FB4is-gEEeSUQvXhEVQh8w"> + <styles xmi:type="nattablestyle:IntValueStyle" xmi:id="_0C78AOgIEeSUQvXhEVQh8w" name="axisWidth" intValue="220"/> <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/> <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/> </axis> - <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_JLAf1Oc2EeSLdPGe2q9R0g" element="property_of_stereotype:/SysML::Requirements::Requirement::text"> + <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_FB4itOgEEeSUQvXhEVQh8w" element="property_of_stereotype:/SysML::Requirements::Requirement::text"> + <styles xmi:type="nattablestyle:IntValueStyle" xmi:id="_0C9KIOgIEeSUQvXhEVQh8w" name="axisWidth" intValue="220"/> <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/> </axis> </columnAxisProvidersHistory> - <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_JLAf1ec2EeSLdPGe2q9R0g" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/> + <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_FB4itegEEeSUQvXhEVQh8w" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/> </nattable:Table> </xmi:XMI> diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/BDDSpecification.uml b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/BDDSpecification.uml index 607ec80b56d..35dd142c98c 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/BDDSpecification.uml +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/BDDSpecification.uml @@ -12,6 +12,46 @@ <packagedElement xmi:type="uml:Class" xmi:id="_a0GrwOLIEeSv5dwvZ9NSDw" name="Block display"/> <packagedElement xmi:type="uml:Class" xmi:id="_lLZBYOc2EeSLdPGe2q9R0g" name="The block can display constraints "/> </packagedElement> + <packagedElement xmi:type="uml:Class" xmi:id="_IaVsQOgEEeSUQvXhEVQh8w" name="Block in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_aMTSAOgEEeSUQvXhEVQh8w" name="Actor in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_apngIOgEEeSUQvXhEVQh8w" name="Value Type in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_axoMoOgEEeSUQvXhEVQh8w" name="Enumeration in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_a4wvYOgEEeSUQvXhEVQh8w" name="Abstract Definition in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_a_d0UOgEEeSUQvXhEVQh8w" name="StereotypeProperty in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_bGPxwOgEEeSUQvXhEVQh8w" name="Behavior Compartment in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_bN7uIOgEEeSUQvXhEVQh8w" name="Namespace Compartment in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_bU7uAOgEEeSUQvXhEVQh8w" name="Structure Compartment in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_Bi7TEOgFEeSUQvXhEVQh8w" name="Structure Compartment in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_BzRcMOgFEeSUQvXhEVQh8w" name="BoundReference in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_B79eIOgFEeSUQvXhEVQh8w" name="Unit in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_B-_kAOgFEeSUQvXhEVQh8w" name="QuantityKind in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_CFE94OgFEeSUQvXhEVQh8w" name="InstanceSpecification in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_CM0koOgFEeSUQvXhEVQh8w" name="Dependency in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_CSPQIOgFEeSUQvXhEVQh8w" name="ReferenceAssociation in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_CX5zQOgFEeSUQvXhEVQh8w" name="PartAssociation in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_CdEAEOgFEeSUQvXhEVQh8w" name="SharedAssociation in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_CjnUAOgFEeSUQvXhEVQh8w" name="MultibranchPart Association in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_VxRJwOgHEeSUQvXhEVQh8w" name="Multibranch Shared Association in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_V_dWwOgHEeSUQvXhEVQh8w" name="Generalization in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_WIFHQOgHEeSUQvXhEVQh8w" name="Multibranch Generalization in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_WXgqYOgHEeSUQvXhEVQh8w" name="GeneralizationSet in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_WeYHYOgHEeSUQvXhEVQh8w" name="BlockNamespace Containment in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_WkU-YOgHEeSUQvXhEVQh8w" name="ParticipantProperty in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_WqB9wOgHEeSUQvXhEVQh8w" name="ConnectorProperty in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_p2GKAOgHEeSUQvXhEVQh8w" name="InternalBlockDiagram in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_qDXJ8OgHEeSUQvXhEVQh8w" name="Port in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_qOhREOgHEeSUQvXhEVQh8w" name="Port (Compartment Notation) in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_qa78cOgHEeSUQvXhEVQh8w" name="Port (with Compartment) in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_qpLz0OgHEeSUQvXhEVQh8w" name="Port (Nested) in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_q0RCcOgHEeSUQvXhEVQh8w" name=" ProxyPort in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_q-XZoOgHEeSUQvXhEVQh8w" name="FullPort in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_rHti4OgHEeSUQvXhEVQh8w" name="FlowProperty in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_rOaAwOgHEeSUQvXhEVQh8w" name="Required and Provided features in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_rUHnMOgHEeSUQvXhEVQh8w" name="InterfaceBlock in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_rZX6oOgHEeSUQvXhEVQh8w" name="Item Flow in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_reaysOgHEeSUQvXhEVQh8w" name="Interface in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_rjW9EOgHEeSUQvXhEVQh8w" name="Required and Provided Interfaces in BDD Palette"/> + <packagedElement xmi:type="uml:Class" xmi:id="_roswEOgHEeSUQvXhEVQh8w" name="ConstraintBlock in BDD Palette"/> </packagedElement> <packagedElement xmi:type="uml:Model" xmi:id="_OFsfc-LIEeSv5dwvZ9NSDw" name="UseCases"> <packagedElement xmi:type="uml:Abstraction" xmi:id="_OFsfdOLIEeSv5dwvZ9NSDw" name="useCasesAbstraction" client="_OFsfc-LIEeSv5dwvZ9NSDw" supplier="_OFsfcuLIEeSv5dwvZ9NSDw"/> @@ -90,4 +130,44 @@ <structure:Tests xmi:id="_OFsfieLIEeSv5dwvZ9NSDw" base_Model="_OFsfeOLIEeSv5dwvZ9NSDw"/> <Requirements:Requirement xmi:id="_a0OAgOLIEeSv5dwvZ9NSDw" text="The block can display constraints, operations, parts, references, values, properties compartments" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.Req001" base_Class="_a0GrwOLIEeSv5dwvZ9NSDw"/> <Requirements:Requirement xmi:id="_lLa2kOc2EeSLdPGe2q9R0g" text="The block can display a constraint compartment : 
 - this compartment is present by default in palette creation and drop
 - the compartment is named "constraints"
 - each constraint should take a line and display by default : 
 - the constraint icon
 - the constraint specification value " id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.Req002" base_Class="_lLZBYOc2EeSLdPGe2q9R0g"/> + <Requirements:Requirement xmi:id="_IaYIgOgEEeSUQvXhEVQh8w" text="" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_IaVsQOgEEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_aMT5EOgEEeSUQvXhEVQh8w" text="Actor should be present as a stick man figure or as a rectangle" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_aMTSAOgEEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_appVUOgEEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_apngIOgEEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_axpawOgEEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_axoMoOgEEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_a4x9gOgEEeSUQvXhEVQh8w" text="UML4SysML::Classifier with
isAbstract equal true" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_a4wvYOgEEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_a_fpgOgEEeSUQvXhEVQh8w" text="" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_a_d0UOgEEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_bGRm8OgEEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_bGPxwOgEEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_bN9jUOgEEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_bN7uIOgEEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_bU88IOgEEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_bU7uAOgEEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_Bi8hMOgFEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_Bi7TEOgFEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_BzTRYOgFEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_BzRcMOgFEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_B7_6YOgFEeSUQvXhEVQh8w" text="Create an uml InstanceSpecifiaction from the Unit type (definedby the Sysml library)" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_B79eIOgFEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_B_ALEOgFEeSUQvXhEVQh8w" text="Create an uml InstanceSpecifiaction from the Quantity Kind type (definedby the Sysml library)" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_B-_kAOgFEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_CFFk8OgFEeSUQvXhEVQh8w" text="Create an UML instance specification" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_CFE94OgFEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_CM2Z0OgFEeSUQvXhEVQh8w" text="Create an UML dependency" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_CM0koOgFEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_CSPQIegFEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_CSPQIOgFEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_CX7BYOgFEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_CX5zQOgFEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_CdEnIOgFEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_CdEAEOgFEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_CjpJMOgFEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_CjnUAOgFEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_VxS-8OgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_VxRJwOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_V_ek4OgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_V_dWwOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_WIGVYOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_WIFHQOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_WXhRcOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_WXgqYOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_WeZVgOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_WeYHYOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_WkWMgOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_WkU-YOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_WqDL4OgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_WqB9wOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_p2HYIOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_p2GKAOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_qDXxAOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_qDXJ8OgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_qOjtUOgHEeSUQvXhEVQh8w" text="" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_qOhREOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_qa9xoOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_qa78cOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_qpNB8OgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_qpLz0OgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_q0S3oOgHEeSUQvXhEVQh8w" text=" ProxyPort in BDD Palette" id=" ProxyPort in BDD Palette" base_Class="_q0RCcOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_q-YnwOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_q-XZoOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_rHvYEOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_rHti4OgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_rOcdAOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_rOaAwOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_rUI1UOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_rUHnMOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_rZYhsOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_rZX6oOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_rebZwOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_reaysOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_rjXkIOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_rjW9EOgHEeSUQvXhEVQh8w"/> + <Requirements:Requirement xmi:id="_rot-MOgHEeSUQvXhEVQh8w" id="org.eclipse.papyrus.sysml14.diagram.blockdefinition.palette.Req001" base_Class="_roswEOgHEeSUQvXhEVQh8w"/> </xmi:XMI> diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/configuration/BDDconfig.xmi b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/configuration/BDDconfig.xmi index b5e243cb09e..2e57b75fc17 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/configuration/BDDconfig.xmi +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/configuration/BDDconfig.xmi @@ -16,7 +16,7 @@ name="Block based on Class representation of class diagram" viewFactory="org.eclipse.papyrus.sysml14.diagram.blockdefinition.factory.BlockClassifierViewFactory" inducedRepresentations="_rC19oNnoEeSqwOe5_frWm6 //@libraries.1/@representations.4 _rC19oNnoEeSqwOe5_frWm7" - subRepresentations="//@libraries.0/@representations.2" + subRepresentations="//@libraries.0/@representations.2 //@libraries.0/@representations.4" reusedID="2008"/> </usages> <libraries @@ -50,6 +50,15 @@ name="Constraint As Label" viewFactory="org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory" graphicalElementType="org.eclipse.papyrus.sysML.Constraint_Label"/> + <representations + xsi:type="expansionmodel:Representation" + name="Class Port" + viewFactory="org.eclipse.papyrus.sysml14.diagram.blockdefinition.factory.PortViewFactory" + graphicalElementType="org.eclipse.papyrus.sysML.Class_Port" + inducedRepresentations="//@libraries.1/@representations.3"> + <kind + href="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/model/UMLRepresentationKind.xmi#_EoAOIN0DEeSiOexlyH3Ifw"/> + </representations> </libraries> <libraries xmi:id="_rC19oNnoEeSqwOe5_frWm5" @@ -95,7 +104,7 @@ hint="constraints" children="//@libraries.0/@representations.3"> <kind - href="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/model/UMLRepresentationKind.xmi#_vbTKYN0DEeS-X4lB2Ut-YA"/> - </representations> + href="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/model/UMLRepresentationKind.xmi#_vbTKYN0DEeS-X4lB2Ut-YA"/> + </representations> </libraries> </expansionmodel:DiagramExpansion> diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/palette/blockDiagram.paletteconfiguration b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/palette/blockDiagram.paletteconfiguration index 96cdc173518..23b91471b99 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/palette/blockDiagram.paletteconfiguration +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/palette/blockDiagram.paletteconfiguration @@ -5,9 +5,9 @@ id="palettemodel" label="SysML"> <drawerConfigurations - id="WorkingPalette" - label="WorkingPalette" - description="WorkingPalette"> + id="palette.sysml.bdd.nodes" + label="Nodes" + description="Nodes"> <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Block" @@ -29,56 +29,186 @@ </ownedConfigurations> <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" - id="org.eclipse.papyrus.sysML.Requirement" - label="Requirement" - description="Create a Requirement"> + id="org.eclipse.papyrus.sysML.FlowPort" + label="FlowPort" + description="Create a FlowPort"> <icon pluginID="org.eclipse.papyrus.sysml" - iconPath="icons/requirements/Requirement.gif"/> + iconPath="icons/portandflows/FlowProperty.gif"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Requirement_2008"/> + elementTypeId="org.eclipse.papyrus.sysML.FlowPort_Label"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.ControlOperator_Operation_Operation_BorderItem" + label="ControlOperator" + description="Create ControlOperator"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/portandflows/FlowProperty.gif"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Requirement_3004"/> + elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_Operation_BorderItem"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Constraint" + label="Constraint" + description="Create a constraint"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Constraint.gif"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Requirement_3008"/> + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Constraint_2011"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Requirement_3010"/> + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Constraint_3029"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Requirement_3014"/> + elementTypeId="org.eclipse.papyrus.sysML.Constraint_Label"/> </ownedConfigurations> <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" - id="org.eclipse.papyrus.sysML.Satisfy_Abstraction" - label="Satisfy" - description="Create a Satisfy" - kind="ConnectionTool"> + id="org.eclipse.papyrus.sysML.Actor" + label="Actor" + description="Create an Actor"> <icon - pluginID="org.eclipse.papyrus.sysml" - iconPath="icons/requirements/Satisfy.gif"/> + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Actor.gif"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Satisfy_Abstraction_4006"/> + elementTypeId="org.eclipse.papyrus.sysML.Actor_2008"/> </ownedConfigurations> <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" - id="org.eclipse.papyrus.sysML.FlowPort" - label="FlowPort" - description="Create a FlowPort"> + id="org.eclipse.papyrus.sysML.ValueType" + label="ValueType" + description="Create a ValueType"> <icon pluginID="org.eclipse.papyrus.sysml" - iconPath="icons/portandflows/FlowProperty.gif"/> + iconPath="icons/blocks/ValueType.gif"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.FlowPort_Label"/> + elementTypeId="org.eclipse.papyrus.sysML.ValueType_2010"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ValueType_3027"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ValueType_3043"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ValueType_3044"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ValueType_3045"/> </ownedConfigurations> <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" - id="org.eclipse.papyrus.sysML.ControlOperator_Operation_Operation_BorderItem" - label="Create ControlOperator" - description="Create ControlOperator"> + id="org.eclipse.papyrus.sysML.Enumeration" + label="Enumeration" + description="Create an Enumeration"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Enumeration.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_2006"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3025"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3052"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3053"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Enumeration_3054"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Unit" + label="Unit" + description="Create a Sysml Unit"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="/icons/full/obj16/InstanceSpecification.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Unit_2001"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Unit_3020"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.QuantityKind" + label="QuantityKind" + description="Create a Sysml QuantityKind"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="/icons/full/obj16/InstanceSpecification.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.QuantityKind_2001"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.QuantityKind_3020"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Slot" + label="Slot" + description="Create a Slot"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="/icons/full/obj16/Slot.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Slot_3030"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.InstanceSpecification" + label="Instance Specification" + description="Create an Uml Instance Specification"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="/icons/full/obj16/InstanceSpecification.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_2001"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_3020"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Interface" + label="Interface" + description="Create an Uml Interface"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="/icons/full/obj16/Interface.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Interface_2004"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Interface_3023"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Interface_3036"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Interface_3037"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Interface_3038"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Class_Port" + label="Port" + description="Create a Port"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="/icons/full/obj16/Port.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Class_Port"/> + </ownedConfigurations> + </drawerConfigurations> + <drawerConfigurations + id="palette.sysml.bdd.edges" + label="Edges" + description="Edges"> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Satisfy_Abstraction" + label="Satisfy" + description="Create a Satisfy" + kind="ConnectionTool"> <icon pluginID="org.eclipse.papyrus.sysml" - iconPath="icons/portandflows/FlowProperty.gif"/> + iconPath="icons/requirements/Satisfy.gif"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_Operation_BorderItem"/> + elementTypeId="org.eclipse.papyrus.sysML.Satisfy_Abstraction_4006"/> </ownedConfigurations> <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" @@ -93,24 +223,44 @@ </ownedConfigurations> <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" - id="org.eclipse.papyrus.sysML.Constraint" - label="Constraint" - description="Create a constraint"> + id="org.eclipse.papyrus.sysML.Dependency" + label="Dependency" + description="Create a dependency" + kind="ConnectionTool"> <icon pluginID="org.eclipse.uml2.uml.edit" - iconPath="icons/full/obj16/Constraint.gif"/> + iconPath="/icons/full/obj16/Dependency.gif"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Constraint_2011"/> + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Constraint_3029"/> + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4008"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Constraint_Label"/> + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4018"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.SysML14.PartAssociation" + label="PartAssociation" + description="Create a Part Association" + kind="ConnectionTool"> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.PartAssociation_2015"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.PartAssociation_4001"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.PartAssociation_4019"/> </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.SysML14.SharedAssociation" + label="SharedAssociation" + description="Create a SharedAssociation" + kind="ConnectionTool"/> </drawerConfigurations> <drawerConfigurations id="Nodes" - label="Nodes" - description="Nodes"> + label="Other Nodes" + description="Other Nodes"> <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.AdjunctProperty" @@ -466,28 +616,28 @@ </ownedConfigurations> <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" - id="org.eclipse.papyrus.sysML.ValueType" - label="ValueType" - description="Create a ValueType"> + id="org.eclipse.papyrus.sysML.Requirement" + label="Requirement" + description="Create a Requirement"> <icon pluginID="org.eclipse.papyrus.sysml" - iconPath="icons/blocks/ValueType.gif"/> + iconPath="icons/requirements/Requirement.gif"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.ValueType_2010"/> + elementTypeId="org.eclipse.papyrus.sysML.Requirement_2008"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.ValueType_3027"/> + elementTypeId="org.eclipse.papyrus.sysML.Requirement_3004"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.ValueType_3043"/> + elementTypeId="org.eclipse.papyrus.sysML.Requirement_3008"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.ValueType_3044"/> + elementTypeId="org.eclipse.papyrus.sysML.Requirement_3010"/> <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.ValueType_3045"/> + elementTypeId="org.eclipse.papyrus.sysML.Requirement_3014"/> </ownedConfigurations> </drawerConfigurations> <drawerConfigurations id="Edges" - label="Edges" - description="Edges"> + label="Other Edges" + description="Other Edges"> <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Copy_Abstraction" @@ -645,112 +795,4 @@ elementTypeId="org.eclipse.papyrus.sysML.RequirementRelated_2097"/> </ownedConfigurations> </drawerConfigurations> - <drawerConfigurations - id="Deprecated" - label="Deprecated" - description="Deprecated"> - <ownedConfigurations - xsi:type="paletteconfiguration:ToolConfiguration" - id="org.eclipse.papyrus.sysML.Deprecated_Property" - label="Property (Deprecated)" - description="Create a Deprecated Property"> - <icon - pluginID="org.eclipse.uml2.uml.edit" - iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3002"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3005"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3006"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3012"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3018"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3041"/> - </ownedConfigurations> - <ownedConfigurations - xsi:type="paletteconfiguration:ToolConfiguration" - id="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification" - label="InstanceSpecification (Deprecated)" - description="Create a Deprecated InstanceSpecification"> - <icon - pluginID="org.eclipse.uml2.uml.edit" - iconPath="icons/full/obj16/InstanceSpecification.gif"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_4021"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_2001"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_3020"/> - </ownedConfigurations> - <ownedConfigurations - xsi:type="paletteconfiguration:ToolConfiguration" - id="org.eclipse.papyrus.sysML.Deprecated_Class" - label="Class (Deprecated)" - description="Create a Deprecated Class" - kind="ConnectionTool"> - <icon - pluginID="org.eclipse.uml2.uml.edit" - iconPath="icons/full/obj16/Class.gif"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_2008"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3004"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3008"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3010"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3014"/> - </ownedConfigurations> - <ownedConfigurations - xsi:type="paletteconfiguration:ToolConfiguration" - id="org.eclipse.papyrus.sysML.Deprecated_Association" - label="Association (Deprecated)" - description="Create a Deprecated Association" - kind="ConnectionTool"> - <icon - pluginID="org.eclipse.uml2.uml.edit" - iconPath="icons/full/obj16/Association.gif"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Association_2015"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Association_4001"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Association_4019"/> - </ownedConfigurations> - <ownedConfigurations - xsi:type="paletteconfiguration:ToolConfiguration" - id="org.eclipse.papyrus.sysML.Deprecated_Generalization" - label="Generalization (Deprecated)" - description="Create a Deprecated Generalization" - kind="ConnectionTool"> - <icon - pluginID="org.eclipse.uml2.uml.edit" - iconPath="icons/full/obj16/Generalization.gif"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Generalization_4002"/> - </ownedConfigurations> - <ownedConfigurations - xsi:type="paletteconfiguration:ToolConfiguration" - id="org.eclipse.papyrus.sysML.Deprecated_DataType" - label="DataType (Deprecated)" - description="Create a Deprecated DataType"> - <icon - pluginID="org.eclipse.uml2.uml.edit" - iconPath="icons/full/obj16/DataType.gif"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_2010"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3027"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3043"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3044"/> - <elementDescriptors - elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3045"/> - </ownedConfigurations> - </drawerConfigurations> </paletteconfiguration:PaletteConfiguration> diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/style/blockdiagram.css b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/style/blockdiagram.css index b2118803c64..fd888477a0b 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/style/blockdiagram.css +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/style/blockdiagram.css @@ -56,11 +56,48 @@ Enumeration > Compartment[kind="literals"] { showTitle:true; } -DataType > Compartment { +DataType[appliedStereotypes~="ValueType"] > Compartment { visible:false; } -DataType > Compartment[kind="properties"] { +DataType[appliedStereotypes~="ValueType"] > Compartment[kind="properties"] { visible:true; showTitle:true; -}
\ No newline at end of file +} + +DataType[appliedStereotypes~="ValueType"] > Compartment[kind="operations"] { + visible:true; + showTitle:true; +} + +DataType[appliedStereotypes~="ValueType"] > Compartment[type=StereotypeCompartment] { + visible:true; + showTitle:true; +} + +InstanceSpecification> Compartment[kind="slots"] { + visible:true; + showTitle:false; +} + +Actor +{ + displayBorder:false; + displayName:false; + diplayIcon:false; + displayTag:false; + followSVGSymbol:true; + maintainSymbolRatio:true; + transparency:100; + /*displayFloatingLabel:true;*/ + maxNumberOfSymbol:1; + useOriginalColors:false; + gradient:none; + fillColor:white; +} + +Actor > Compartment[kind="symbol"] +{ + visible:true; +} + diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/BlockClassifierViewFactory.java b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/BlockClassifierViewFactory.java index 2a2123196d4..143a5bfb878 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/BlockClassifierViewFactory.java +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/BlockClassifierViewFactory.java @@ -1,105 +1,116 @@ -package org.eclipse.papyrus.sysml14.diagram.blockdefinition.factory;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.core.view.factories.ViewFactory;
-import org.eclipse.gmf.runtime.notation.DecorationNode;
-import org.eclipse.gmf.runtime.notation.Location;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.TitleStyle;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassAttributeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassFloatingNameEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNameEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNestedClassifierCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassOperationCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPart;
-import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-
-/**
- *
- * extraction from classdiagram UML view Provider
- *
- */
-public class BlockClassifierViewFactory implements ViewFactory {
-
- @Override
- public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index,
- boolean persisted, PreferencesHint preferencesHint) {
- return createClass_2008((EObject)semanticAdapter.getAdapter(EObject.class), containerView,semanticHint, index, persisted, preferencesHint);
- }
-
- public Node createClass_2008(EObject domainElement, View containerView, String semanticHint,int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(semanticHint);
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- stampShortcut(containerView, node);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore();
-
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Class");
- Node label5029 = createLabel(node, UMLVisualIDRegistry.getType(ClassNameEditPart.VISUAL_ID));
- Node label8510 = createLabel(node, UMLVisualIDRegistry.getType(ClassFloatingNameEditPart.VISUAL_ID));
- label8510.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location8510 = (Location) label8510.getLayoutConstraint();
- location8510.setX(0);
- location8510.setY(5);
- createCompartment(node, UMLVisualIDRegistry.getType(ClassAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
- createCompartment(node, UMLVisualIDRegistry.getType(ClassOperationCompartmentEditPart.VISUAL_ID), true, true, true, true);
- createCompartment(node, UMLVisualIDRegistry.getType(ClassNestedClassifierCompartmentEditPart.VISUAL_ID), true, true, true, true);
- PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Class");
- return node;
- }
- protected void stampShortcut(View containerView, Node target) {
- if (!ModelEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) {
- EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
- shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$
- shortcutAnnotation.getDetails().put("modelID", ModelEditPart.MODEL_ID); //$NON-NLS-1$
- target.getEAnnotations().add(shortcutAnnotation);
- }
- }
- protected Node createLabel(View owner, String hint) {
- DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode();
- rv.setType(hint);
- ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
- return rv;
- }
- protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) {
- // SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment();
- // rv.setShowTitle(showTitle);
- // rv.setCollapsed(isCollapsed);
- Node rv;
- if (canCollapse) {
- rv = NotationFactory.eINSTANCE.createBasicCompartment();
- } else {
- rv = NotationFactory.eINSTANCE.createDecorationNode();
- }
-
- rv.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
-
- if (hasTitle) {
- TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle();
- rv.getStyles().add(ts);
- }
- if (canSort) {
- rv.getStyles().add(NotationFactory.eINSTANCE.createSortingStyle());
- }
- if (canFilter) {
- rv.getStyles().add(NotationFactory.eINSTANCE.createFilteringStyle());
- }
- rv.setType(hint);
- ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
- return rv;
- }
-}
+/***************************************************************************** + * Copyright (c) 2015 CEA LIST 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.sysml14.diagram.blockdefinition.factory; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EcoreFactory; +import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; +import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; +import org.eclipse.gmf.runtime.diagram.core.view.factories.ViewFactory; +import org.eclipse.gmf.runtime.notation.DecorationNode; +import org.eclipse.gmf.runtime.notation.Location; +import org.eclipse.gmf.runtime.notation.Node; +import org.eclipse.gmf.runtime.notation.NotationFactory; +import org.eclipse.gmf.runtime.notation.Shape; +import org.eclipse.gmf.runtime.notation.TitleStyle; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassAttributeCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassFloatingNameEditPart; +import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNameEditPart; +import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNestedClassifierCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassOperationCompartmentEditPart; +import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPart; +import org.eclipse.papyrus.uml.diagram.clazz.part.UMLVisualIDRegistry; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; + +/** + * + * extraction from classdiagram UML view Provider + * + */ +public class BlockClassifierViewFactory implements ViewFactory { + + @Override + public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, + boolean persisted, PreferencesHint preferencesHint) { + return createClass_2008((EObject)semanticAdapter.getAdapter(EObject.class), containerView,semanticHint, index, persisted, preferencesHint); + } + + public Node createClass_2008(EObject domainElement, View containerView, String semanticHint,int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(semanticHint); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + stampShortcut(containerView, node); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore) preferencesHint.getPreferenceStore(); + + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Class"); + Node label5029 = createLabel(node, UMLVisualIDRegistry.getType(ClassNameEditPart.VISUAL_ID)); + Node label8510 = createLabel(node, UMLVisualIDRegistry.getType(ClassFloatingNameEditPart.VISUAL_ID)); + label8510.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location8510 = (Location) label8510.getLayoutConstraint(); + location8510.setX(0); + location8510.setY(5); + createCompartment(node, UMLVisualIDRegistry.getType(ClassAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true); + createCompartment(node, UMLVisualIDRegistry.getType(ClassOperationCompartmentEditPart.VISUAL_ID), true, true, true, true); + createCompartment(node, UMLVisualIDRegistry.getType(ClassNestedClassifierCompartmentEditPart.VISUAL_ID), true, true, true, true); + PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Class"); + return node; + } + protected void stampShortcut(View containerView, Node target) { + if (!ModelEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(containerView))) { + EAnnotation shortcutAnnotation = EcoreFactory.eINSTANCE.createEAnnotation(); + shortcutAnnotation.setSource("Shortcut"); //$NON-NLS-1$ + shortcutAnnotation.getDetails().put("modelID", ModelEditPart.MODEL_ID); //$NON-NLS-1$ + target.getEAnnotations().add(shortcutAnnotation); + } + } + protected Node createLabel(View owner, String hint) { + DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode(); + rv.setType(hint); + ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true); + return rv; + } + protected Node createCompartment(View owner, String hint, boolean canCollapse, boolean hasTitle, boolean canSort, boolean canFilter) { + // SemanticListCompartment rv = NotationFactory.eINSTANCE.createSemanticListCompartment(); + // rv.setShowTitle(showTitle); + // rv.setCollapsed(isCollapsed); + Node rv; + if (canCollapse) { + rv = NotationFactory.eINSTANCE.createBasicCompartment(); + } else { + rv = NotationFactory.eINSTANCE.createDecorationNode(); + } + + rv.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + + if (hasTitle) { + TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle(); + rv.getStyles().add(ts); + } + if (canSort) { + rv.getStyles().add(NotationFactory.eINSTANCE.createSortingStyle()); + } + if (canFilter) { + rv.getStyles().add(NotationFactory.eINSTANCE.createFilteringStyle()); + } + rv.setType(hint); + ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true); + return rv; + } +} diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/OperationPortViewFactory.java b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/OperationPortViewFactory.java index f91551d2d6d..bcecd7015bc 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/OperationPortViewFactory.java +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/OperationPortViewFactory.java @@ -1,59 +1,71 @@ -package org.eclipse.papyrus.sysml14.diagram.blockdefinition.factory;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
-import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
-import org.eclipse.gmf.runtime.diagram.core.view.factories.ViewFactory;
-import org.eclipse.gmf.runtime.notation.DecorationNode;
-import org.eclipse.gmf.runtime.notation.Location;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.NotationFactory;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
-
-public class OperationPortViewFactory implements ViewFactory {
-
- /**
- * visual ID for stereotype label of border item
- */
- protected static final String OPERATION_BORDER_ITEM_STEREOTYPE_LABEL = "Operation_BorderItem_Stereotype_Label";
- /**
- * visual ID for name label of border item
- */
- protected static final String OPERATION_BORDER_ITEM_LABEL = "Operation_BorderItem_Label";
- @Override
- public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
- return createPort((EObject)semanticAdapter.getAdapter(EObject.class), containerView,semanticHint, index, persisted, preferencesHint);
- }
- public Node createPort(EObject domainElement, View containerView,String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
- Shape node = NotationFactory.eINSTANCE.createShape();
- node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
- node.setType(semanticHint);
- ViewUtil.insertChildView(containerView, node, index, persisted);
- node.setElement(domainElement);
- // initializeFromPreferences
- final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
- PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Port");
- Node label5125 = createLabel(node, OPERATION_BORDER_ITEM_LABEL);
- label5125.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location5125 = (Location)label5125.getLayoutConstraint();
- location5125.setX(25);
- location5125.setY(3);
- Node label6029 = createLabel(node, OPERATION_BORDER_ITEM_STEREOTYPE_LABEL);
- label6029.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
- Location location6029 = (Location)label6029.getLayoutConstraint();
- location6029.setX(25);
- location6029.setY(-10);
- return node;
- }
- protected Node createLabel(View owner, String hint) {
- DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode();
- rv.setType(hint);
- ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
- return rv;
- }
-
-}
+/***************************************************************************** + * Copyright (c) 2015 CEA LIST 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.sysml14.diagram.blockdefinition.factory; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; +import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; +import org.eclipse.gmf.runtime.diagram.core.view.factories.ViewFactory; +import org.eclipse.gmf.runtime.notation.DecorationNode; +import org.eclipse.gmf.runtime.notation.Location; +import org.eclipse.gmf.runtime.notation.Node; +import org.eclipse.gmf.runtime.notation.NotationFactory; +import org.eclipse.gmf.runtime.notation.Shape; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; + +public class OperationPortViewFactory implements ViewFactory { + + /** + * visual ID for stereotype label of border item + */ + protected static final String OPERATION_BORDER_ITEM_STEREOTYPE_LABEL = "Operation_BorderItem_Stereotype_Label"; + /** + * visual ID for name label of border item + */ + protected static final String OPERATION_BORDER_ITEM_LABEL = "Operation_BorderItem_Label"; + @Override + public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { + return createPort((EObject)semanticAdapter.getAdapter(EObject.class), containerView,semanticHint, index, persisted, preferencesHint); + } + public Node createPort(EObject domainElement, View containerView,String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { + Shape node = NotationFactory.eINSTANCE.createShape(); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(semanticHint); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Port"); + Node label5125 = createLabel(node, OPERATION_BORDER_ITEM_LABEL); + label5125.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5125 = (Location)label5125.getLayoutConstraint(); + location5125.setX(25); + location5125.setY(3); + Node label6029 = createLabel(node, OPERATION_BORDER_ITEM_STEREOTYPE_LABEL); + label6029.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location6029 = (Location)label6029.getLayoutConstraint(); + location6029.setX(25); + location6029.setY(-10); + return node; + } + protected Node createLabel(View owner, String hint) { + DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode(); + rv.setType(hint); + ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true); + return rv; + } + +} diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/PortViewFactory.java b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/PortViewFactory.java new file mode 100644 index 00000000000..f0dabe89628 --- /dev/null +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/PortViewFactory.java @@ -0,0 +1,69 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST. + * + * 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: + * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.sysml14.diagram.blockdefinition.factory; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint; +import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil; +import org.eclipse.gmf.runtime.diagram.core.view.factories.ViewFactory; +import org.eclipse.gmf.runtime.notation.DecorationNode; +import org.eclipse.gmf.runtime.notation.Location; +import org.eclipse.gmf.runtime.notation.Node; +import org.eclipse.gmf.runtime.notation.NotationFactory; +import org.eclipse.gmf.runtime.notation.Shape; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper; +import org.eclipse.uml2.uml.Operation; + +public class PortViewFactory implements ViewFactory { + + /** + * visual ID for stereotype label of border item + */ +// protected static final String OPERATION_BORDER_ITEM_STEREOTYPE_LABEL = "Operation_BorderItem_Stereotype_Label"; + /** + * visual ID for name label of border item + */ + protected static final String OPERATION_BORDER_ITEM_LABEL = "Operation_BorderItem_Label"; + @Override + public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { + return createPort((EObject)semanticAdapter.getAdapter(EObject.class), containerView,semanticHint, index, persisted, preferencesHint); + } + public Node createPort(EObject domainElement, View containerView,String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) { + + Operation o; + + Shape node = NotationFactory.eINSTANCE.createShape(); + node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds()); + node.setType(semanticHint); + ViewUtil.insertChildView(containerView, node, index, persisted); + node.setElement(domainElement); + // initializeFromPreferences + final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore(); + PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Port"); + Node label5125 = createLabel(node, OPERATION_BORDER_ITEM_LABEL); + label5125.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation()); + Location location5125 = (Location)label5125.getLayoutConstraint(); + location5125.setX(25); + location5125.setY(3); + return node; + } + protected Node createLabel(View owner, String hint) { + DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode(); + rv.setType(hint); + ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true); + return rv; + } + +} diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/provider/ParserProvider.java b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/provider/ParserProvider.java index b529637140f..032ec530a07 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/provider/ParserProvider.java +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/provider/ParserProvider.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2011 CEA LIST. + * Copyright (c) 2015 CEA LIST. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14CompositeStructureDiagram.elementtypesconfigurations b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14CompositeStructureDiagram.elementtypesconfigurations index a4f199857d5..3dea3ff4bd6 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14CompositeStructureDiagram.elementtypesconfigurations +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14CompositeStructureDiagram.elementtypesconfigurations @@ -1,349 +1,822 @@ <?xml version="1.0" encoding="ASCII"?> -<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:applystereotypeadviceconfiguration="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/uml/applystereotypeadvice/1.0" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.0" xmlns:stereotypeapplicationmatcherconfiguration="http://www.eclipse.org/payrus/elementtypesconfigurations/uml/stereotypematcherconfiguration" xmi:id="_Qt9c4Mv4EeS5BpE3hOblyw" name="SysML" identifier="org.eclipse.papyrus.SysML14.elementTypes" metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML"> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c4cv4EeS5BpE3hOblyw" name="ValueType (3080)" identifier="org.eclipse.papyrus.SysML14.ValueType_3080" hint="3080"> - <iconEntry xmi:id="_Qt9c4sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/> +<elementtypesconfigurations:ElementTypeSetConfiguration + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:applystereotypeadviceconfiguration="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/uml/applystereotypeadvice/1.0" + xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.0" + xmlns:stereotypeapplicationmatcherconfiguration="http://www.eclipse.org/payrus/elementtypesconfigurations/uml/stereotypematcherconfiguration" + xmi:id="_Qt9c4Mv4EeS5BpE3hOblyw" + name="SysML" + identifier="org.eclipse.papyrus.SysML14.elementTypes" + metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML"> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c4cv4EeS5BpE3hOblyw" + name="ValueType (3080)" + identifier="org.eclipse.papyrus.SysML14.ValueType_3080" + hint="3080"> + <iconEntry + xmi:id="_Qt9c4sv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/DataType.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ValueType</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.DataType_3080</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c48v4EeS5BpE3hOblyw" name="ValueType (2068)" identifier="org.eclipse.papyrus.SysML14.ValueType_2068" hint="2068"> - <iconEntry xmi:id="_Qt9c5Mv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c48v4EeS5BpE3hOblyw" + name="ValueType (2068)" + identifier="org.eclipse.papyrus.SysML14.ValueType_2068" + hint="2068"> + <iconEntry + xmi:id="_Qt9c5Mv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/DataType.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ValueType</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.DataType_2068</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c5cv4EeS5BpE3hOblyw" name="DistributedProperty (3070)" identifier="org.eclipse.papyrus.SysML14.DistributedProperty_3070" hint="3070"> - <iconEntry xmi:id="_Qt9c5sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c5cv4EeS5BpE3hOblyw" + name="DistributedProperty (3070)" + identifier="org.eclipse.papyrus.SysML14.DistributedProperty_3070" + hint="3070"> + <iconEntry + xmi:id="_Qt9c5sv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.DistributedProperty</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c58v4EeS5BpE3hOblyw" name="DistributedProperty (3101)" identifier="org.eclipse.papyrus.SysML14.DistributedProperty_3101" hint="3101"> - <iconEntry xmi:id="_Qt9c6Mv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c58v4EeS5BpE3hOblyw" + name="DistributedProperty (3101)" + identifier="org.eclipse.papyrus.SysML14.DistributedProperty_3101" + hint="3101"> + <iconEntry + xmi:id="_Qt9c6Mv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.DistributedProperty</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c6cv4EeS5BpE3hOblyw" name="ConnectorProperty (3070)" identifier="org.eclipse.papyrus.SysML14.ConnectorProperty_3070" hint="3070"> - <iconEntry xmi:id="_Qt9c6sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c6cv4EeS5BpE3hOblyw" + name="ConnectorProperty (3070)" + identifier="org.eclipse.papyrus.SysML14.ConnectorProperty_3070" + hint="3070"> + <iconEntry + xmi:id="_Qt9c6sv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ConnectorProperty</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c68v4EeS5BpE3hOblyw" name="ConnectorProperty (3101)" identifier="org.eclipse.papyrus.SysML14.ConnectorProperty_3101" hint="3101"> - <iconEntry xmi:id="_Qt9c7Mv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c68v4EeS5BpE3hOblyw" + name="ConnectorProperty (3101)" + identifier="org.eclipse.papyrus.SysML14.ConnectorProperty_3101" + hint="3101"> + <iconEntry + xmi:id="_Qt9c7Mv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ConnectorProperty</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c7cv4EeS5BpE3hOblyw" name="ParticipantProperty (3070)" identifier="org.eclipse.papyrus.SysML14.ParticipantProperty_3070" hint="3070"> - <iconEntry xmi:id="_Qt9c7sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c7cv4EeS5BpE3hOblyw" + name="ParticipantProperty (3070)" + identifier="org.eclipse.papyrus.SysML14.ParticipantProperty_3070" + hint="3070"> + <iconEntry + xmi:id="_Qt9c7sv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ParticipantProperty</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c78v4EeS5BpE3hOblyw" name="ParticipantProperty (3101)" identifier="org.eclipse.papyrus.SysML14.ParticipantProperty_3101" hint="3101"> - <iconEntry xmi:id="_Qt9c8Mv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c78v4EeS5BpE3hOblyw" + name="ParticipantProperty (3101)" + identifier="org.eclipse.papyrus.SysML14.ParticipantProperty_3101" + hint="3101"> + <iconEntry + xmi:id="_Qt9c8Mv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ParticipantProperty</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c8cv4EeS5BpE3hOblyw" name="BindingConnector" identifier="org.eclipse.papyrus.SysML14.BindingConnector_4013" hint="4013"> - <iconEntry xmi:id="_Qt9c8sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Connector.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c8cv4EeS5BpE3hOblyw" + name="BindingConnector" + identifier="org.eclipse.papyrus.SysML14.BindingConnector_4013" + hint="4013"> + <iconEntry + xmi:id="_Qt9c8sv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Connector.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.BindingConnector</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Connector_4013</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c88v4EeS5BpE3hOblyw" name="Block (3085)" identifier="org.eclipse.papyrus.SysML14.Block_3085" hint="3085"> - <iconEntry xmi:id="_Qt9c9Mv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c88v4EeS5BpE3hOblyw" + name="Block (3085)" + identifier="org.eclipse.papyrus.SysML14.Block_3085" + hint="3085"> + <iconEntry + xmi:id="_Qt9c9Mv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Class.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Block</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_3085</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c9cv4EeS5BpE3hOblyw" name="Block (2073)" identifier="org.eclipse.papyrus.SysML14.Block_2073" hint="2073"> - <iconEntry xmi:id="_Qt9c9sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c9cv4EeS5BpE3hOblyw" + name="Block (2073)" + identifier="org.eclipse.papyrus.SysML14.Block_2073" + hint="2073"> + <iconEntry + xmi:id="_Qt9c9sv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Class.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Block</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_2073</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c98v4EeS5BpE3hOblyw" name="EndPathMultiplicity (3070)" identifier="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3070" hint="3070"> - <iconEntry xmi:id="_Qt9c-Mv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c98v4EeS5BpE3hOblyw" + name="EndPathMultiplicity (3070)" + identifier="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3070" + hint="3070"> + <iconEntry + xmi:id="_Qt9c-Mv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.EndPathMultiplicity</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c-cv4EeS5BpE3hOblyw" name="EndPathMultiplicity (3101)" identifier="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3101" hint="3101"> - <iconEntry xmi:id="_Qt9c-sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c-cv4EeS5BpE3hOblyw" + name="EndPathMultiplicity (3101)" + identifier="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3101" + hint="3101"> + <iconEntry + xmi:id="_Qt9c-sv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.EndPathMultiplicity</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c-8v4EeS5BpE3hOblyw" name="BoundReference (3070)" identifier="org.eclipse.papyrus.SysML14.BoundReference_3070" hint="3070"> - <iconEntry xmi:id="_Qt9c_Mv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c-8v4EeS5BpE3hOblyw" + name="BoundReference (3070)" + identifier="org.eclipse.papyrus.SysML14.BoundReference_3070" + hint="3070"> + <iconEntry + xmi:id="_Qt9c_Mv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.BoundReference</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c_cv4EeS5BpE3hOblyw" name="BoundReference (3101)" identifier="org.eclipse.papyrus.SysML14.BoundReference_3101" hint="3101"> - <iconEntry xmi:id="_Qt9c_sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c_cv4EeS5BpE3hOblyw" + name="BoundReference (3101)" + identifier="org.eclipse.papyrus.SysML14.BoundReference_3101" + hint="3101"> + <iconEntry + xmi:id="_Qt9c_sv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.BoundReference</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c_8v4EeS5BpE3hOblyw" name="AdjunctProperty (3070)" identifier="org.eclipse.papyrus.SysML14.AdjunctProperty_3070" hint="3070"> - <iconEntry xmi:id="_Qt9dAMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9c_8v4EeS5BpE3hOblyw" + name="AdjunctProperty (3070)" + identifier="org.eclipse.papyrus.SysML14.AdjunctProperty_3070" + hint="3070"> + <iconEntry + xmi:id="_Qt9dAMv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.AdjunctProperty</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dAcv4EeS5BpE3hOblyw" name="AdjunctProperty (3101)" identifier="org.eclipse.papyrus.SysML14.AdjunctProperty_3101" hint="3101"> - <iconEntry xmi:id="_Qt9dAsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dAcv4EeS5BpE3hOblyw" + name="AdjunctProperty (3101)" + identifier="org.eclipse.papyrus.SysML14.AdjunctProperty_3101" + hint="3101"> + <iconEntry + xmi:id="_Qt9dAsv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.AdjunctProperty</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dA8v4EeS5BpE3hOblyw" name="ClassifierBehaviorProperty (3070)" identifier="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3070" hint="3070"> - <iconEntry xmi:id="_Qt9dBMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dA8v4EeS5BpE3hOblyw" + name="ClassifierBehaviorProperty (3070)" + identifier="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3070" + hint="3070"> + <iconEntry + xmi:id="_Qt9dBMv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dBcv4EeS5BpE3hOblyw" name="ClassifierBehaviorProperty (3101)" identifier="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3101" hint="3101"> - <iconEntry xmi:id="_Qt9dBsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dBcv4EeS5BpE3hOblyw" + name="ClassifierBehaviorProperty (3101)" + identifier="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3101" + hint="3101"> + <iconEntry + xmi:id="_Qt9dBsv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dB8v4EeS5BpE3hOblyw" name="ItemFlow" identifier="org.eclipse.papyrus.SysML14.ItemFlow_4021" hint="4021"> - <iconEntry xmi:id="_Qt9dCMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/InformationFlow.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dB8v4EeS5BpE3hOblyw" + name="ItemFlow" + identifier="org.eclipse.papyrus.SysML14.ItemFlow_4021" + hint="4021"> + <iconEntry + xmi:id="_Qt9dCMv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/InformationFlow.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ItemFlow</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.InformationFlow_4021</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dCcv4EeS5BpE3hOblyw" name="FlowProperty (3070)" identifier="org.eclipse.papyrus.SysML14.FlowProperty_3070" hint="3070"> - <iconEntry xmi:id="_Qt9dCsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dCcv4EeS5BpE3hOblyw" + name="FlowProperty (3070)" + identifier="org.eclipse.papyrus.SysML14.FlowProperty_3070" + hint="3070"> + <iconEntry + xmi:id="_Qt9dCsv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.FlowProperty</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dC8v4EeS5BpE3hOblyw" name="FlowProperty (3101)" identifier="org.eclipse.papyrus.SysML14.FlowProperty_3101" hint="3101"> - <iconEntry xmi:id="_Qt9dDMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dC8v4EeS5BpE3hOblyw" + name="FlowProperty (3101)" + identifier="org.eclipse.papyrus.SysML14.FlowProperty_3101" + hint="3101"> + <iconEntry + xmi:id="_Qt9dDMv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Property.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.FlowProperty</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dDcv4EeS5BpE3hOblyw" name="FullPort" identifier="org.eclipse.papyrus.SysML14.FullPort_3069" hint="3069"> - <iconEntry xmi:id="_Qt9dDsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Port.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dDcv4EeS5BpE3hOblyw" + name="FullPort" + identifier="org.eclipse.papyrus.SysML14.FullPort_3069" + hint="3069"> + <iconEntry + xmi:id="_Qt9dDsv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Port.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.FullPort</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Port_3069</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dD8v4EeS5BpE3hOblyw" name="InterfaceBlock (3085)" identifier="org.eclipse.papyrus.SysML14.InterfaceBlock_3085" hint="3085"> - <iconEntry xmi:id="_Qt9dEMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dD8v4EeS5BpE3hOblyw" + name="InterfaceBlock (3085)" + identifier="org.eclipse.papyrus.SysML14.InterfaceBlock_3085" + hint="3085"> + <iconEntry + xmi:id="_Qt9dEMv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Class.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.InterfaceBlock</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_3085</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dEcv4EeS5BpE3hOblyw" name="InterfaceBlock (2073)" identifier="org.eclipse.papyrus.SysML14.InterfaceBlock_2073" hint="2073"> - <iconEntry xmi:id="_Qt9dEsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dEcv4EeS5BpE3hOblyw" + name="InterfaceBlock (2073)" + identifier="org.eclipse.papyrus.SysML14.InterfaceBlock_2073" + hint="2073"> + <iconEntry + xmi:id="_Qt9dEsv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Class.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.InterfaceBlock</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_2073</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dE8v4EeS5BpE3hOblyw" name="ProxyPort" identifier="org.eclipse.papyrus.SysML14.ProxyPort_3069" hint="3069"> - <iconEntry xmi:id="_Qt9dFMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Port.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dE8v4EeS5BpE3hOblyw" + name="ProxyPort" + identifier="org.eclipse.papyrus.SysML14.ProxyPort_3069" + hint="3069"> + <iconEntry + xmi:id="_Qt9dFMv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Port.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ProxyPort</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Port_3069</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dFcv4EeS5BpE3hOblyw" name="ChangeStructuralFeatureEvent" identifier="org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent_2088" hint="2088"> - <iconEntry xmi:id="_Qt9dFsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/ChangeEvent.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dFcv4EeS5BpE3hOblyw" + name="ChangeStructuralFeatureEvent" + identifier="org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent_2088" + hint="2088"> + <iconEntry + xmi:id="_Qt9dFsv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/ChangeEvent.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.ChangeEvent_2088</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dF8v4EeS5BpE3hOblyw" name="ControlOperator Operation" identifier="org.eclipse.papyrus.SysML14.ControlOperator_Operation_3102" hint="3102"> - <iconEntry xmi:id="_Qt9dGMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Operation.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dF8v4EeS5BpE3hOblyw" + name="ControlOperator Operation" + identifier="org.eclipse.papyrus.SysML14.ControlOperator_Operation_3102" + hint="3102"> + <iconEntry + xmi:id="_Qt9dGMv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Operation.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ControlOperator_Operation</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Operation_3102</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dGcv4EeS5BpE3hOblyw" name="Rate Parameter" identifier="org.eclipse.papyrus.SysML14.Rate_Parameter_3088" hint="3088"> - <iconEntry xmi:id="_Qt9dGsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Parameter.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dGcv4EeS5BpE3hOblyw" + name="Rate Parameter" + identifier="org.eclipse.papyrus.SysML14.Rate_Parameter_3088" + hint="3088"> + <iconEntry + xmi:id="_Qt9dGsv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Parameter.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Rate_Parameter</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Parameter_3088</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dG8v4EeS5BpE3hOblyw" name="Discrete Parameter" identifier="org.eclipse.papyrus.SysML14.Discrete_Parameter_3088" hint="3088"> - <iconEntry xmi:id="_Qt9dHMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Parameter.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dG8v4EeS5BpE3hOblyw" + name="Discrete Parameter" + identifier="org.eclipse.papyrus.SysML14.Discrete_Parameter_3088" + hint="3088"> + <iconEntry + xmi:id="_Qt9dHMv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Parameter.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Discrete_Parameter</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Parameter_3088</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dHcv4EeS5BpE3hOblyw" name="Continuous Parameter" identifier="org.eclipse.papyrus.SysML14.Continuous_Parameter_3088" hint="3088"> - <iconEntry xmi:id="_Qt9dHsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Parameter.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dHcv4EeS5BpE3hOblyw" + name="Continuous Parameter" + identifier="org.eclipse.papyrus.SysML14.Continuous_Parameter_3088" + hint="3088"> + <iconEntry + xmi:id="_Qt9dHsv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Parameter.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Continuous_Parameter</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Parameter_3088</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dH8v4EeS5BpE3hOblyw" name="Optional" identifier="org.eclipse.papyrus.SysML14.Optional_3088" hint="3088"> - <iconEntry xmi:id="_Qt9dIMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Parameter.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dH8v4EeS5BpE3hOblyw" + name="Optional" + identifier="org.eclipse.papyrus.SysML14.Optional_3088" + hint="3088"> + <iconEntry + xmi:id="_Qt9dIMv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Parameter.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Optional</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Parameter_3088</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dIcv4EeS5BpE3hOblyw" name="Rationale (3097)" identifier="org.eclipse.papyrus.SysML14.Rationale_3097" hint="3097"> - <iconEntry xmi:id="_Qt9dIsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dIcv4EeS5BpE3hOblyw" + name="Rationale (3097)" + identifier="org.eclipse.papyrus.SysML14.Rationale_3097" + hint="3097"> + <iconEntry + xmi:id="_Qt9dIsv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Comment.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Rationale</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Comment_3097</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dI8v4EeS5BpE3hOblyw" name="Rationale (2109)" identifier="org.eclipse.papyrus.SysML14.Rationale_2109" hint="2109"> - <iconEntry xmi:id="_Qt9dJMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dI8v4EeS5BpE3hOblyw" + name="Rationale (2109)" + identifier="org.eclipse.papyrus.SysML14.Rationale_2109" + hint="2109"> + <iconEntry + xmi:id="_Qt9dJMv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Comment.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Rationale</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Comment_2109</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dJcv4EeS5BpE3hOblyw" name="View Package" identifier="org.eclipse.papyrus.SysML14.View_Package_CompositeStructure" hint="CompositeStructure"> - <iconEntry xmi:id="_Qt9dJsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Package.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dJcv4EeS5BpE3hOblyw" + name="View Package" + identifier="org.eclipse.papyrus.SysML14.View_Package_CompositeStructure" + hint="CompositeStructure"> + <iconEntry + xmi:id="_Qt9dJsv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Package.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Package_1000</specializedTypesID> - <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Qt9dJ8v4EeS5BpE3hOblyw"> + <matcherConfiguration + xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" + xmi:id="_Qt9dJ8v4EeS5BpE3hOblyw"> <stereotypesQualifiedNames>SysML::ModelElements::View</stereotypesQualifiedNames> </matcherConfiguration> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dKMv4EeS5BpE3hOblyw" name="View (3085)" identifier="org.eclipse.papyrus.SysML14.View_Class_3085" hint="3085"> - <iconEntry xmi:id="_Qt9dKcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dKMv4EeS5BpE3hOblyw" + name="View (3085)" + identifier="org.eclipse.papyrus.SysML14.View_Class_3085" + hint="3085"> + <iconEntry + xmi:id="_Qt9dKcv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Class.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.View_Class</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_3085</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dKsv4EeS5BpE3hOblyw" name="View (2073)" identifier="org.eclipse.papyrus.SysML14.View_Class_2073" hint="2073"> - <iconEntry xmi:id="_Qt9dK8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dKsv4EeS5BpE3hOblyw" + name="View (2073)" + identifier="org.eclipse.papyrus.SysML14.View_Class_2073" + hint="2073"> + <iconEntry + xmi:id="_Qt9dK8v4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Class.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.View_Class</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_2073</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dLMv4EeS5BpE3hOblyw" name="Conform Dependency" identifier="org.eclipse.papyrus.SysML14.Conform_Dependency_4010" hint="4010"> - <iconEntry xmi:id="_Qt9dLcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dLMv4EeS5BpE3hOblyw" + name="Conform Dependency" + identifier="org.eclipse.papyrus.SysML14.Conform_Dependency_4010" + hint="4010"> + <iconEntry + xmi:id="_Qt9dLcv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Dependency.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Conform_Dependency</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Dependency_4010</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dLsv4EeS5BpE3hOblyw" name="Conform Generalization" identifier="org.eclipse.papyrus.SysML14.Conform_Generalization_4015" hint="4015"> - <iconEntry xmi:id="_Qt9dL8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Generalization.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dLsv4EeS5BpE3hOblyw" + name="Conform Generalization" + identifier="org.eclipse.papyrus.SysML14.Conform_Generalization_4015" + hint="4015"> + <iconEntry + xmi:id="_Qt9dL8v4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Generalization.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Conform_Generalization</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Generalization_4015</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dMMv4EeS5BpE3hOblyw" name="Problem (3097)" identifier="org.eclipse.papyrus.SysML14.Problem_3097" hint="3097"> - <iconEntry xmi:id="_Qt9dMcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dMMv4EeS5BpE3hOblyw" + name="Problem (3097)" + identifier="org.eclipse.papyrus.SysML14.Problem_3097" + hint="3097"> + <iconEntry + xmi:id="_Qt9dMcv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Comment.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Problem</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Comment_3097</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dMsv4EeS5BpE3hOblyw" name="Problem (2109)" identifier="org.eclipse.papyrus.SysML14.Problem_2109" hint="2109"> - <iconEntry xmi:id="_Qt9dM8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dMsv4EeS5BpE3hOblyw" + name="Problem (2109)" + identifier="org.eclipse.papyrus.SysML14.Problem_2109" + hint="2109"> + <iconEntry + xmi:id="_Qt9dM8v4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Comment.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Problem</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Comment_2109</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dNMv4EeS5BpE3hOblyw" name="ViewPoint (3085)" identifier="org.eclipse.papyrus.SysML14.ViewPoint_3085" hint="3085"> - <iconEntry xmi:id="_Qt9dNcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dNMv4EeS5BpE3hOblyw" + name="ViewPoint (3085)" + identifier="org.eclipse.papyrus.SysML14.ViewPoint_3085" + hint="3085"> + <iconEntry + xmi:id="_Qt9dNcv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Class.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ViewPoint</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_3085</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dNsv4EeS5BpE3hOblyw" name="ViewPoint (2073)" identifier="org.eclipse.papyrus.SysML14.ViewPoint_2073" hint="2073"> - <iconEntry xmi:id="_Qt9dN8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dNsv4EeS5BpE3hOblyw" + name="ViewPoint (2073)" + identifier="org.eclipse.papyrus.SysML14.ViewPoint_2073" + hint="2073"> + <iconEntry + xmi:id="_Qt9dN8v4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Class.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ViewPoint</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_2073</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dOMv4EeS5BpE3hOblyw" name="Expose" identifier="org.eclipse.papyrus.SysML14.Expose_4010" hint="4010"> - <iconEntry xmi:id="_Qt9dOcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dOMv4EeS5BpE3hOblyw" + name="Expose" + identifier="org.eclipse.papyrus.SysML14.Expose_4010" + hint="4010"> + <iconEntry + xmi:id="_Qt9dOcv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Dependency.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Expose</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Dependency_4010</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dOsv4EeS5BpE3hOblyw" name="ElementGroup (3097)" identifier="org.eclipse.papyrus.SysML14.ElementGroup_3097" hint="3097"> - <iconEntry xmi:id="_Qt9dO8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dOsv4EeS5BpE3hOblyw" + name="ElementGroup (3097)" + identifier="org.eclipse.papyrus.SysML14.ElementGroup_3097" + hint="3097"> + <iconEntry + xmi:id="_Qt9dO8v4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Comment.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ElementGroup</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Comment_3097</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dPMv4EeS5BpE3hOblyw" name="ElementGroup (2109)" identifier="org.eclipse.papyrus.SysML14.ElementGroup_2109" hint="2109"> - <iconEntry xmi:id="_Qt9dPcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dPMv4EeS5BpE3hOblyw" + name="ElementGroup (2109)" + identifier="org.eclipse.papyrus.SysML14.ElementGroup_2109" + hint="2109"> + <iconEntry + xmi:id="_Qt9dPcv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Comment.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ElementGroup</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Comment_2109</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dPsv4EeS5BpE3hOblyw" name="ConstraintBlock (3085)" identifier="org.eclipse.papyrus.SysML14.ConstraintBlock_3085" hint="3085"> - <iconEntry xmi:id="_Qt9dP8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dPsv4EeS5BpE3hOblyw" + name="ConstraintBlock (3085)" + identifier="org.eclipse.papyrus.SysML14.ConstraintBlock_3085" + hint="3085"> + <iconEntry + xmi:id="_Qt9dP8v4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Class.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ConstraintBlock</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_3085</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dQMv4EeS5BpE3hOblyw" name="ConstraintBlock (2073)" identifier="org.eclipse.papyrus.SysML14.ConstraintBlock_2073" hint="2073"> - <iconEntry xmi:id="_Qt9dQcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dQMv4EeS5BpE3hOblyw" + name="ConstraintBlock (2073)" + identifier="org.eclipse.papyrus.SysML14.ConstraintBlock_2073" + hint="2073"> + <iconEntry + xmi:id="_Qt9dQcv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Class.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.ConstraintBlock</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_2073</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dQsv4EeS5BpE3hOblyw" name="Allocate Abstraction" identifier="org.eclipse.papyrus.SysML14.Allocate_Abstraction_4007" hint="4007"> - <iconEntry xmi:id="_Qt9dQ8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dQsv4EeS5BpE3hOblyw" + name="Allocate Abstraction" + identifier="org.eclipse.papyrus.SysML14.Allocate_Abstraction_4007" + hint="4007"> + <iconEntry + xmi:id="_Qt9dQ8v4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Abstraction.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Allocate_Abstraction</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dRMv4EeS5BpE3hOblyw" name="DeriveReqt Abstraction" identifier="org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction_4007" hint="4007"> - <iconEntry xmi:id="_Qt9dRcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dRMv4EeS5BpE3hOblyw" + name="DeriveReqt Abstraction" + identifier="org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction_4007" + hint="4007"> + <iconEntry + xmi:id="_Qt9dRcv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Abstraction.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dRsv4EeS5BpE3hOblyw" name="Copy Abstraction" identifier="org.eclipse.papyrus.SysML14.Copy_Abstraction_4007" hint="4007"> - <iconEntry xmi:id="_Qt9dR8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dRsv4EeS5BpE3hOblyw" + name="Copy Abstraction" + identifier="org.eclipse.papyrus.SysML14.Copy_Abstraction_4007" + hint="4007"> + <iconEntry + xmi:id="_Qt9dR8v4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Abstraction.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Copy_Abstraction</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dSMv4EeS5BpE3hOblyw" name="Satisfy Abstraction" identifier="org.eclipse.papyrus.SysML14.Satisfy_Abstraction_4007" hint="4007"> - <iconEntry xmi:id="_Qt9dScv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dSMv4EeS5BpE3hOblyw" + name="Satisfy Abstraction" + identifier="org.eclipse.papyrus.SysML14.Satisfy_Abstraction_4007" + hint="4007"> + <iconEntry + xmi:id="_Qt9dScv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Abstraction.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Satisfy_Abstraction</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dSsv4EeS5BpE3hOblyw" name="TestCase Operation" identifier="org.eclipse.papyrus.SysML14.TestCase_Operation_3102" hint="3102"> - <iconEntry xmi:id="_Qt9dS8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Operation.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dSsv4EeS5BpE3hOblyw" + name="TestCase Operation" + identifier="org.eclipse.papyrus.SysML14.TestCase_Operation_3102" + hint="3102"> + <iconEntry + xmi:id="_Qt9dS8v4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Operation.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.TestCase_Operation</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Operation_3102</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dTMv4EeS5BpE3hOblyw" name="Requirement (3085)" identifier="org.eclipse.papyrus.SysML14.Requirement_3085" hint="3085"> - <iconEntry xmi:id="_Qt9dTcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dTMv4EeS5BpE3hOblyw" + name="Requirement (3085)" + identifier="org.eclipse.papyrus.SysML14.Requirement_3085" + hint="3085"> + <iconEntry + xmi:id="_Qt9dTcv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Class.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Requirement</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_3085</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dTsv4EeS5BpE3hOblyw" name="Requirement (2073)" identifier="org.eclipse.papyrus.SysML14.Requirement_2073" hint="2073"> - <iconEntry xmi:id="_Qt9dT8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dTsv4EeS5BpE3hOblyw" + name="Requirement (2073)" + identifier="org.eclipse.papyrus.SysML14.Requirement_2073" + hint="2073"> + <iconEntry + xmi:id="_Qt9dT8v4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Class.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Requirement</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_2073</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dUMv4EeS5BpE3hOblyw" name="Verify Abstraction" identifier="org.eclipse.papyrus.SysML14.Verify_Abstraction_4007" hint="4007"> - <iconEntry xmi:id="_Qt9dUcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dUMv4EeS5BpE3hOblyw" + name="Verify Abstraction" + identifier="org.eclipse.papyrus.SysML14.Verify_Abstraction_4007" + hint="4007"> + <iconEntry + xmi:id="_Qt9dUcv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Abstraction.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Verify_Abstraction</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dUsv4EeS5BpE3hOblyw" name="Trace Abstraction" identifier="org.eclipse.papyrus.SysML14.Trace_Abstraction_4007" hint="4007"> - <iconEntry xmi:id="_Qt9dU8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dUsv4EeS5BpE3hOblyw" + name="Trace Abstraction" + identifier="org.eclipse.papyrus.SysML14.Trace_Abstraction_4007" + hint="4007"> + <iconEntry + xmi:id="_Qt9dU8v4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Abstraction.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Trace_Abstraction</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dVMv4EeS5BpE3hOblyw" name="Refine Abstraction" identifier="org.eclipse.papyrus.SysML14.Refine_Abstraction_4007" hint="4007"> - <iconEntry xmi:id="_Qt9dVcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dVMv4EeS5BpE3hOblyw" + name="Refine Abstraction" + identifier="org.eclipse.papyrus.SysML14.Refine_Abstraction_4007" + hint="4007"> + <iconEntry + xmi:id="_Qt9dVcv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Abstraction.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.Refine_Abstraction</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dVsv4EeS5BpE3hOblyw" name="FlowPort" identifier="org.eclipse.papyrus.SysML14.FlowPort_3069" hint="3069"> - <iconEntry xmi:id="_Qt9dV8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Port.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dVsv4EeS5BpE3hOblyw" + name="FlowPort" + identifier="org.eclipse.papyrus.SysML14.FlowPort_3069" + hint="3069"> + <iconEntry + xmi:id="_Qt9dV8v4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Port.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.FlowPort</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Port_3069</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dWMv4EeS5BpE3hOblyw" name="FlowSpecification (3087)" identifier="org.eclipse.papyrus.SysML14.FlowSpecification_3087" hint="3087"> - <iconEntry xmi:id="_Qt9dWcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Interface.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dWMv4EeS5BpE3hOblyw" + name="FlowSpecification (3087)" + identifier="org.eclipse.papyrus.SysML14.FlowSpecification_3087" + hint="3087"> + <iconEntry + xmi:id="_Qt9dWcv4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Interface.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.FlowSpecification</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Interface_3087</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dWsv4EeS5BpE3hOblyw" name="FlowSpecification (2076)" identifier="org.eclipse.papyrus.SysML14.FlowSpecification_2076" hint="2076"> - <iconEntry xmi:id="_Qt9dW8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Interface.gif" bundleId="org.eclipse.uml2.uml.edit"/> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_Qt9dWsv4EeS5BpE3hOblyw" + name="FlowSpecification (2076)" + identifier="org.eclipse.papyrus.SysML14.FlowSpecification_2076" + hint="2076"> + <iconEntry + xmi:id="_Qt9dW8v4EeS5BpE3hOblyw" + iconPath="/icons/full/obj16/Interface.gif" + bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.SysML14.FlowSpecification</specializedTypesID> <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Interface_2076</specializedTypesID> </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dXMv4EeS5BpE3hOblyw" name="Deprecated (3070)" identifier="org.eclipse.papyrus.SysML14.Deprecated_Property_3070" hint="3070"> - <iconEntry xmi:id="_Qt9dXcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID> - </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dXsv4EeS5BpE3hOblyw" name="Deprecated (3101)" identifier="org.eclipse.papyrus.SysML14.Deprecated_Property_3101" hint="3101"> - <iconEntry xmi:id="_Qt9dX8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID> - </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dYMv4EeS5BpE3hOblyw" name="Deprecated (3085)" identifier="org.eclipse.papyrus.SysML14.Deprecated_Class_3085" hint="3085"> - <iconEntry xmi:id="_Qt9dYcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Class</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_3085</specializedTypesID> - </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dYsv4EeS5BpE3hOblyw" name="Deprecated (2073)" identifier="org.eclipse.papyrus.SysML14.Deprecated_Class_2073" hint="2073"> - <iconEntry xmi:id="_Qt9dY8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Class</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_2073</specializedTypesID> - </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dZMv4EeS5BpE3hOblyw" name="Deprecated Generalization" identifier="org.eclipse.papyrus.SysML14.Deprecated_Generalization_4015" hint="4015"> - <iconEntry xmi:id="_Qt9dZcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Generalization.gif" bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Generalization</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Generalization_4015</specializedTypesID> - </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dZsv4EeS5BpE3hOblyw" name="Deprecated (3080)" identifier="org.eclipse.papyrus.SysML14.Deprecated_DataType_3080" hint="3080"> - <iconEntry xmi:id="_Qt9dZ8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_DataType</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.DataType_3080</specializedTypesID> - </elementTypeConfigurations> - <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9daMv4EeS5BpE3hOblyw" name="Deprecated (2068)" identifier="org.eclipse.papyrus.SysML14.Deprecated_DataType_2068" hint="2068"> - <iconEntry xmi:id="_Qt9dacv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_DataType</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.DataType_2068</specializedTypesID> - </elementTypeConfigurations> - <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_Qt9dasv4EeS5BpE3hOblyw" name="Apply View" identifier="org.eclipse.papyrus.SysML14.view_CompositeStructure" target="_Qt9dJcv4EeS5BpE3hOblyw"> - <stereotypesToApply xmi:id="_Qt9da8v4EeS5BpE3hOblyw" stereotypeQualifiedName="SysML::ModelElements::View" updateName="true"> + <adviceBindingsConfigurations + xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" + xmi:id="_Qt9dasv4EeS5BpE3hOblyw" + name="Apply View" + identifier="org.eclipse.papyrus.SysML14.view_CompositeStructure" + target="_Qt9dJcv4EeS5BpE3hOblyw"> + <stereotypesToApply + xmi:id="_Qt9da8v4EeS5BpE3hOblyw" + stereotypeQualifiedName="SysML::ModelElements::View" + updateName="true"> <requiredProfiles>SysML</requiredProfiles> </stereotypesToApply> </adviceBindingsConfigurations> diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14UMLClassDiagram.elementtypesconfigurations b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14UMLClassDiagram.elementtypesconfigurations index abe00530cac..ec7e20a4e31 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14UMLClassDiagram.elementtypesconfigurations +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14UMLClassDiagram.elementtypesconfigurations @@ -2260,420 +2260,6 @@ </elementTypeConfigurations> <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYdcJQEeSX9MoKMBV5Gw" - name="Deprecated (3002)" - identifier="org.eclipse.papyrus.sysML.Deprecated_Property_3002" - hint="3002"> - <iconEntry - xmi:id="_LoKYdsJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Property.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Property_3002</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYd8JQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYeMJQEeSX9MoKMBV5Gw" - name="Deprecated (3005)" - identifier="org.eclipse.papyrus.sysML.Deprecated_Property_3005" - hint="3005"> - <iconEntry - xmi:id="_LoKYecJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Property.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Property_3005</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYesJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYe8JQEeSX9MoKMBV5Gw" - name="Deprecated (3006)" - identifier="org.eclipse.papyrus.sysML.Deprecated_Property_3006" - hint="3006"> - <iconEntry - xmi:id="_LoKYfMJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Property.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Property_3006</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYfcJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYfsJQEeSX9MoKMBV5Gw" - name="Deprecated (3012)" - identifier="org.eclipse.papyrus.sysML.Deprecated_Property_3012" - hint="3012"> - <iconEntry - xmi:id="_LoKYf8JQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Property.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Property_3012</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYgMJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYgcJQEeSX9MoKMBV5Gw" - name="Deprecated (3018)" - identifier="org.eclipse.papyrus.sysML.Deprecated_Property_3018" - hint="3018"> - <iconEntry - xmi:id="_LoKYgsJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Property.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Property_3018</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYg8JQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYhMJQEeSX9MoKMBV5Gw" - name="Deprecated (3041)" - identifier="org.eclipse.papyrus.sysML.Deprecated_Property_3041" - hint="3041"> - <iconEntry - xmi:id="_LoKYhcJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Property.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Property_3041</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYhsJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYh8JQEeSX9MoKMBV5Gw" - name="Deprecated (4021)" - identifier="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_4021" - hint="4021"> - <iconEntry - xmi:id="_LoKYiMJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/InstanceSpecification.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_InstanceSpecification</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecificationLink_4021</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYicJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYisJQEeSX9MoKMBV5Gw" - name="Deprecated (2001)" - identifier="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_2001" - hint="2001"> - <iconEntry - xmi:id="_LoKYi8JQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/InstanceSpecification.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_InstanceSpecification</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_2001</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYjMJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYjcJQEeSX9MoKMBV5Gw" - name="Deprecated (3020)" - identifier="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_3020" - hint="3020"> - <iconEntry - xmi:id="_LoKYjsJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/InstanceSpecification.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_InstanceSpecification</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_3020</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYj8JQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYkMJQEeSX9MoKMBV5Gw" - name="Deprecated (2008)" - identifier="org.eclipse.papyrus.sysML.Deprecated_Class_2008" - hint="2008"> - <iconEntry - xmi:id="_LoKYkcJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Class.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Class</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_2008</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYksJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYk8JQEeSX9MoKMBV5Gw" - name="Deprecated (3004)" - identifier="org.eclipse.papyrus.sysML.Deprecated_Class_3004" - hint="3004"> - <iconEntry - xmi:id="_LoKYlMJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Class.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Class</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_3004</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYlcJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYlsJQEeSX9MoKMBV5Gw" - name="Deprecated (3008)" - identifier="org.eclipse.papyrus.sysML.Deprecated_Class_3008" - hint="3008"> - <iconEntry - xmi:id="_LoKYl8JQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Class.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Class</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_3008</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYmMJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYmcJQEeSX9MoKMBV5Gw" - name="Deprecated (3010)" - identifier="org.eclipse.papyrus.sysML.Deprecated_Class_3010" - hint="3010"> - <iconEntry - xmi:id="_LoKYmsJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Class.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Class</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_3010</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYm8JQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYnMJQEeSX9MoKMBV5Gw" - name="Deprecated (3014)" - identifier="org.eclipse.papyrus.sysML.Deprecated_Class_3014" - hint="3014"> - <iconEntry - xmi:id="_LoKYncJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Class.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Class</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_3014</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYnsJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYn8JQEeSX9MoKMBV5Gw" - name="Deprecated (2015)" - identifier="org.eclipse.papyrus.sysML.Deprecated_Association_2015" - hint="2015"> - <iconEntry - xmi:id="_LoKYoMJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Association.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Association</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Association_2015</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYocJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYosJQEeSX9MoKMBV5Gw" - name="Deprecated (4001)" - identifier="org.eclipse.papyrus.sysML.Deprecated_Association_4001" - hint="4001"> - <iconEntry - xmi:id="_LoKYo8JQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Association.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Association</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Association_4001</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYpMJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYpcJQEeSX9MoKMBV5Gw" - name="Deprecated (4019)" - identifier="org.eclipse.papyrus.sysML.Deprecated_Association_4019" - hint="4019"> - <iconEntry - xmi:id="_LoKYpsJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Association.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Association</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Association_4019</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYp8JQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYqMJQEeSX9MoKMBV5Gw" - name="Deprecated Generalization" - identifier="org.eclipse.papyrus.sysML.Deprecated_Generalization_4002" - hint="4002"> - <iconEntry - xmi:id="_LoKYqcJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/Generalization.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Generalization</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Generalization_4002</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYqsJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYq8JQEeSX9MoKMBV5Gw" - name="Deprecated (2010)" - identifier="org.eclipse.papyrus.sysML.Deprecated_DataType_2010" - hint="2010"> - <iconEntry - xmi:id="_LoKYrMJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/DataType.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_DataType</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.DataType_2010</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYrcJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYrsJQEeSX9MoKMBV5Gw" - name="Deprecated (3027)" - identifier="org.eclipse.papyrus.sysML.Deprecated_DataType_3027" - hint="3027"> - <iconEntry - xmi:id="_LoKYr8JQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/DataType.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_DataType</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.DataType_3027</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYsMJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYscJQEeSX9MoKMBV5Gw" - name="Deprecated (3043)" - identifier="org.eclipse.papyrus.sysML.Deprecated_DataType_3043" - hint="3043"> - <iconEntry - xmi:id="_LoKYssJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/DataType.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_DataType</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.DataType_3043</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYs8JQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYtMJQEeSX9MoKMBV5Gw" - name="Deprecated (3044)" - identifier="org.eclipse.papyrus.sysML.Deprecated_DataType_3044" - hint="3044"> - <iconEntry - xmi:id="_LoKYtcJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/DataType.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_DataType</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.DataType_3044</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYtsJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_LoKYt8JQEeSX9MoKMBV5Gw" - name="Deprecated (3045)" - identifier="org.eclipse.papyrus.sysML.Deprecated_DataType_3045" - hint="3045"> - <iconEntry - xmi:id="_LoKYuMJQEeSX9MoKMBV5Gw" - iconPath="/icons/full/obj16/DataType.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_DataType</specializedTypesID> - <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.DataType_3045</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_LoKYucJQEeSX9MoKMBV5Gw"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_tjVDYM1xEeSsRbN4ihgqDg" name="FlowPort (FlowPort_Label)" description="" @@ -2838,4 +2424,96 @@ bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.uml.Constraint</specializedTypesID> </elementTypeConfigurations> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_HQFw0OduEeSUQvXhEVQh8w" + name="Actor" + description="Create an Actor in a UML Class Diagram" + identifier="org.eclipse.papyrus.sysML.Actor_2008" + hint="2008"> + <iconEntry + xmi:id="_HQFw0eduEeSUQvXhEVQh8w" + iconPath="/icons/full/obj16/Constraint.gif" + bundleId="org.eclipse.uml2.uml.edit"/> + <specializedTypesID>org.eclipse.papyrus.uml.Actor</specializedTypesID> + </elementTypeConfigurations> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_7fjysOgVEeSUQvXhEVQh8w" + name="Unit_2001" + description="Create an Unit in a UML Class Diagram" + identifier="org.eclipse.papyrus.sysML.Unit_2001" + hint="2001"> + <specializedTypesID>org.eclipse.papyrus.SysML14.Unit</specializedTypesID> + <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_2001</specializedTypesID> + </elementTypeConfigurations> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_v7PJAOgXEeSUQvXhEVQh8w" + name="Unit_3020" + description="Create an Unit in a UML Class Diagram" + identifier="org.eclipse.papyrus.sysML.Unit_3020" + hint="3020"> + <specializedTypesID>org.eclipse.papyrus.SysML14.Unit</specializedTypesID> + <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_3020</specializedTypesID> + </elementTypeConfigurations> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_zWOO4OgnEeSUQvXhEVQh8w" + name="QuantityKind_2001" + description="Create an QuantityKind in a UML Class Diagram" + identifier="org.eclipse.papyrus.sysML.QuantityKind_2001" + hint="2001"> + <specializedTypesID>org.eclipse.papyrus.SysML14.QuantityKind</specializedTypesID> + <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_2001</specializedTypesID> + </elementTypeConfigurations> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_zWOO4egnEeSUQvXhEVQh8w" + name="QuantityKind_3020" + description="Create an QuantityKind in a UML Class Diagram" + identifier="org.eclipse.papyrus.sysML.QuantityKind_3020" + hint="3020"> + <specializedTypesID>org.eclipse.papyrus.SysML14.QuantityKind</specializedTypesID> + <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_3020</specializedTypesID> + </elementTypeConfigurations> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_X7E5oOgtEeSUQvXhEVQh8w" + name="PartAssociation_2015" + description="Create an Part Association in a UML Class Diagram" + identifier="org.eclipse.papyrus.sysML.PartAssociation_2015" + hint="2015"> + <specializedTypesID>org.eclipse.papyrus.SysML14.PartAssociation</specializedTypesID> + <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Association_2015</specializedTypesID> + </elementTypeConfigurations> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_nJF78OgtEeSUQvXhEVQh8w" + name="PartAssociation_4001" + description="Create an Part Association in a UML Class Diagram" + identifier="org.eclipse.papyrus.sysML.PartAssociation_4001" + hint="4001"> + <specializedTypesID>org.eclipse.papyrus.SysML14.PartAssociation</specializedTypesID> + <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Association_4001</specializedTypesID> + </elementTypeConfigurations> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_oAQ0gOgtEeSUQvXhEVQh8w" + name="PartAssociation_4019" + description="Create an Part Association in a UML Class Diagram" + identifier="org.eclipse.papyrus.sysML.PartAssociation_4019" + hint="4019"> + <specializedTypesID>org.eclipse.papyrus.SysML14.PartAssociation</specializedTypesID> + <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Association_4019</specializedTypesID> + </elementTypeConfigurations> + <elementTypeConfigurations + xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" + xmi:id="_gdLMgOmsEeSrzJhCjczRog" + name="Class_Port" + description="Create an UML Port in an UML Class Diagram" + identifier="org.eclipse.papyrus.sysML.Class_Port" + hint="Class_Port"> + <specializedTypesID>org.eclipse.papyrus.uml.Port</specializedTypesID> + </elementTypeConfigurations> </elementtypesconfigurations:ElementTypeSetConfiguration> diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/palette/internalBlockDiagram.paletteconfiguration b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/palette/internalBlockDiagram.paletteconfiguration index 6356115b552..7d4a10a3b02 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/palette/internalBlockDiagram.paletteconfiguration +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/palette/internalBlockDiagram.paletteconfiguration @@ -1,215 +1,564 @@ <?xml version="1.0" encoding="ASCII"?> -<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7" id="palettemodel" label="SysML"> - <drawerConfigurations id="SysML Nodes" label="SysML Nodes" description="SysML Nodes"> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ClassifierBehaviorProperty" label="ClassifierBehaviorProperty" description="Create a ClassifierBehaviorProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.DistributedProperty" label="DistributedProperty" description="Create a DistributedProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.DistributedProperty_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.DistributedProperty_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ConnectorProperty" label="ConnectorProperty" description="Create a ConnectorProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ConnectorProperty_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ConnectorProperty_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ParticipantProperty" label="ParticipantProperty" description="Create a ParticipantProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ParticipantProperty_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ParticipantProperty_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.FlowProperty" label="FlowProperty" description="Create a FlowProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowProperty_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowProperty_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Block" label="Block" description="Create a Block"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/blocks/Block.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Block_3085"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Block_2073"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ValueType" label="ValueType" description="Create a ValueType"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/blocks/ValueType.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ValueType_3080"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ValueType_2068"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ConstraintBlock" label="ConstraintBlock" description="Create a ConstraintBlock"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/constraints/ConstraintBlock.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ConstraintBlock_3085"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ConstraintBlock_2073"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Requirement" label="Requirement" description="Create a Requirement"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Requirement.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Requirement_3085"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Requirement_2073"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Problem" label="Problem" description="Create a Problem"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/modelelements/Problem.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Problem_3097"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Problem_2109"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.FlowSpecification" label="FlowSpecification" description="Create a FlowSpecification"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Interface.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowSpecification_3087"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowSpecification_2076"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ViewPoint" label="ViewPoint" description="Create a ViewPoint"> - <icon pluginID="org.eclipse.papyrus.sysml.edit" iconPath="icons/full/obj16/ViewPoint.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ViewPoint_3085"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ViewPoint_2073"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.TestCase Operation" label="TestCase Operation" description="Create a TestCase Operation"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Operation.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.TestCase_Operation_3102"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ControlOperator Operation" label="ControlOperator Operation" description="Create a ControlOperator Operation"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Operation.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ControlOperator_Operation_3102"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Rationale" label="Rationale" description="Create a Rationale"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/modelelements/Rationale.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Rationale_3097"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Rationale_2109"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.View_Class" label="View" description="Create a View"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.View_Class_3085"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.View_Class_2073"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.View Package" label="View Package" description="Create a View Package"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Package.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.View_Package_CompositeStructure"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.InterfaceBlock " label="InterfaceBlock" description="Create a InterfaceBlock"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.InterfaceBlock_3085"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.InterfaceBlock_2073"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.AdjunctProperty" label="AdjunctProperty" description="Create a AdjunctProperty "> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.AdjunctProperty_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.AdjunctProperty_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.FlowPort" label="FlowPort" description="Create a FlowPort"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/portandflows/FlowPort.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowPort_3069"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.EndPathMultiplicity " label="EndPathMultiplicity" description="Create a EndPathMultiplicity"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Rate Parameter" label="Rate Parameter" description="Create a Rate Parameter"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Parameter.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Rate_Parameter_3088"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Discrete Parameter" label="Discrete Parameter" description="Create a Discrete Parameter"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Parameter.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Discrete_Parameter_3088"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Continuous Parameter" label="Continuous Parameter" description="Create a Continuous Parameter"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Parameter.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Continuous_Parameter_3088"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ChangeStructuralFeatureEvent" label="ChangeStructuralFeatureEvent" description="Create a ChangeStructuralFeatureEvent"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/ChangeEvent.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent_2088"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ElementGroup" label="ElementGroup" description="Create a ElementGroup"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Comment.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ElementGroup_3097"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ElementGroup_2109"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Optional" label="Optional" description="Create a Optional"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Parameter.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Optional_3088"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.FullPort" label="FullPort" description="Create a FullPort"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Port.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FullPort_3069"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ProxyPort" label="ProxyPort" description="Create a ProxyPort"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Port.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ProxyPort_3069"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.BoundReference" label="BoundReference" description="Create a BoundReference"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.BoundReference_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.BoundReference_3101"/> +<paletteconfiguration:PaletteConfiguration + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7" + id="palettemodel" + label="SysML"> + <drawerConfigurations + id="palette.sysml.ibd.nodes" + label="Nodes" + description="Nodes"> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Comment" + label="Comment" + description="Create a comment"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Comment.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Comment_2109"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Comment_3097"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Constraint" + label="Constraint" + description="Create a constraint"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Constraint.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Constraint_3120"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Constraint_2114"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.BoundReference" + label="BoundReference" + description="Create a BoundReference"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.BoundReference_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.BoundReference_3101"/> </ownedConfigurations> </drawerConfigurations> - <drawerConfigurations id="SysML Edges" label="SysML Edges" description="SysML Edges"> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Expose" label="Expose" description="Create a Expose" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Dependency.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Expose_4010"/> + <drawerConfigurations + id="palette.sysml.ibd.edges" + label="Edges" + description="Edges"> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.BindingConnector" + label="BindingConnector" + description="Create a BindingConnector"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Connector.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.BindingConnector_4013"/> </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Copy Abstraction" label="Copy Abstraction" description="Create a Copy Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Copy.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Copy_Abstraction_4007"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Verify Abstraction" label="Verify Abstraction" description="Create a Verify Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Verify.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Verify_Abstraction_4007"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Trace Abstraction" label="Trace Abstraction" description="Create a Trace Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Trace_Abstraction_4007"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Conform Dependency" label="Conform Dependency" description="Create a Conform Dependency" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Dependency.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Conform_Dependency_4010"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Conform Generalization" label="Conform Generalization" description="Create a Conform Generalization" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Generalization.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Conform_Generalization_4015"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Refine Abstraction" label="Refine Abstraction" description="Create a Refine Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Refine_Abstraction_4007"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Allocate Abstraction" label="Allocate Abstraction" description="Create a Allocate Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Allocate_Abstraction_4007"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.DeriveReqt Abstraction" label="DeriveReqt Abstraction" description="Create a DeriveReqt Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction_4007"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Satisfy Abstraction" label="Satisfy Abstraction" description="Create a Satisfy Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Satisfy.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Satisfy_Abstraction_4007"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ItemFlow" label="ItemFlow" description="Create a ItemFlow" kind="ConnectionTool"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/portandflows/ItemFlow.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ItemFlow_4021"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.BindingConnector" label="BindingConnector" description="Create a BindingConnector"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Connector.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.BindingConnector_4013"/> + </drawerConfigurations> + <drawerConfigurations + id="SysML Nodes" + label="Other Nodes" + description="Other Nodes"> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ClassifierBehaviorProperty" + label="ClassifierBehaviorProperty" + description="Create a ClassifierBehaviorProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3101"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.DistributedProperty" + label="DistributedProperty" + description="Create a DistributedProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.DistributedProperty_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.DistributedProperty_3101"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ConnectorProperty" + label="ConnectorProperty" + description="Create a ConnectorProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ConnectorProperty_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ConnectorProperty_3101"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ParticipantProperty" + label="ParticipantProperty" + description="Create a ParticipantProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ParticipantProperty_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ParticipantProperty_3101"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.FlowProperty" + label="FlowProperty" + description="Create a FlowProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.FlowProperty_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.FlowProperty_3101"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Block" + label="Block" + description="Create a Block"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/blocks/Block.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Block_3085"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Block_2073"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ValueType" + label="ValueType" + description="Create a ValueType"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/blocks/ValueType.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ValueType_3080"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ValueType_2068"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ConstraintBlock" + label="ConstraintBlock" + description="Create a ConstraintBlock"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/constraints/ConstraintBlock.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ConstraintBlock_3085"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ConstraintBlock_2073"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Requirement" + label="Requirement" + description="Create a Requirement"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/requirements/Requirement.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Requirement_3085"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Requirement_2073"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Problem" + label="Problem" + description="Create a Problem"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/modelelements/Problem.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Problem_3097"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Problem_2109"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.FlowSpecification" + label="FlowSpecification" + description="Create a FlowSpecification"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Interface.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.FlowSpecification_3087"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.FlowSpecification_2076"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ViewPoint" + label="ViewPoint" + description="Create a ViewPoint"> + <icon + pluginID="org.eclipse.papyrus.sysml.edit" + iconPath="icons/full/obj16/ViewPoint.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ViewPoint_3085"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ViewPoint_2073"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.TestCase Operation" + label="TestCase Operation" + description="Create a TestCase Operation"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Operation.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.TestCase_Operation_3102"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ControlOperator Operation" + label="ControlOperator Operation" + description="Create a ControlOperator Operation"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Operation.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ControlOperator_Operation_3102"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Rationale" + label="Rationale" + description="Create a Rationale"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/modelelements/Rationale.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Rationale_3097"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Rationale_2109"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.View_Class" + label="View" + description="Create a View"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Class.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.View_Class_3085"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.View_Class_2073"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.View Package" + label="View Package" + description="Create a View Package"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Package.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.View_Package_CompositeStructure"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.InterfaceBlock " + label="InterfaceBlock" + description="Create a InterfaceBlock"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Class.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.InterfaceBlock_3085"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.InterfaceBlock_2073"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.AdjunctProperty" + label="AdjunctProperty" + description="Create a AdjunctProperty "> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.AdjunctProperty_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.AdjunctProperty_3101"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.FlowPort" + label="FlowPort" + description="Create a FlowPort"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/portandflows/FlowPort.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.FlowPort_3069"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.EndPathMultiplicity " + label="EndPathMultiplicity" + description="Create a EndPathMultiplicity"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3101"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Rate Parameter" + label="Rate Parameter" + description="Create a Rate Parameter"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Parameter.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Rate_Parameter_3088"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Discrete Parameter" + label="Discrete Parameter" + description="Create a Discrete Parameter"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Parameter.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Discrete_Parameter_3088"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Continuous Parameter" + label="Continuous Parameter" + description="Create a Continuous Parameter"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Parameter.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Continuous_Parameter_3088"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ChangeStructuralFeatureEvent" + label="ChangeStructuralFeatureEvent" + description="Create a ChangeStructuralFeatureEvent"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/ChangeEvent.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent_2088"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ElementGroup" + label="ElementGroup" + description="Create a ElementGroup"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Comment.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ElementGroup_3097"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ElementGroup_2109"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Optional" + label="Optional" + description="Create a Optional"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Parameter.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Optional_3088"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.FullPort" + label="FullPort" + description="Create a FullPort"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Port.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.FullPort_3069"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ProxyPort" + label="ProxyPort" + description="Create a ProxyPort"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Port.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ProxyPort_3069"/> </ownedConfigurations> </drawerConfigurations> - <drawerConfigurations id="Deprecated" label="Deprecated" description="Deprecated"> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Deprecated_DataType" label="Deprecated_DataType" description="Create a Deprecated"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/DataType.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_DataType_2068"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_DataType_3080"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Deprecated Generalization" label="Deprecated Generalization" description="Create a Deprecated Generalization" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Generalization.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Generalization_4015"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Deprecated.property" label="Deprecated_Property" description="Create a Deprecated Property"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Property_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Property_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Deprecated_Class" label="Deprecated_Class" description="Create a Deprecated_Class"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Class_3085"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Class_2073"/> + <drawerConfigurations + id="SysML Edges" + label="Other Edges" + description="Other Edges"> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Expose" + label="Expose" + description="Create a Expose" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Dependency.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Expose_4010"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Copy Abstraction" + label="Copy Abstraction" + description="Create a Copy Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/requirements/Copy.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Copy_Abstraction_4007"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Verify Abstraction" + label="Verify Abstraction" + description="Create a Verify Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/requirements/Verify.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Verify_Abstraction_4007"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Trace Abstraction" + label="Trace Abstraction" + description="Create a Trace Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Abstraction.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Trace_Abstraction_4007"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Conform Dependency" + label="Conform Dependency" + description="Create a Conform Dependency" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Dependency.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Conform_Dependency_4010"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Conform Generalization" + label="Conform Generalization" + description="Create a Conform Generalization" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Generalization.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Conform_Generalization_4015"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Refine Abstraction" + label="Refine Abstraction" + description="Create a Refine Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Abstraction.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Refine_Abstraction_4007"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Allocate Abstraction" + label="Allocate Abstraction" + description="Create a Allocate Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Abstraction.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Allocate_Abstraction_4007"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.DeriveReqt Abstraction" + label="DeriveReqt Abstraction" + description="Create a DeriveReqt Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Abstraction.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction_4007"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Satisfy Abstraction" + label="Satisfy Abstraction" + description="Create a Satisfy Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/requirements/Satisfy.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Satisfy_Abstraction_4007"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ItemFlow" + label="ItemFlow" + description="Create a ItemFlow" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/portandflows/ItemFlow.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ItemFlow_4021"/> </ownedConfigurations> </drawerConfigurations> </paletteconfiguration:PaletteConfiguration> diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric/resources/palette/parametricDiagramPalette.paletteconfiguration b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric/resources/palette/parametricDiagramPalette.paletteconfiguration index 6356115b552..488e5cfa606 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric/resources/palette/parametricDiagramPalette.paletteconfiguration +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric/resources/palette/parametricDiagramPalette.paletteconfiguration @@ -1,215 +1,580 @@ <?xml version="1.0" encoding="ASCII"?> -<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7" id="palettemodel" label="SysML"> - <drawerConfigurations id="SysML Nodes" label="SysML Nodes" description="SysML Nodes"> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ClassifierBehaviorProperty" label="ClassifierBehaviorProperty" description="Create a ClassifierBehaviorProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.DistributedProperty" label="DistributedProperty" description="Create a DistributedProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.DistributedProperty_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.DistributedProperty_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ConnectorProperty" label="ConnectorProperty" description="Create a ConnectorProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ConnectorProperty_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ConnectorProperty_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ParticipantProperty" label="ParticipantProperty" description="Create a ParticipantProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ParticipantProperty_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ParticipantProperty_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.FlowProperty" label="FlowProperty" description="Create a FlowProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowProperty_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowProperty_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Block" label="Block" description="Create a Block"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/blocks/Block.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Block_3085"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Block_2073"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ValueType" label="ValueType" description="Create a ValueType"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/blocks/ValueType.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ValueType_3080"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ValueType_2068"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ConstraintBlock" label="ConstraintBlock" description="Create a ConstraintBlock"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/constraints/ConstraintBlock.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ConstraintBlock_3085"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ConstraintBlock_2073"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Requirement" label="Requirement" description="Create a Requirement"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Requirement.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Requirement_3085"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Requirement_2073"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Problem" label="Problem" description="Create a Problem"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/modelelements/Problem.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Problem_3097"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Problem_2109"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.FlowSpecification" label="FlowSpecification" description="Create a FlowSpecification"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Interface.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowSpecification_3087"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowSpecification_2076"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ViewPoint" label="ViewPoint" description="Create a ViewPoint"> - <icon pluginID="org.eclipse.papyrus.sysml.edit" iconPath="icons/full/obj16/ViewPoint.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ViewPoint_3085"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ViewPoint_2073"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.TestCase Operation" label="TestCase Operation" description="Create a TestCase Operation"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Operation.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.TestCase_Operation_3102"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ControlOperator Operation" label="ControlOperator Operation" description="Create a ControlOperator Operation"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Operation.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ControlOperator_Operation_3102"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Rationale" label="Rationale" description="Create a Rationale"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/modelelements/Rationale.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Rationale_3097"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Rationale_2109"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.View_Class" label="View" description="Create a View"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.View_Class_3085"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.View_Class_2073"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.View Package" label="View Package" description="Create a View Package"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Package.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.View_Package_CompositeStructure"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.InterfaceBlock " label="InterfaceBlock" description="Create a InterfaceBlock"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.InterfaceBlock_3085"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.InterfaceBlock_2073"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.AdjunctProperty" label="AdjunctProperty" description="Create a AdjunctProperty "> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.AdjunctProperty_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.AdjunctProperty_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.FlowPort" label="FlowPort" description="Create a FlowPort"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/portandflows/FlowPort.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowPort_3069"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.EndPathMultiplicity " label="EndPathMultiplicity" description="Create a EndPathMultiplicity"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Rate Parameter" label="Rate Parameter" description="Create a Rate Parameter"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Parameter.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Rate_Parameter_3088"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Discrete Parameter" label="Discrete Parameter" description="Create a Discrete Parameter"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Parameter.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Discrete_Parameter_3088"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Continuous Parameter" label="Continuous Parameter" description="Create a Continuous Parameter"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Parameter.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Continuous_Parameter_3088"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ChangeStructuralFeatureEvent" label="ChangeStructuralFeatureEvent" description="Create a ChangeStructuralFeatureEvent"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/ChangeEvent.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent_2088"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ElementGroup" label="ElementGroup" description="Create a ElementGroup"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Comment.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ElementGroup_3097"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ElementGroup_2109"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Optional" label="Optional" description="Create a Optional"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Parameter.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Optional_3088"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.FullPort" label="FullPort" description="Create a FullPort"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Port.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FullPort_3069"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ProxyPort" label="ProxyPort" description="Create a ProxyPort"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Port.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ProxyPort_3069"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.BoundReference" label="BoundReference" description="Create a BoundReference"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.BoundReference_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.BoundReference_3101"/> +<paletteconfiguration:PaletteConfiguration + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7" + id="palettemodel" + label="SysML"> + <drawerConfigurations + id="palette.sysml.parametric.nodes" + label="Nodes" + description="Nodes"> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Comment" + label="Comment" + description="Create a comment"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Comment.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Comment_2109"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Comment_3097"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Constraint" + label="Constraint" + description="Create a constraint"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Constraint.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Constraint_3120"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Constraint_2114"/> </ownedConfigurations> </drawerConfigurations> - <drawerConfigurations id="SysML Edges" label="SysML Edges" description="SysML Edges"> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Expose" label="Expose" description="Create a Expose" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Dependency.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Expose_4010"/> + <drawerConfigurations + id="palette.sysml.parametric.edges" + label="Edges" + description="Edges"> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Dependency" + label="Dependency" + description="Create a dependency" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="/icons/full/obj16/Dependency.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4018"/> </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Copy Abstraction" label="Copy Abstraction" description="Create a Copy Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Copy.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Copy_Abstraction_4007"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Verify Abstraction" label="Verify Abstraction" description="Create a Verify Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Verify.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Verify_Abstraction_4007"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Trace Abstraction" label="Trace Abstraction" description="Create a Trace Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Trace_Abstraction_4007"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Conform Dependency" label="Conform Dependency" description="Create a Conform Dependency" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Dependency.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Conform_Dependency_4010"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Conform Generalization" label="Conform Generalization" description="Create a Conform Generalization" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Generalization.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Conform_Generalization_4015"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Refine Abstraction" label="Refine Abstraction" description="Create a Refine Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Refine_Abstraction_4007"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Allocate Abstraction" label="Allocate Abstraction" description="Create a Allocate Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Allocate_Abstraction_4007"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.DeriveReqt Abstraction" label="DeriveReqt Abstraction" description="Create a DeriveReqt Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction_4007"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Satisfy Abstraction" label="Satisfy Abstraction" description="Create a Satisfy Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Satisfy.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Satisfy_Abstraction_4007"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ItemFlow" label="ItemFlow" description="Create a ItemFlow" kind="ConnectionTool"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/portandflows/ItemFlow.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ItemFlow_4021"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.BindingConnector" label="BindingConnector" description="Create a BindingConnector"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Connector.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.BindingConnector_4013"/> + </drawerConfigurations> + <drawerConfigurations + id="SysML Nodes" + label="Other Nodes" + description="Other Nodes"> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ClassifierBehaviorProperty" + label="ClassifierBehaviorProperty" + description="Create a ClassifierBehaviorProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3101"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.DistributedProperty" + label="DistributedProperty" + description="Create a DistributedProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.DistributedProperty_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.DistributedProperty_3101"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ConnectorProperty" + label="ConnectorProperty" + description="Create a ConnectorProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ConnectorProperty_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ConnectorProperty_3101"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ParticipantProperty" + label="ParticipantProperty" + description="Create a ParticipantProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ParticipantProperty_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ParticipantProperty_3101"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.FlowProperty" + label="FlowProperty" + description="Create a FlowProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.FlowProperty_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.FlowProperty_3101"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Block" + label="Block" + description="Create a Block"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/blocks/Block.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Block_3085"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Block_2073"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ValueType" + label="ValueType" + description="Create a ValueType"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/blocks/ValueType.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ValueType_3080"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ValueType_2068"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ConstraintBlock" + label="ConstraintBlock" + description="Create a ConstraintBlock"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/constraints/ConstraintBlock.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ConstraintBlock_3085"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ConstraintBlock_2073"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Requirement" + label="Requirement" + description="Create a Requirement"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/requirements/Requirement.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Requirement_3085"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Requirement_2073"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Problem" + label="Problem" + description="Create a Problem"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/modelelements/Problem.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Problem_3097"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Problem_2109"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.FlowSpecification" + label="FlowSpecification" + description="Create a FlowSpecification"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Interface.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.FlowSpecification_3087"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.FlowSpecification_2076"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ViewPoint" + label="ViewPoint" + description="Create a ViewPoint"> + <icon + pluginID="org.eclipse.papyrus.sysml.edit" + iconPath="icons/full/obj16/ViewPoint.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ViewPoint_3085"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ViewPoint_2073"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.TestCase Operation" + label="TestCase Operation" + description="Create a TestCase Operation"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Operation.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.TestCase_Operation_3102"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ControlOperator Operation" + label="ControlOperator Operation" + description="Create a ControlOperator Operation"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Operation.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ControlOperator_Operation_3102"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Rationale" + label="Rationale" + description="Create a Rationale"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/modelelements/Rationale.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Rationale_3097"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Rationale_2109"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.View_Class" + label="View" + description="Create a View"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Class.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.View_Class_3085"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.View_Class_2073"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.View Package" + label="View Package" + description="Create a View Package"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Package.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.View_Package_CompositeStructure"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.InterfaceBlock " + label="InterfaceBlock" + description="Create a InterfaceBlock"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Class.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.InterfaceBlock_3085"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.InterfaceBlock_2073"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.AdjunctProperty" + label="AdjunctProperty" + description="Create a AdjunctProperty "> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.AdjunctProperty_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.AdjunctProperty_3101"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.FlowPort" + label="FlowPort" + description="Create a FlowPort"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/portandflows/FlowPort.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.FlowPort_3069"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.EndPathMultiplicity " + label="EndPathMultiplicity" + description="Create a EndPathMultiplicity"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3101"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Rate Parameter" + label="Rate Parameter" + description="Create a Rate Parameter"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Parameter.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Rate_Parameter_3088"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Discrete Parameter" + label="Discrete Parameter" + description="Create a Discrete Parameter"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Parameter.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Discrete_Parameter_3088"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Continuous Parameter" + label="Continuous Parameter" + description="Create a Continuous Parameter"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Parameter.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Continuous_Parameter_3088"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ChangeStructuralFeatureEvent" + label="ChangeStructuralFeatureEvent" + description="Create a ChangeStructuralFeatureEvent"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/ChangeEvent.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent_2088"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ElementGroup" + label="ElementGroup" + description="Create a ElementGroup"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Comment.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ElementGroup_3097"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ElementGroup_2109"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Optional" + label="Optional" + description="Create a Optional"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Parameter.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Optional_3088"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.FullPort" + label="FullPort" + description="Create a FullPort"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Port.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.FullPort_3069"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ProxyPort" + label="ProxyPort" + description="Create a ProxyPort"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Port.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ProxyPort_3069"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.BoundReference" + label="BoundReference" + description="Create a BoundReference"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.BoundReference_3070"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.BoundReference_3101"/> </ownedConfigurations> </drawerConfigurations> - <drawerConfigurations id="Deprecated" label="Deprecated" description="Deprecated"> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Deprecated_DataType" label="Deprecated_DataType" description="Create a Deprecated"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/DataType.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_DataType_2068"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_DataType_3080"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Deprecated Generalization" label="Deprecated Generalization" description="Create a Deprecated Generalization" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Generalization.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Generalization_4015"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Deprecated.property" label="Deprecated_Property" description="Create a Deprecated Property"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Property_3070"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Property_3101"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Deprecated_Class" label="Deprecated_Class" description="Create a Deprecated_Class"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Class_3085"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Class_2073"/> + <drawerConfigurations + id="SysML Edges" + label="Other Edges" + description="Other Edges"> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Expose" + label="Expose" + description="Create a Expose" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Dependency.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Expose_4010"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Copy Abstraction" + label="Copy Abstraction" + description="Create a Copy Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/requirements/Copy.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Copy_Abstraction_4007"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Verify Abstraction" + label="Verify Abstraction" + description="Create a Verify Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/requirements/Verify.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Verify_Abstraction_4007"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Trace Abstraction" + label="Trace Abstraction" + description="Create a Trace Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Abstraction.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Trace_Abstraction_4007"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Conform Dependency" + label="Conform Dependency" + description="Create a Conform Dependency" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Dependency.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Conform_Dependency_4010"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Conform Generalization" + label="Conform Generalization" + description="Create a Conform Generalization" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Generalization.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Conform_Generalization_4015"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Refine Abstraction" + label="Refine Abstraction" + description="Create a Refine Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Abstraction.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Refine_Abstraction_4007"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Allocate Abstraction" + label="Allocate Abstraction" + description="Create a Allocate Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Abstraction.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Allocate_Abstraction_4007"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.DeriveReqt Abstraction" + label="DeriveReqt Abstraction" + description="Create a DeriveReqt Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Abstraction.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction_4007"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.Satisfy Abstraction" + label="Satisfy Abstraction" + description="Create a Satisfy Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/requirements/Satisfy.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.Satisfy_Abstraction_4007"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.ItemFlow" + label="ItemFlow" + description="Create a ItemFlow" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/portandflows/ItemFlow.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.ItemFlow_4021"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="palettemodel.BindingConnector" + label="BindingConnector" + description="Create a BindingConnector"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Connector.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.SysML14.BindingConnector_4013"/> </ownedConfigurations> </drawerConfigurations> </paletteconfiguration:PaletteConfiguration> diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement/resources/palette/requirementDiagram.paletteconfiguration b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement/resources/palette/requirementDiagram.paletteconfiguration index 3b32816b51f..e9bc06562e4 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement/resources/palette/requirementDiagram.paletteconfiguration +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement/resources/palette/requirementDiagram.paletteconfiguration @@ -1,283 +1,630 @@ <?xml version="1.0" encoding="ASCII"?> -<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7" id="palettemodel" label="SysML"> - <drawerConfigurations id="WorkingPalette" label="WorkingPalette" description="WorkingPalette"> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Block" label="Block" description="Create a Block"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/blocks/Block.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Block_2008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Block_3004"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Block_3008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Block_3010"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Block_3014"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Requirement" label="Requirement" description="Create a Requirement"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Requirement.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Requirement_2008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Requirement_3004"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Requirement_3008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Requirement_3010"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Requirement_3014"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Satisfy_Abstraction" label="Satisfy" description="Create a Satisfy" kind="ConnectionTool"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Satisfy.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Satisfy_Abstraction_4006"/> +<paletteconfiguration:PaletteConfiguration + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7" + id="palettemodel" + label="SysML"> + <drawerConfigurations + id="palette.sysml.requirement.nodes" + label="Nodes" + description="Nodes"> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Package" + label="Package" + description="Create a package"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Package.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Package_2007"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Package_3009"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Requirement" + label="Requirement" + description="Create a Requirement"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/requirements/Requirement.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Requirement_2008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Requirement_3004"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Requirement_3008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Requirement_3010"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Requirement_3014"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Problem" + label="Problem" + description="Create a Problem"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/modelelements/Problem.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Problem_2012"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Problem_3028"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Rationale" + label="Rationale" + description="Create a Rationale"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/modelelements/Rationale.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Rationale_2012"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Rationale_3028"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.TestCase_Operation" + label="TestCase" + description="Create a TestCase"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Operation.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3003"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3007"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3013"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3019"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3042"/> </ownedConfigurations> </drawerConfigurations> - <drawerConfigurations id="Nodes" label="Nodes" description="Nodes"> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.AdjunctProperty" label="AdjunctProperty" description="Create a AdjunctProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3002"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3005"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3006"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3012"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3018"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3041"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.BoundReference" label="BoundReference" description="Create a BoundReference"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3002"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3005"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3006"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3012"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3018"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3041"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty" label="ClassifierBehaviorProperty" description="Create a ClassifierBehaviorProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3002"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3005"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3006"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3012"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3018"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3041"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ConnectorProperty" label="ConnectorProperty" description="Create a ConnectorProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3002"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3005"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3006"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3012"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3018"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3041"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ConstraintBlock" label="ConstraintBlock" description="Create a ConstraintBlock"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/constraints/ConstraintBlock.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_2008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3004"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3010"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3014"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ControlOperator_Operation" label="ControlOperator" description="Create a ControlOperator"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Operation.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3003"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3007"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3013"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3019"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3042"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.DistributedProperty" label="DistributedProperty" description="Create a DistributedProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3002"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3005"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3006"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3012"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3018"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3041"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ElementGroup" label="ElementGroup" description="Create a ElementGroup"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Comment.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ElementGroup_2012"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ElementGroup_3028"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.EndPathMultiplicity" label="EndPathMultiplicity" description="Create a EndPathMultiplicity"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3002"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3005"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3006"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3012"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3018"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3041"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.FlowProperty" label="FlowProperty" description="Create a FlowProperty"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/portandflows/FlowProperty.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3002"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3005"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3006"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3012"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3018"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3041"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.FlowSpecification" label="FlowSpecification" description="Create a FlowSpecification"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Interface.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_2004"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3023"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3036"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3037"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3038"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.InterfaceBlock" label="InterfaceBlock" description="Create a InterfaceBlock"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_2008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3004"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3010"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3014"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ParticipantProperty" label="ParticipantProperty" description="Create a ParticipantProperty"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3002"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3005"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3006"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3012"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3018"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3041"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Problem" label="Problem" description="Create a Problem"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/modelelements/Problem.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Problem_2012"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Problem_3028"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Rationale" label="Rationale" description="Create a Rationale"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/modelelements/Rationale.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Rationale_2012"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Rationale_3028"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.TestCase_Operation" label="TestCase" description="Create a TestCase"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Operation.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3003"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3007"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3013"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3019"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3042"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.View_Package" label="View" description="Create a View"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Package.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Package_2007"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Package_3009"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ViewPoint" label="ViewPoint" description="Create a ViewPoint"> - <icon pluginID="org.eclipse.papyrus.sysml.edit" iconPath="icons/full/obj16/ViewPoint.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_2008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3004"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3010"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3014"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.View_Class" label="View Class" description="Create a View Class"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Class_2008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Class_3004"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Class_3008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Class_3010"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Class_3014"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ValueType" label="ValueType" description="Create a ValueType"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/blocks/ValueType.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ValueType_2010"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ValueType_3027"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ValueType_3043"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ValueType_3044"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ValueType_3045"/> + <drawerConfigurations + id="palette.sysml.requirement.edges" + label="Edges" + description="Edges"> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Copy_Abstraction" + label="Copy" + description="Create a Copy" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/requirements/Copy.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Copy_Abstraction_4006"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.DeriveReqt_Abstraction" + label="DeriveReqt" + description="Create a DeriveReqt Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Abstraction.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.DeriveReqt_Abstraction_4006"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Satisfy_Abstraction" + label="Satisfy" + description="Create a Satisfy" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/requirements/Satisfy.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Satisfy_Abstraction_4006"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Verify_Abstraction" + label="Verify" + description="Create a Verify"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/requirements/Verify.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Verify_Abstraction_4006"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Refine_Abstraction" + label="Refine" + description="Create a Refine" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Abstraction.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Refine_Abstraction_4006"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Trace_Abstraction" + label="Trace" + description="Create a Trace" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Abstraction.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Trace_Abstraction_4006"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Link" + label="Link" + description="Create a Link" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.papyrus.uml.diagram.clazz" + iconPath="icons/obj16/Link.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Link_4016"/> </ownedConfigurations> </drawerConfigurations> - <drawerConfigurations id="Edges" label="Edges" description="Edges"> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Copy_Abstraction" label="Copy" description="Create a Copy" kind="ConnectionTool"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Copy.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Copy_Abstraction_4006"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Verify_Abstraction" label="Verify" description="Create a Verify"> - <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Verify.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Verify_Abstraction_4006"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Trace_Abstraction" label="Trace" description="Create a Trace" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Trace_Abstraction_4006"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Refine_Abstraction" label="Refine" description="Create a Refine" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Refine_Abstraction_4006"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Conform_Generalization" label="Conform" description="Create a Conform Generalization" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Generalization.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Conform_Generalization_4002"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Allocate_Abstraction" label="Allocate" description="Create a Allocate Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Allocate_Abstraction_4006"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.DeriveReqt_Abstraction" label="DeriveReqt" description="Create a DeriveReqt Abstraction" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.DeriveReqt_Abstraction_4006"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Conform_Dependency" label="Conform" description="Create a Conform " kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Dependency.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Conform_Dependency_2014"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Conform_Dependency_4008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Conform_Dependency_4018"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Expose" label="Expose" description="Create a Expose" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Dependency.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Expose_2014"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Expose_4008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Expose_4018"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ItemFlow" label="ItemFlow" description="Create a ItemFlow" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/InformationFlow.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ItemFlow_4026"/> + <drawerConfigurations + id="Other SysML Elements" + label="Other SysML Elements" + description="Other SysML Elements"> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.View_Package_PapyrusUMLClassDi" + label="View" + description="Create a View"> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.View_Package_PapyrusUMLClassDiagram"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Allocated" + label="Allocated" + description="Create a Allocated"> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Allocated_2097"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.RequirementRelated" + label="RequirementRelated" + description="Create a RequirementRelated"> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.RequirementRelated_2097"/> </ownedConfigurations> </drawerConfigurations> - <drawerConfigurations id="Other SysML Elements" label="Other SysML Elements" description="Other SysML Elements"> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.View_Package_PapyrusUMLClassDi" label="View" description="Create a View"> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Package_PapyrusUMLClassDiagram"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Allocated" label="Allocated" description="Create a Allocated"> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Allocated_2097"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.RequirementRelated" label="RequirementRelated" description="Create a RequirementRelated"> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.RequirementRelated_2097"/> + <drawerConfigurations + id="Nodes" + label="Other Nodes" + description="Other Nodes"> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.AdjunctProperty" + label="AdjunctProperty" + description="Create a AdjunctProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3002"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3005"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3006"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3012"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3018"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3041"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.BoundReference" + label="BoundReference" + description="Create a BoundReference"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3002"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3005"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3006"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3012"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3018"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3041"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty" + label="ClassifierBehaviorProperty" + description="Create a ClassifierBehaviorProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3002"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3005"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3006"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3012"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3018"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3041"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.ConnectorProperty" + label="ConnectorProperty" + description="Create a ConnectorProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3002"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3005"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3006"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3012"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3018"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3041"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.ConstraintBlock" + label="ConstraintBlock" + description="Create a ConstraintBlock"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/constraints/ConstraintBlock.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_2008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3004"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3010"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3014"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.ControlOperator_Operation" + label="ControlOperator" + description="Create a ControlOperator"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Operation.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3003"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3007"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3013"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3019"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3042"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.DistributedProperty" + label="DistributedProperty" + description="Create a DistributedProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3002"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3005"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3006"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3012"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3018"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3041"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.ElementGroup" + label="ElementGroup" + description="Create a ElementGroup"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Comment.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ElementGroup_2012"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ElementGroup_3028"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.EndPathMultiplicity" + label="EndPathMultiplicity" + description="Create a EndPathMultiplicity"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3002"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3005"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3006"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3012"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3018"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3041"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.FlowProperty" + label="FlowProperty" + description="Create a FlowProperty"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/portandflows/FlowProperty.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3002"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3005"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3006"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3012"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3018"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3041"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.FlowSpecification" + label="FlowSpecification" + description="Create a FlowSpecification"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Interface.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_2004"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3023"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3036"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3037"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3038"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.InterfaceBlock" + label="InterfaceBlock" + description="Create a InterfaceBlock"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Class.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_2008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3004"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3010"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3014"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.ParticipantProperty" + label="ParticipantProperty" + description="Create a ParticipantProperty"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Property.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3002"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3005"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3006"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3012"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3018"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3041"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.View_Package" + label="View" + description="Create a View"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Package.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.View_Package_2007"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.View_Package_3009"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.ViewPoint" + label="ViewPoint" + description="Create a ViewPoint"> + <icon + pluginID="org.eclipse.papyrus.sysml.edit" + iconPath="icons/full/obj16/ViewPoint.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_2008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3004"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3010"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3014"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.View_Class" + label="View Class" + description="Create a View Class"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Class.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.View_Class_2008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.View_Class_3004"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.View_Class_3008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.View_Class_3010"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.View_Class_3014"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.ValueType" + label="ValueType" + description="Create a ValueType"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/blocks/ValueType.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ValueType_2010"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ValueType_3027"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ValueType_3043"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ValueType_3044"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ValueType_3045"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Block" + label="Block" + description="Create a Block"> + <icon + pluginID="org.eclipse.papyrus.sysml" + iconPath="icons/blocks/Block.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Block_2008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Block_3004"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Block_3008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Block_3010"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Block_3014"/> </ownedConfigurations> </drawerConfigurations> - <drawerConfigurations id="Deprecated" label="Deprecated" description="Deprecated"> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Deprecated_Property" label="Property (Deprecated)" description="Create a Deprecated Property"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3002"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3005"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3006"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3012"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3018"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3041"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification" label="InstanceSpecification (Deprecated)" description="Create a Deprecated InstanceSpecification"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/InstanceSpecification.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_4021"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_2001"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_3020"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Deprecated_Class" label="Class (Deprecated)" description="Create a Deprecated Class" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_2008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3004"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3008"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3010"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3014"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Deprecated_Association" label="Association (Deprecated)" description="Create a Deprecated Association" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Association.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Association_2015"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Association_4001"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Association_4019"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Deprecated_Generalization" label="Generalization (Deprecated)" description="Create a Deprecated Generalization" kind="ConnectionTool"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Generalization.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Generalization_4002"/> - </ownedConfigurations> - <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Deprecated_DataType" label="DataType (Deprecated)" description="Create a Deprecated DataType"> - <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/DataType.gif"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_2010"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3027"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3043"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3044"/> - <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3045"/> + <drawerConfigurations + id="Edges" + label="Other Edges" + description="Other Edges"> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Conform_Generalization" + label="Conform" + description="Create a Conform Generalization" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Generalization.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Conform_Generalization_4002"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Allocate_Abstraction" + label="Allocate" + description="Create a Allocate Abstraction" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Abstraction.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Allocate_Abstraction_4006"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Conform_Dependency" + label="Conform" + description="Create a Conform " + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Dependency.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Conform_Dependency_2014"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Conform_Dependency_4008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Conform_Dependency_4018"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.Expose" + label="Expose" + description="Create a Expose" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/Dependency.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Expose_2014"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Expose_4008"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.Expose_4018"/> + </ownedConfigurations> + <ownedConfigurations + xsi:type="paletteconfiguration:ToolConfiguration" + id="org.eclipse.papyrus.sysML.ItemFlow" + label="ItemFlow" + description="Create a ItemFlow" + kind="ConnectionTool"> + <icon + pluginID="org.eclipse.uml2.uml.edit" + iconPath="icons/full/obj16/InformationFlow.gif"/> + <elementDescriptors + elementTypeId="org.eclipse.papyrus.sysML.ItemFlow_4026"/> </ownedConfigurations> </drawerConfigurations> </paletteconfiguration:PaletteConfiguration> diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/META-INF/MANIFEST.MF b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/META-INF/MANIFEST.MF index 40b69402b0f..57dc976a32e 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/META-INF/MANIFEST.MF +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/META-INF/MANIFEST.MF @@ -7,9 +7,14 @@ Bundle-Activator: org.eclipse.papyrus.sysml14.service.types.Activator Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.papyrus.infra.elementtypesconfigurations;bundle-version="1.1.0", - org.eclipse.papyrus.infra.newchild;bundle-version="1.1.0" + org.eclipse.papyrus.infra.newchild;bundle-version="1.1.0", + org.eclipse.gmf.runtime.emf.type.core, + org.eclipse.uml2.uml, + org.eclipse.papyrus.sysml14;bundle-version="1.1.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Bundle-ActivationPolicy: lazy Bundle-Vendor: %providerName Bundle-Description: %pluginDescription Bundle-Localization: plugin +Export-Package: org.eclipse.papyrus.sysml14.service.types, + org.eclipse.papyrus.sysml14.service.types.advice diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/model/SysML14.elementtypesconfigurations b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/model/SysML14.elementtypesconfigurations index 9d17e6ea2cc..3ddad5a2ed3 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/model/SysML14.elementtypesconfigurations +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/model/SysML14.elementtypesconfigurations @@ -1253,122 +1253,46 @@ </elementTypeConfigurations> <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_k4SnXLwFEeSwNLK2W02HwA" - name="Deprecated ValueSpecification" - identifier="org.eclipse.papyrus.SysML14.Deprecated_ValueSpecification" - hint="UML::ValueSpecification"> - <iconEntry - xmi:id="_k4SnXbwFEeSwNLK2W02HwA" - iconPath="/icons/full/obj16/ValueSpecification.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.uml.ValueSpecification</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_k4SnXrwFEeSwNLK2W02HwA"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_k4SnX7wFEeSwNLK2W02HwA" - name="Deprecated Property" - identifier="org.eclipse.papyrus.SysML14.Deprecated_Property" - hint="UML::Property"> - <iconEntry - xmi:id="_k4SnYLwFEeSwNLK2W02HwA" - iconPath="/icons/full/obj16/Property.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_k4SnYbwFEeSwNLK2W02HwA"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_k4SnYrwFEeSwNLK2W02HwA" - name="Deprecated InstanceSpecification" - identifier="org.eclipse.papyrus.SysML14.Deprecated_InstanceSpecification" + xmi:id="_5R-xwOgeEeSUQvXhEVQh8w" + name="Unit" + identifier="org.eclipse.papyrus.SysML14.Unit" hint="UML::InstanceSpecification"> - <iconEntry - xmi:id="_k4SnY7wFEeSwNLK2W02HwA" - iconPath="/icons/full/obj16/InstanceSpecification.gif" - bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.uml.InstanceSpecification</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_k4SnZLwFEeSwNLK2W02HwA"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> + <editHelperAdviceConfiguration + xmi:id="_o8jhkOjFEeSUQvXhEVQh8w" + name="org.eclipse.papyrus.sysml14.service.types.advice.UnitEditHelperAdvice" + description="" + identifier="org.eclipse.papyrus.sysml14.service.types.advice.UnitEditHelperAdvice" + editHelperAdviceClassName="org.eclipse.papyrus.sysml14.service.types.advice.UnitEditHelperAdvice"/> </elementTypeConfigurations> <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_k4SnZbwFEeSwNLK2W02HwA" - name="Deprecated Class" - identifier="org.eclipse.papyrus.SysML14.Deprecated_Class" - hint="UML::Class"> - <iconEntry - xmi:id="_k4SnZrwFEeSwNLK2W02HwA" - iconPath="/icons/full/obj16/Class.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_k4SnZ7wFEeSwNLK2W02HwA"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> + xmi:id="_meaO8OgnEeSUQvXhEVQh8w" + name="QuantityKind" + identifier="org.eclipse.papyrus.SysML14.QuantityKind" + hint="UML::InstanceSpecification"> + <specializedTypesID>org.eclipse.papyrus.uml.InstanceSpecification</specializedTypesID> + <editHelperAdviceConfiguration + xmi:id="_e4MKkOjOEeSWwY3EZCu9OA" + name="org.eclipse.papyrus.sysml14.service.types.advice.QuantityKindEditHelperAdvice" + description="" + identifier="org.eclipse.papyrus.sysml14.service.types.advice.QuantityKindEditHelperAdvice" + editHelperAdviceClassName="org.eclipse.papyrus.sysml14.service.types.advice.QuantityKindEditHelperAdvice"/> </elementTypeConfigurations> <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_k4SnaLwFEeSwNLK2W02HwA" - name="Deprecated Association" - identifier="org.eclipse.papyrus.SysML14.Deprecated_Association" + xmi:id="_OdSQ4OgqEeSUQvXhEVQh8w" + name="PartAssociation" + description="Create a PartAssociation" + identifier="org.eclipse.papyrus.SysML14.PartAssociation" hint="UML::Association"> - <iconEntry - xmi:id="_k4SnabwFEeSwNLK2W02HwA" - iconPath="/icons/full/obj16/Association.gif" - bundleId="org.eclipse.uml2.uml.edit"/> <specializedTypesID>org.eclipse.papyrus.uml.Association</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_k4SnarwFEeSwNLK2W02HwA"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_k4Sna7wFEeSwNLK2W02HwA" - name="Deprecated Generalization" - identifier="org.eclipse.papyrus.SysML14.Deprecated_Generalization" - hint="UML::Generalization"> - <iconEntry - xmi:id="_k4SnbLwFEeSwNLK2W02HwA" - iconPath="/icons/full/obj16/Generalization.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.uml.Generalization</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_k4SnbbwFEeSwNLK2W02HwA"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> - </elementTypeConfigurations> - <elementTypeConfigurations - xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" - xmi:id="_k4SnbrwFEeSwNLK2W02HwA" - name="Deprecated DataType" - identifier="org.eclipse.papyrus.SysML14.Deprecated_DataType" - hint="UML::DataType"> - <iconEntry - xmi:id="_k4Snb7wFEeSwNLK2W02HwA" - iconPath="/icons/full/obj16/DataType.gif" - bundleId="org.eclipse.uml2.uml.edit"/> - <specializedTypesID>org.eclipse.papyrus.uml.DataType</specializedTypesID> - <matcherConfiguration - xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" - xmi:id="_k4SncLwFEeSwNLK2W02HwA"> - <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames> - </matcherConfiguration> + <editHelperAdviceConfiguration + xmi:id="_a6mbQOgsEeSUQvXhEVQh8w" + name="org.eclipse.papyrus.sysml14.service.types.advice.PartAssociationEditHelperAdvice" + description="" + identifier="org.eclipse.papyrus.sysml14.service.types.advice.PartAssociationEditHelperAdvice" + editHelperAdviceClassName="org.eclipse.papyrus.sysml14.service.types.advice.PartAssociationEditHelperAdvice"/> </elementTypeConfigurations> <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" @@ -2322,91 +2246,37 @@ <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_k4SoA7wFEeSwNLK2W02HwA" - name="Apply Deprecated" - identifier="org.eclipse.papyrus.SysML14.deprecated" - target="_k4SnXLwFEeSwNLK2W02HwA"> + name="Apply Deprecated to Flow Port" + identifier="org.eclipse.papyrus.SysML14.deprecated.flowport" + editHelperAdviceClassName="" + target="_k4SnULwFEeSwNLK2W02HwA"> <stereotypesToApply xmi:id="_k4SoBLwFEeSwNLK2W02HwA" - stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated" - updateName="true"> + stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated"> <requiredProfiles>SysML</requiredProfiles> </stereotypesToApply> </adviceBindingsConfigurations> <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_k4SoBbwFEeSwNLK2W02HwA" - name="Apply Deprecated" - identifier="org.eclipse.papyrus.SysML14.deprecated" - target="_k4SnX7wFEeSwNLK2W02HwA"> + name="Apply Deprecated to Flow Specification" + identifier="org.eclipse.papyrus.SysML14.deprecated.flowspecification" + target="_k4SnU7wFEeSwNLK2W02HwA"> <stereotypesToApply xmi:id="_k4SoBrwFEeSwNLK2W02HwA" - stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated" - updateName="true"> + stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated"> <requiredProfiles>SysML</requiredProfiles> </stereotypesToApply> </adviceBindingsConfigurations> <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_k4SoB7wFEeSwNLK2W02HwA" - name="Apply Deprecated" - identifier="org.eclipse.papyrus.SysML14.deprecated" - target="_k4SnYrwFEeSwNLK2W02HwA"> + name="Apply Deprecated to Allocated" + identifier="org.eclipse.papyrus.SysML14.deprecated.allocated" + target="_k4SnVrwFEeSwNLK2W02HwA"> <stereotypesToApply xmi:id="_k4SoCLwFEeSwNLK2W02HwA" - stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated" - updateName="true"> - <requiredProfiles>SysML</requiredProfiles> - </stereotypesToApply> - </adviceBindingsConfigurations> - <adviceBindingsConfigurations - xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" - xmi:id="_k4SoCbwFEeSwNLK2W02HwA" - name="Apply Deprecated" - identifier="org.eclipse.papyrus.SysML14.deprecated" - target="_k4SnZbwFEeSwNLK2W02HwA"> - <stereotypesToApply - xmi:id="_k4SoCrwFEeSwNLK2W02HwA" - stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated" - updateName="true"> - <requiredProfiles>SysML</requiredProfiles> - </stereotypesToApply> - </adviceBindingsConfigurations> - <adviceBindingsConfigurations - xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" - xmi:id="_k4SoC7wFEeSwNLK2W02HwA" - name="Apply Deprecated" - identifier="org.eclipse.papyrus.SysML14.deprecated_UML::Association" - target="_k4SnaLwFEeSwNLK2W02HwA"> - <stereotypesToApply - xmi:id="_k4SoDLwFEeSwNLK2W02HwA" - stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated" - updateName="true"> - <requiredProfiles>SysML</requiredProfiles> - </stereotypesToApply> - </adviceBindingsConfigurations> - <adviceBindingsConfigurations - xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" - xmi:id="_k4SoDbwFEeSwNLK2W02HwA" - name="Apply Deprecated" - identifier="org.eclipse.papyrus.SysML14.deprecated" - target="_k4Sna7wFEeSwNLK2W02HwA"> - <stereotypesToApply - xmi:id="_k4SoDrwFEeSwNLK2W02HwA" - stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated" - updateName="true"> - <requiredProfiles>SysML</requiredProfiles> - </stereotypesToApply> - </adviceBindingsConfigurations> - <adviceBindingsConfigurations - xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" - xmi:id="_k4SoD7wFEeSwNLK2W02HwA" - name="Apply Deprecated" - identifier="org.eclipse.papyrus.SysML14.deprecated" - target="_k4SnbrwFEeSwNLK2W02HwA"> - <stereotypesToApply - xmi:id="_k4SoELwFEeSwNLK2W02HwA" - stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated" - updateName="true"> + stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated"> <requiredProfiles>SysML</requiredProfiles> </stereotypesToApply> </adviceBindingsConfigurations> diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/src/org/eclipse/papyrus/sysml14/service/types/advice/PartAssociationEditHelperAdvice.java b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/src/org/eclipse/papyrus/sysml14/service/types/advice/PartAssociationEditHelperAdvice.java new file mode 100644 index 00000000000..ec60eddef08 --- /dev/null +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/src/org/eclipse/papyrus/sysml14/service/types/advice/PartAssociationEditHelperAdvice.java @@ -0,0 +1,57 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST. + * + * 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: + * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.sysml14.service.types.advice; + + + +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.gmf.runtime.common.core.command.CommandResult; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; +import org.eclipse.uml2.uml.AggregationKind; +import org.eclipse.uml2.uml.Association; + + +/** + * The helperadvice class used for PartAssociation + * + */ +public class PartAssociationEditHelperAdvice extends AbstractEditHelperAdvice { + + + /** + * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getBeforeConfigureCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest) + * + * @param request + * @return + */ + @Override + protected ICommand getBeforeConfigureCommand(ConfigureRequest request) { + final Association association = (Association) request.getElementToConfigure(); + + return new ConfigureElementCommand(request) { + + @Override + protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException { + + // FIXME : this kind of thing is probably possible with an element type configuration model + association.getMemberEnds().get(0).setAggregation(AggregationKind.COMPOSITE_LITERAL); + + return CommandResult.newOKCommandResult(association); + } + }; + } +} diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/src/org/eclipse/papyrus/sysml14/service/types/advice/QuantityKindEditHelperAdvice.java b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/src/org/eclipse/papyrus/sysml14/service/types/advice/QuantityKindEditHelperAdvice.java new file mode 100644 index 00000000000..4d91787a45a --- /dev/null +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/src/org/eclipse/papyrus/sysml14/service/types/advice/QuantityKindEditHelperAdvice.java @@ -0,0 +1,117 @@ +/***************************************************************************** + * Copyright (c) 2015 CEA LIST. + * + * 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: + * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation + *****************************************************************************/ + +package org.eclipse.papyrus.sysml14.service.types.advice; + + + +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.gmf.runtime.common.core.command.CommandResult; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; +import org.eclipse.papyrus.sysml14.util.SysmlResource; +import org.eclipse.uml2.uml.Classifier; +import org.eclipse.uml2.uml.InstanceSpecification; +import org.eclipse.uml2.uml.Package; +import org.eclipse.uml2.uml.PackageableElement; +import org.eclipse.uml2.uml.Property; +import org.eclipse.uml2.uml.Slot; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * The helperadvice class used for QuantityKind. + * - Init the type of the instance specification + * - create all slot corresponding to quantityKind attributes + * + */ +public class QuantityKindEditHelperAdvice extends AbstractEditHelperAdvice { + + /** + * + */ + private static final String UNIT_AND_QUANTITY_KIND = "UnitAndQuantityKind"; + + /** + * + */ + private static final String QUANTITY_KIND = "QuantityKind"; + + + + // TODO : this method should be provided as API in an upper level (already exist ?) + private Classifier getClassByNameSpace(Resource resource, String packageName, String classifierName) { + EList<EObject> contents = resource.getContents(); + for (EObject eObject : contents) { + if (eObject instanceof Package){ + Package pkg = (Package) eObject; + + PackageableElement packagedElement2 = pkg.getPackagedElement(packageName); + PackageableElement packagedElement4 = ( (Package) packagedElement2).getPackagedElement(classifierName); + return (Classifier) packagedElement4; + } + } + + + return null; + + } + + /** + * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getBeforeConfigureCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest) + * + * @param request + * @return + */ + @Override + protected ICommand getBeforeConfigureCommand(ConfigureRequest request) { + final InstanceSpecification instanceSpecification = (InstanceSpecification) request.getElementToConfigure(); + + return new ConfigureElementCommand(request) { + + + @Override + protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException { + + // get sysml library + ResourceSet rset = new ResourceSetImpl(); + URI createURI = URI.createURI(SysmlResource.LIBRARY_PATH); + Resource res = rset.getResource(createURI,true); + Classifier quantityKindClassifier = getClassByNameSpace(res, UNIT_AND_QUANTITY_KIND, QUANTITY_KIND); + + // set classifier to unit + instanceSpecification.getClassifiers().add(quantityKindClassifier); + + EList<Property> attributes = quantityKindClassifier.getAttributes(); + + for (Property property : attributes) { + Slot slot = instanceSpecification.createSlot(); + slot.createValue(property.getName(), property.getType(), UMLPackage.eINSTANCE.getLiteralString()); + slot.setDefiningFeature(property); + } + + return CommandResult.newOKCommandResult(instanceSpecification); + } + }; + + } + +} diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/src/org/eclipse/papyrus/sysml14/service/types/advice/UnitEditHelperAdvice.java b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/src/org/eclipse/papyrus/sysml14/service/types/advice/UnitEditHelperAdvice.java new file mode 100644 index 00000000000..a20c8e9dcc8 --- /dev/null +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/src/org/eclipse/papyrus/sysml14/service/types/advice/UnitEditHelperAdvice.java @@ -0,0 +1,108 @@ +/***************************************************************************** + * Copyright (c) 2014 CEA LIST. + * + * 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: + * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation + *****************************************************************************/ +package org.eclipse.papyrus.sysml14.service.types.advice; + +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.gmf.runtime.common.core.command.CommandResult; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; +import org.eclipse.papyrus.sysml14.util.SysmlResource; +import org.eclipse.uml2.uml.Classifier; +import org.eclipse.uml2.uml.InstanceSpecification; +import org.eclipse.uml2.uml.Package; +import org.eclipse.uml2.uml.PackageableElement; +import org.eclipse.uml2.uml.Property; +import org.eclipse.uml2.uml.Slot; +import org.eclipse.uml2.uml.UMLPackage; + +/** + * The helper advice class used for Unit. + * - Init the type of the instance specification + * - create all slot corresponding to Unit attributes + * + */ +public class UnitEditHelperAdvice extends AbstractEditHelperAdvice { + + /** + * + */ + private static final String UNIT = "Unit"; + /** + * + */ + private static final String UNIT_AND_QUANTITY_KIND = "UnitAndQuantityKind"; + + + // TODO : this method should be provided as API in an upper level (already exist ?) + private Classifier getClassByNameSpace(Resource resource, String packageName, String classifierName) { + + EList<EObject> contents = resource.getContents(); + + for (EObject eObject : contents) { + if (eObject instanceof Package){ + Package pkg = (Package) eObject; + + PackageableElement packagedElement2 = pkg.getPackagedElement(packageName); + PackageableElement packagedElement4 = ( (Package) packagedElement2).getPackagedElement(classifierName); + return (Classifier) packagedElement4; + } + } + return null; + } + + + /** + * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getBeforeConfigureCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest) + * + * @param request + * @return + */ + @Override + protected ICommand getBeforeConfigureCommand(ConfigureRequest request) { + final InstanceSpecification instanceSpecification = (InstanceSpecification) request.getElementToConfigure(); + + return new ConfigureElementCommand(request) { + @Override + protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException { + // get sysml library + + ResourceSet rset = new ResourceSetImpl(); + URI createURI = URI.createURI(SysmlResource.LIBRARY_PATH); + Resource res = rset.getResource(createURI,true); + + Classifier unitClassifier = getClassByNameSpace(res, UNIT_AND_QUANTITY_KIND, UNIT); + + // set classifier to unit + instanceSpecification.getClassifiers().add(unitClassifier); + EList<Property> attributes = unitClassifier.getAttributes(); + + for (Property property : attributes) { + Slot slot = instanceSpecification.createSlot(); + slot.createValue(property.getName(), property.getType(), UMLPackage.eINSTANCE.getLiteralString()); + slot.setDefiningFeature(property); + } + + return CommandResult.newOKCommandResult(instanceSpecification); + } + }; + } +} diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.ui/resources/SysML14.creationmenumodel b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.ui/resources/SysML14.creationmenumodel index 2b96cbea392..b33b6e31785 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.ui/resources/SysML14.creationmenumodel +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.ui/resources/SysML14.creationmenumodel @@ -1,83 +1,306 @@ <?xml version="1.0" encoding="ASCII"?> -<ElementCreationMenuModel:Folder xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ElementCreationMenuModel="http://www.eclipse.org/papyrus/infra/newchild/elementcreationmenumodel" xmi:id="_FUfLgMyuEeSuYbPdZwWlyw" label="SysML 1.4" icon=""> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfykMyuEeSuYbPdZwWlyw" label="ValueType" elementTypeIdRef="org.eclipse.papyrus.SysML14.ValueType"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfykcyuEeSuYbPdZwWlyw" label="DistributedProperty" elementTypeIdRef="org.eclipse.papyrus.SysML14.DistributedProperty"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfyksyuEeSuYbPdZwWlyw" label="ConnectorProperty" elementTypeIdRef="org.eclipse.papyrus.SysML14.ConnectorProperty"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfyk8yuEeSuYbPdZwWlyw" label="ParticipantProperty" elementTypeIdRef="org.eclipse.papyrus.SysML14.ParticipantProperty"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfylMyuEeSuYbPdZwWlyw" label="BindingConnector" elementTypeIdRef="org.eclipse.papyrus.SysML14.BindingConnector"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfylcyuEeSuYbPdZwWlyw" label="Block" elementTypeIdRef="org.eclipse.papyrus.SysML14.Block"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfylsyuEeSuYbPdZwWlyw" label="PropertySpecificType" elementTypeIdRef="org.eclipse.papyrus.SysML14.PropertySpecificType"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfyl8yuEeSuYbPdZwWlyw" label="NestedConnectorEnd ConnectorEnd" elementTypeIdRef="org.eclipse.papyrus.SysML14.NestedConnectorEnd_ConnectorEnd"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfymMyuEeSuYbPdZwWlyw" label="NestedConnectorEnd Element" elementTypeIdRef="org.eclipse.papyrus.SysML14.NestedConnectorEnd_Element"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfymcyuEeSuYbPdZwWlyw" label="DirectedRelationshipPropertyPath" elementTypeIdRef="org.eclipse.papyrus.SysML14.DirectedRelationshipPropertyPath"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfymsyuEeSuYbPdZwWlyw" label="ElementPropertyPath" elementTypeIdRef="org.eclipse.papyrus.SysML14.ElementPropertyPath"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfym8yuEeSuYbPdZwWlyw" label="EndPathMultiplicity" elementTypeIdRef="org.eclipse.papyrus.SysML14.EndPathMultiplicity"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfynMyuEeSuYbPdZwWlyw" label="BoundReference" elementTypeIdRef="org.eclipse.papyrus.SysML14.BoundReference"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfyncyuEeSuYbPdZwWlyw" label="AdjunctProperty" elementTypeIdRef="org.eclipse.papyrus.SysML14.AdjunctProperty"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfynsyuEeSuYbPdZwWlyw" label="ClassifierBehaviorProperty" elementTypeIdRef="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfyn8yuEeSuYbPdZwWlyw" label="ItemFlow" elementTypeIdRef="org.eclipse.papyrus.SysML14.ItemFlow"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfyoMyuEeSuYbPdZwWlyw" label="FlowProperty" elementTypeIdRef="org.eclipse.papyrus.SysML14.FlowProperty"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfyocyuEeSuYbPdZwWlyw" label="FullPort" elementTypeIdRef="org.eclipse.papyrus.SysML14.FullPort"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfyosyuEeSuYbPdZwWlyw" label="InterfaceBlock" elementTypeIdRef="org.eclipse.papyrus.SysML14.InterfaceBlock"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfyo8yuEeSuYbPdZwWlyw" label="ProxyPort" elementTypeIdRef="org.eclipse.papyrus.SysML14.ProxyPort"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfypMyuEeSuYbPdZwWlyw" label="AcceptChangeStructuralFeatureEventAction" elementTypeIdRef="org.eclipse.papyrus.SysML14.AcceptChangeStructuralFeatureEventAction"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfypcyuEeSuYbPdZwWlyw" label="ChangeStructuralFeatureEvent" elementTypeIdRef="org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfypsyuEeSuYbPdZwWlyw" label="DirectedFeature" elementTypeIdRef="org.eclipse.papyrus.SysML14.DirectedFeature"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfyp8yuEeSuYbPdZwWlyw" label="InvocationOnNestedPortAction InvocationAction" elementTypeIdRef="org.eclipse.papyrus.SysML14.InvocationOnNestedPortAction_InvocationAction"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfyqMyuEeSuYbPdZwWlyw" label="InvocationOnNestedPortAction Element" elementTypeIdRef="org.eclipse.papyrus.SysML14.InvocationOnNestedPortAction_Element"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUfyqcyuEeSuYbPdZwWlyw" label="TriggerOnNestedPort Trigger" elementTypeIdRef="org.eclipse.papyrus.SysML14.TriggerOnNestedPort_Trigger"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZoMyuEeSuYbPdZwWlyw" label="TriggerOnNestedPort Element" elementTypeIdRef="org.eclipse.papyrus.SysML14.TriggerOnNestedPort_Element"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZocyuEeSuYbPdZwWlyw" label="Overwrite" elementTypeIdRef="org.eclipse.papyrus.SysML14.Overwrite"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZosyuEeSuYbPdZwWlyw" label="ControlOperator Behavior" elementTypeIdRef="org.eclipse.papyrus.SysML14.ControlOperator_Behavior"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZo8yuEeSuYbPdZwWlyw" label="ControlOperator Operation" elementTypeIdRef="org.eclipse.papyrus.SysML14.ControlOperator_Operation"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZpMyuEeSuYbPdZwWlyw" label="Rate ActivityEdge" elementTypeIdRef="org.eclipse.papyrus.SysML14.Rate_ActivityEdge"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZpcyuEeSuYbPdZwWlyw" label="Rate Parameter" elementTypeIdRef="org.eclipse.papyrus.SysML14.Rate_Parameter"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZpsyuEeSuYbPdZwWlyw" label="NoBuffer" elementTypeIdRef="org.eclipse.papyrus.SysML14.NoBuffer"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZp8yuEeSuYbPdZwWlyw" label="Discrete ActivityEdge" elementTypeIdRef="org.eclipse.papyrus.SysML14.Discrete_ActivityEdge"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZqMyuEeSuYbPdZwWlyw" label="Discrete Parameter" elementTypeIdRef="org.eclipse.papyrus.SysML14.Discrete_Parameter"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZqcyuEeSuYbPdZwWlyw" label="Continuous ActivityEdge" elementTypeIdRef="org.eclipse.papyrus.SysML14.Continuous_ActivityEdge"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZqsyuEeSuYbPdZwWlyw" label="Continuous Parameter" elementTypeIdRef="org.eclipse.papyrus.SysML14.Continuous_Parameter"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZq8yuEeSuYbPdZwWlyw" label="Probability ActivityEdge" elementTypeIdRef="org.eclipse.papyrus.SysML14.Probability_ActivityEdge"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZrMyuEeSuYbPdZwWlyw" label="Probability ParameterSet" elementTypeIdRef="org.eclipse.papyrus.SysML14.Probability_ParameterSet"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZrcyuEeSuYbPdZwWlyw" label="Optional" elementTypeIdRef="org.eclipse.papyrus.SysML14.Optional"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZrsyuEeSuYbPdZwWlyw" label="Rationale" elementTypeIdRef="org.eclipse.papyrus.SysML14.Rationale"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZr8yuEeSuYbPdZwWlyw" label="View Package" elementTypeIdRef="org.eclipse.papyrus.SysML14.View_Package"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZsMyuEeSuYbPdZwWlyw" label="View Class" elementTypeIdRef="org.eclipse.papyrus.SysML14.View_Class"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZscyuEeSuYbPdZwWlyw" label="Conform Dependency" elementTypeIdRef="org.eclipse.papyrus.SysML14.Conform_Dependency"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZssyuEeSuYbPdZwWlyw" label="Conform Generalization" elementTypeIdRef="org.eclipse.papyrus.SysML14.Conform_Generalization"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZs8yuEeSuYbPdZwWlyw" label="Problem" elementTypeIdRef="org.eclipse.papyrus.SysML14.Problem"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZtMyuEeSuYbPdZwWlyw" label="ViewPoint" elementTypeIdRef="org.eclipse.papyrus.SysML14.ViewPoint"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZtcyuEeSuYbPdZwWlyw" label="Stakeholder" elementTypeIdRef="org.eclipse.papyrus.SysML14.Stakeholder"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZtsyuEeSuYbPdZwWlyw" label="Expose" elementTypeIdRef="org.eclipse.papyrus.SysML14.Expose"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZt8yuEeSuYbPdZwWlyw" label="ElementGroup" elementTypeIdRef="org.eclipse.papyrus.SysML14.ElementGroup"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZuMyuEeSuYbPdZwWlyw" label="ConstraintBlock" elementTypeIdRef="org.eclipse.papyrus.SysML14.ConstraintBlock"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZucyuEeSuYbPdZwWlyw" label="AllocateActivityPartition" elementTypeIdRef="org.eclipse.papyrus.SysML14.AllocateActivityPartition"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZusyuEeSuYbPdZwWlyw" label="Allocate Abstraction" elementTypeIdRef="org.eclipse.papyrus.SysML14.Allocate_Abstraction"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZu8yuEeSuYbPdZwWlyw" label="Allocate DirectedRelationship" elementTypeIdRef="org.eclipse.papyrus.SysML14.Allocate_DirectedRelationship"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZvMyuEeSuYbPdZwWlyw" label="DeriveReqt Abstraction" elementTypeIdRef="org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZvcyuEeSuYbPdZwWlyw" label="DeriveReqt DirectedRelationship" elementTypeIdRef="org.eclipse.papyrus.SysML14.DeriveReqt_DirectedRelationship"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZvsyuEeSuYbPdZwWlyw" label="Copy Abstraction" elementTypeIdRef="org.eclipse.papyrus.SysML14.Copy_Abstraction"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZv8yuEeSuYbPdZwWlyw" label="Copy DirectedRelationship" elementTypeIdRef="org.eclipse.papyrus.SysML14.Copy_DirectedRelationship"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZwMyuEeSuYbPdZwWlyw" label="Satisfy Abstraction" elementTypeIdRef="org.eclipse.papyrus.SysML14.Satisfy_Abstraction"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZwcyuEeSuYbPdZwWlyw" label="Satisfy DirectedRelationship" elementTypeIdRef="org.eclipse.papyrus.SysML14.Satisfy_DirectedRelationship"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZwsyuEeSuYbPdZwWlyw" label="TestCase Operation" elementTypeIdRef="org.eclipse.papyrus.SysML14.TestCase_Operation"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZw8yuEeSuYbPdZwWlyw" label="TestCase Behavior" elementTypeIdRef="org.eclipse.papyrus.SysML14.TestCase_Behavior"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZxMyuEeSuYbPdZwWlyw" label="Requirement" elementTypeIdRef="org.eclipse.papyrus.SysML14.Requirement"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZxcyuEeSuYbPdZwWlyw" label="Verify Abstraction" elementTypeIdRef="org.eclipse.papyrus.SysML14.Verify_Abstraction"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZxsyuEeSuYbPdZwWlyw" label="Verify DirectedRelationship" elementTypeIdRef="org.eclipse.papyrus.SysML14.Verify_DirectedRelationship"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZx8yuEeSuYbPdZwWlyw" label="Trace Abstraction" elementTypeIdRef="org.eclipse.papyrus.SysML14.Trace_Abstraction"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZyMyuEeSuYbPdZwWlyw" label="Trace DirectedRelationship" elementTypeIdRef="org.eclipse.papyrus.SysML14.Trace_DirectedRelationship"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZycyuEeSuYbPdZwWlyw" label="Refine Abstraction" elementTypeIdRef="org.eclipse.papyrus.SysML14.Refine_Abstraction"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZysyuEeSuYbPdZwWlyw" label="Refine DirectedRelationship" elementTypeIdRef="org.eclipse.papyrus.SysML14.Refine_DirectedRelationship"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZy8yuEeSuYbPdZwWlyw" label="FlowPort" elementTypeIdRef="org.eclipse.papyrus.SysML14.FlowPort"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZzMyuEeSuYbPdZwWlyw" label="FlowSpecification" elementTypeIdRef="org.eclipse.papyrus.SysML14.FlowSpecification"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZzcyuEeSuYbPdZwWlyw" label="Allocated" elementTypeIdRef="org.eclipse.papyrus.SysML14.Allocated"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZzsyuEeSuYbPdZwWlyw" label="RequirementRelated" elementTypeIdRef="org.eclipse.papyrus.SysML14.RequirementRelated"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZz8yuEeSuYbPdZwWlyw" label="Deprecated ValueSpecification" elementTypeIdRef="org.eclipse.papyrus.SysML14.Deprecated_ValueSpecification"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZ0MyuEeSuYbPdZwWlyw" label="Property (Deprecated)" elementTypeIdRef="org.eclipse.papyrus.SysML14.Deprecated_Property"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZ0cyuEeSuYbPdZwWlyw" label="InstanceSpecification(Deprecated)" elementTypeIdRef="org.eclipse.papyrus.SysML14.Deprecated_InstanceSpecification"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZ0syuEeSuYbPdZwWlyw" label="Class (Deprecated)" elementTypeIdRef="org.eclipse.papyrus.SysML14.Deprecated_Class"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZ08yuEeSuYbPdZwWlyw" label="Association (Deprecated)" elementTypeIdRef="org.eclipse.papyrus.SysML14.Deprecated_Association_UML::Association"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZ1MyuEeSuYbPdZwWlyw" label="Generalization (Deprecated)" icon="" elementTypeIdRef="org.eclipse.papyrus.SysML14.Deprecated_Generalization"/> - <menu xsi:type="ElementCreationMenuModel:CreationMenu" xmi:id="_FUgZ1cyuEeSuYbPdZwWlyw" label="DataType (Deprecated)" elementTypeIdRef="org.eclipse.papyrus.SysML14.Deprecated_DataType"/> +<ElementCreationMenuModel:Folder + xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ElementCreationMenuModel="http://www.eclipse.org/papyrus/infra/newchild/elementcreationmenumodel" + xmi:id="_FUfLgMyuEeSuYbPdZwWlyw" + label="SysML 1.4" + icon=""> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfykMyuEeSuYbPdZwWlyw" + label="ValueType" + elementTypeIdRef="org.eclipse.papyrus.SysML14.ValueType"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfykcyuEeSuYbPdZwWlyw" + label="DistributedProperty" + elementTypeIdRef="org.eclipse.papyrus.SysML14.DistributedProperty"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfyksyuEeSuYbPdZwWlyw" + label="ConnectorProperty" + elementTypeIdRef="org.eclipse.papyrus.SysML14.ConnectorProperty"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfyk8yuEeSuYbPdZwWlyw" + label="ParticipantProperty" + elementTypeIdRef="org.eclipse.papyrus.SysML14.ParticipantProperty"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfylMyuEeSuYbPdZwWlyw" + label="BindingConnector" + elementTypeIdRef="org.eclipse.papyrus.SysML14.BindingConnector"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfylcyuEeSuYbPdZwWlyw" + label="Block" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Block"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfylsyuEeSuYbPdZwWlyw" + label="PropertySpecificType" + elementTypeIdRef="org.eclipse.papyrus.SysML14.PropertySpecificType"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfyl8yuEeSuYbPdZwWlyw" + label="NestedConnectorEnd ConnectorEnd" + elementTypeIdRef="org.eclipse.papyrus.SysML14.NestedConnectorEnd_ConnectorEnd"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfymMyuEeSuYbPdZwWlyw" + label="NestedConnectorEnd Element" + elementTypeIdRef="org.eclipse.papyrus.SysML14.NestedConnectorEnd_Element"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfymcyuEeSuYbPdZwWlyw" + label="DirectedRelationshipPropertyPath" + elementTypeIdRef="org.eclipse.papyrus.SysML14.DirectedRelationshipPropertyPath"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfymsyuEeSuYbPdZwWlyw" + label="ElementPropertyPath" + elementTypeIdRef="org.eclipse.papyrus.SysML14.ElementPropertyPath"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfym8yuEeSuYbPdZwWlyw" + label="EndPathMultiplicity" + elementTypeIdRef="org.eclipse.papyrus.SysML14.EndPathMultiplicity"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfynMyuEeSuYbPdZwWlyw" + label="BoundReference" + elementTypeIdRef="org.eclipse.papyrus.SysML14.BoundReference"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfyncyuEeSuYbPdZwWlyw" + label="AdjunctProperty" + elementTypeIdRef="org.eclipse.papyrus.SysML14.AdjunctProperty"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfynsyuEeSuYbPdZwWlyw" + label="ClassifierBehaviorProperty" + elementTypeIdRef="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfyn8yuEeSuYbPdZwWlyw" + label="ItemFlow" + elementTypeIdRef="org.eclipse.papyrus.SysML14.ItemFlow"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfyoMyuEeSuYbPdZwWlyw" + label="FlowProperty" + elementTypeIdRef="org.eclipse.papyrus.SysML14.FlowProperty"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfyocyuEeSuYbPdZwWlyw" + label="FullPort" + elementTypeIdRef="org.eclipse.papyrus.SysML14.FullPort"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfyosyuEeSuYbPdZwWlyw" + label="InterfaceBlock" + elementTypeIdRef="org.eclipse.papyrus.SysML14.InterfaceBlock"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfyo8yuEeSuYbPdZwWlyw" + label="ProxyPort" + elementTypeIdRef="org.eclipse.papyrus.SysML14.ProxyPort"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfypMyuEeSuYbPdZwWlyw" + label="AcceptChangeStructuralFeatureEventAction" + elementTypeIdRef="org.eclipse.papyrus.SysML14.AcceptChangeStructuralFeatureEventAction"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfypcyuEeSuYbPdZwWlyw" + label="ChangeStructuralFeatureEvent" + elementTypeIdRef="org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfypsyuEeSuYbPdZwWlyw" + label="DirectedFeature" + elementTypeIdRef="org.eclipse.papyrus.SysML14.DirectedFeature"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfyp8yuEeSuYbPdZwWlyw" + label="InvocationOnNestedPortAction InvocationAction" + elementTypeIdRef="org.eclipse.papyrus.SysML14.InvocationOnNestedPortAction_InvocationAction"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfyqMyuEeSuYbPdZwWlyw" + label="InvocationOnNestedPortAction Element" + elementTypeIdRef="org.eclipse.papyrus.SysML14.InvocationOnNestedPortAction_Element"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUfyqcyuEeSuYbPdZwWlyw" + label="TriggerOnNestedPort Trigger" + elementTypeIdRef="org.eclipse.papyrus.SysML14.TriggerOnNestedPort_Trigger"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZoMyuEeSuYbPdZwWlyw" + label="TriggerOnNestedPort Element" + elementTypeIdRef="org.eclipse.papyrus.SysML14.TriggerOnNestedPort_Element"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZocyuEeSuYbPdZwWlyw" + label="Overwrite" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Overwrite"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZosyuEeSuYbPdZwWlyw" + label="ControlOperator Behavior" + elementTypeIdRef="org.eclipse.papyrus.SysML14.ControlOperator_Behavior"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZo8yuEeSuYbPdZwWlyw" + label="ControlOperator Operation" + elementTypeIdRef="org.eclipse.papyrus.SysML14.ControlOperator_Operation"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZpMyuEeSuYbPdZwWlyw" + label="Rate ActivityEdge" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Rate_ActivityEdge"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZpcyuEeSuYbPdZwWlyw" + label="Rate Parameter" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Rate_Parameter"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZpsyuEeSuYbPdZwWlyw" + label="NoBuffer" + elementTypeIdRef="org.eclipse.papyrus.SysML14.NoBuffer"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZp8yuEeSuYbPdZwWlyw" + label="Discrete ActivityEdge" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Discrete_ActivityEdge"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZqMyuEeSuYbPdZwWlyw" + label="Discrete Parameter" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Discrete_Parameter"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZqcyuEeSuYbPdZwWlyw" + label="Continuous ActivityEdge" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Continuous_ActivityEdge"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZqsyuEeSuYbPdZwWlyw" + label="Continuous Parameter" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Continuous_Parameter"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZq8yuEeSuYbPdZwWlyw" + label="Probability ActivityEdge" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Probability_ActivityEdge"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZrMyuEeSuYbPdZwWlyw" + label="Probability ParameterSet" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Probability_ParameterSet"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZrcyuEeSuYbPdZwWlyw" + label="Optional" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Optional"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZrsyuEeSuYbPdZwWlyw" + label="Rationale" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Rationale"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZr8yuEeSuYbPdZwWlyw" + label="View Package" + elementTypeIdRef="org.eclipse.papyrus.SysML14.View_Package"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZsMyuEeSuYbPdZwWlyw" + label="View Class" + elementTypeIdRef="org.eclipse.papyrus.SysML14.View_Class"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZscyuEeSuYbPdZwWlyw" + label="Conform Dependency" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Conform_Dependency"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZssyuEeSuYbPdZwWlyw" + label="Conform Generalization" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Conform_Generalization"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZs8yuEeSuYbPdZwWlyw" + label="Problem" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Problem"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZtMyuEeSuYbPdZwWlyw" + label="ViewPoint" + elementTypeIdRef="org.eclipse.papyrus.SysML14.ViewPoint"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZtcyuEeSuYbPdZwWlyw" + label="Stakeholder" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Stakeholder"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZtsyuEeSuYbPdZwWlyw" + label="Expose" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Expose"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZt8yuEeSuYbPdZwWlyw" + label="ElementGroup" + elementTypeIdRef="org.eclipse.papyrus.SysML14.ElementGroup"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZuMyuEeSuYbPdZwWlyw" + label="ConstraintBlock" + elementTypeIdRef="org.eclipse.papyrus.SysML14.ConstraintBlock"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZucyuEeSuYbPdZwWlyw" + label="AllocateActivityPartition" + elementTypeIdRef="org.eclipse.papyrus.SysML14.AllocateActivityPartition"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZusyuEeSuYbPdZwWlyw" + label="Allocate Abstraction" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Allocate_Abstraction"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZu8yuEeSuYbPdZwWlyw" + label="Allocate DirectedRelationship" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Allocate_DirectedRelationship"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZvMyuEeSuYbPdZwWlyw" + label="DeriveReqt Abstraction" + elementTypeIdRef="org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZvcyuEeSuYbPdZwWlyw" + label="DeriveReqt DirectedRelationship" + elementTypeIdRef="org.eclipse.papyrus.SysML14.DeriveReqt_DirectedRelationship"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZvsyuEeSuYbPdZwWlyw" + label="Copy Abstraction" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Copy_Abstraction"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZv8yuEeSuYbPdZwWlyw" + label="Copy DirectedRelationship" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Copy_DirectedRelationship"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZwMyuEeSuYbPdZwWlyw" + label="Satisfy Abstraction" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Satisfy_Abstraction"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZwcyuEeSuYbPdZwWlyw" + label="Satisfy DirectedRelationship" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Satisfy_DirectedRelationship"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZwsyuEeSuYbPdZwWlyw" + label="TestCase Operation" + elementTypeIdRef="org.eclipse.papyrus.SysML14.TestCase_Operation"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZw8yuEeSuYbPdZwWlyw" + label="TestCase Behavior" + elementTypeIdRef="org.eclipse.papyrus.SysML14.TestCase_Behavior"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZxMyuEeSuYbPdZwWlyw" + label="Requirement" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Requirement"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZxcyuEeSuYbPdZwWlyw" + label="Verify Abstraction" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Verify_Abstraction"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZxsyuEeSuYbPdZwWlyw" + label="Verify DirectedRelationship" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Verify_DirectedRelationship"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZx8yuEeSuYbPdZwWlyw" + label="Trace Abstraction" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Trace_Abstraction"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZyMyuEeSuYbPdZwWlyw" + label="Trace DirectedRelationship" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Trace_DirectedRelationship"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZycyuEeSuYbPdZwWlyw" + label="Refine Abstraction" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Refine_Abstraction"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZysyuEeSuYbPdZwWlyw" + label="Refine DirectedRelationship" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Refine_DirectedRelationship"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZy8yuEeSuYbPdZwWlyw" + label="FlowPort" + elementTypeIdRef="org.eclipse.papyrus.SysML14.FlowPort"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZzMyuEeSuYbPdZwWlyw" + label="FlowSpecification" + elementTypeIdRef="org.eclipse.papyrus.SysML14.FlowSpecification"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZzcyuEeSuYbPdZwWlyw" + label="Allocated" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Allocated"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_FUgZzsyuEeSuYbPdZwWlyw" + label="RequirementRelated" + elementTypeIdRef="org.eclipse.papyrus.SysML14.RequirementRelated"/> + <menu xsi:type="ElementCreationMenuModel:CreationMenu" + xmi:id="_V9D8cOjrEeS0s_Pe-G3XMA" + label="Unit" + elementTypeIdRef="org.eclipse.papyrus.SysML14.Unit"/> </ElementCreationMenuModel:Folder> diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/icons/SysMLLibrary.gif b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/icons/SysMLLibrary.gif Binary files differnew file mode 100644 index 00000000000..bf8bdd59934 --- /dev/null +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/icons/SysMLLibrary.gif diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/model/SysML.elementtypesconfigurations b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/model/SysML.elementtypesconfigurations deleted file mode 100644 index 4eff2d62afd..00000000000 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/model/SysML.elementtypesconfigurations +++ /dev/null @@ -1,963 +0,0 @@ -<?xml version="1.0" encoding="ASCII"?>
-<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:applystereotypeadviceconfiguration="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/uml/applystereotypeadvice/1.0" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.0" xmlns:stereotypeapplicationmatcherconfiguration="http://www.eclipse.org/payrus/elementtypesconfigurations/uml/stereotypematcherconfiguration" xmi:id="_Jbru4MZiEeSDCqXZMptZiw" name="SysML" identifier="org.eclipse.papyrus.sysML.elementTypes" metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbru4cZiEeSDCqXZMptZiw" name="ValueType" identifier="org.eclipse.papyrus.sysML.ValueType" hint="UML::DataType">
- <iconEntry xmi:id="_Jbru4sZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.DataType</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbru48ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::ValueType</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbru5MZiEeSDCqXZMptZiw" name="DistributedProperty" identifier="org.eclipse.papyrus.sysML.DistributedProperty" hint="UML::Property">
- <iconEntry xmi:id="_Jbru5cZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbru5sZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::DistributedProperty</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbru58ZiEeSDCqXZMptZiw" name="ConnectorProperty" identifier="org.eclipse.papyrus.sysML.ConnectorProperty" hint="UML::Property">
- <iconEntry xmi:id="_Jbru6MZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbru6cZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::ConnectorProperty</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbru6sZiEeSDCqXZMptZiw" name="ParticipantProperty" identifier="org.eclipse.papyrus.sysML.ParticipantProperty" hint="UML::Property">
- <iconEntry xmi:id="_Jbru68ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbru7MZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::ParticipantProperty</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbru7cZiEeSDCqXZMptZiw" name="BindingConnector" identifier="org.eclipse.papyrus.sysML.BindingConnector" hint="UML::Connector">
- <iconEntry xmi:id="_Jbru7sZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Connector.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Connector</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbru78ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::BindingConnector</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbru8MZiEeSDCqXZMptZiw" name="Block" identifier="org.eclipse.papyrus.sysML.Block" hint="UML::Class">
- <iconEntry xmi:id="_Jbru8cZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbru8sZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::Block</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbru88ZiEeSDCqXZMptZiw" name="PropertySpecificType" identifier="org.eclipse.papyrus.sysML.PropertySpecificType" hint="UML::Classifier">
- <iconEntry xmi:id="_Jbru9MZiEeSDCqXZMptZiw" iconPath="/icons/Classifier.gif" bundleId="org.eclipse.papyrus.uml.service.types"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Classifier</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbru9cZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::PropertySpecificType</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbru9sZiEeSDCqXZMptZiw" name="NestedConnectorEnd ConnectorEnd" identifier="org.eclipse.papyrus.sysML.NestedConnectorEnd_ConnectorEnd" hint="UML::ConnectorEnd">
- <iconEntry xmi:id="_Jbru98ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/ConnectorEnd.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.ConnectorEnd</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbru-MZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::NestedConnectorEnd</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbru-cZiEeSDCqXZMptZiw" name="NestedConnectorEnd Element" identifier="org.eclipse.papyrus.sysML.NestedConnectorEnd_Element" hint="UML::Element">
- <iconEntry xmi:id="_Jbru-sZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Element.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Element</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbru-8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::NestedConnectorEnd</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbru_MZiEeSDCqXZMptZiw" name="DirectedRelationshipPropertyPath" identifier="org.eclipse.papyrus.sysML.DirectedRelationshipPropertyPath" hint="UML::DirectedRelationship">
- <iconEntry xmi:id="_Jbru_cZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/DirectedRelationship.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.DirectedRelationship</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbru_sZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::DirectedRelationshipPropertyPath</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbru_8ZiEeSDCqXZMptZiw" name="ElementPropertyPath" identifier="org.eclipse.papyrus.sysML.ElementPropertyPath" hint="UML::Element">
- <iconEntry xmi:id="_JbrvAMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Element.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Element</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvAcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::ElementPropertyPath</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvAsZiEeSDCqXZMptZiw" name="EndPathMultiplicity" identifier="org.eclipse.papyrus.sysML.EndPathMultiplicity" hint="UML::Property">
- <iconEntry xmi:id="_JbrvA8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvBMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::EndPathMultiplicity</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvBcZiEeSDCqXZMptZiw" name="BoundReference" identifier="org.eclipse.papyrus.sysML.BoundReference" hint="UML::Property">
- <iconEntry xmi:id="_JbrvBsZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvB8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::BoundReference</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvCMZiEeSDCqXZMptZiw" name="AdjunctProperty" identifier="org.eclipse.papyrus.sysML.AdjunctProperty" hint="UML::Property">
- <iconEntry xmi:id="_JbrvCcZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvCsZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::AdjunctProperty</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvC8ZiEeSDCqXZMptZiw" name="ClassifierBehaviorProperty" identifier="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty" hint="UML::Property">
- <iconEntry xmi:id="_JbrvDMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvDcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Blocks::ClassifierBehaviorProperty</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvDsZiEeSDCqXZMptZiw" name="ItemFlow" identifier="org.eclipse.papyrus.sysML.ItemFlow" hint="UML::InformationFlow">
- <iconEntry xmi:id="_JbrvD8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/InformationFlow.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.InformationFlow</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvEMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::PortsandFlows::ItemFlow</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvEcZiEeSDCqXZMptZiw" name="FlowProperty" identifier="org.eclipse.papyrus.sysML.FlowProperty" hint="UML::Property">
- <iconEntry xmi:id="_JbrvEsZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvE8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::PortsandFlows::FlowProperty</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvFMZiEeSDCqXZMptZiw" name="FullPort" identifier="org.eclipse.papyrus.sysML.FullPort" hint="UML::Port">
- <iconEntry xmi:id="_JbrvFcZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Port.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Port</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvFsZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::PortsandFlows::FullPort</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvF8ZiEeSDCqXZMptZiw" name="InterfaceBlock" identifier="org.eclipse.papyrus.sysML.InterfaceBlock" hint="UML::Class">
- <iconEntry xmi:id="_JbrvGMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvGcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::PortsandFlows::InterfaceBlock</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvGsZiEeSDCqXZMptZiw" name="ProxyPort" identifier="org.eclipse.papyrus.sysML.ProxyPort" hint="UML::Port">
- <iconEntry xmi:id="_JbrvG8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Port.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Port</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvHMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::PortsandFlows::ProxyPort</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvHcZiEeSDCqXZMptZiw" name="AcceptChangeStructuralFeatureEventAction" identifier="org.eclipse.papyrus.sysML.AcceptChangeStructuralFeatureEventAction" hint="UML::AcceptEventAction">
- <iconEntry xmi:id="_JbrvHsZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/AcceptEventAction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.AcceptEventAction</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvH8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::PortsandFlows::AcceptChangeStructuralFeatureEventAction</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvIMZiEeSDCqXZMptZiw" name="ChangeStructuralFeatureEvent" identifier="org.eclipse.papyrus.sysML.ChangeStructuralFeatureEvent" hint="UML::ChangeEvent">
- <iconEntry xmi:id="_JbrvIcZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/ChangeEvent.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.ChangeEvent</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvIsZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::PortsandFlows::ChangeStructuralFeatureEvent</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvI8ZiEeSDCqXZMptZiw" name="DirectedFeature" identifier="org.eclipse.papyrus.sysML.DirectedFeature" hint="UML::Feature">
- <iconEntry xmi:id="_JbrvJMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Feature.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Feature</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvJcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::PortsandFlows::DirectedFeature</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvJsZiEeSDCqXZMptZiw" name="InvocationOnNestedPortAction InvocationAction" identifier="org.eclipse.papyrus.sysML.InvocationOnNestedPortAction_InvocationAction" hint="UML::InvocationAction">
- <iconEntry xmi:id="_JbrvJ8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/InvocationAction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.InvocationAction</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvKMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::PortsandFlows::InvocationOnNestedPortAction</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvKcZiEeSDCqXZMptZiw" name="InvocationOnNestedPortAction Element" identifier="org.eclipse.papyrus.sysML.InvocationOnNestedPortAction_Element" hint="UML::Element">
- <iconEntry xmi:id="_JbrvKsZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Element.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Element</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvK8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::PortsandFlows::InvocationOnNestedPortAction</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvLMZiEeSDCqXZMptZiw" name="TriggerOnNestedPort Trigger" identifier="org.eclipse.papyrus.sysML.TriggerOnNestedPort_Trigger" hint="UML::Trigger">
- <iconEntry xmi:id="_JbrvLcZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Trigger.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Trigger</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvLsZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::PortsandFlows::TriggerOnNestedPort</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvL8ZiEeSDCqXZMptZiw" name="TriggerOnNestedPort Element" identifier="org.eclipse.papyrus.sysML.TriggerOnNestedPort_Element" hint="UML::Element">
- <iconEntry xmi:id="_JbrvMMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Element.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Element</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvMcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::PortsandFlows::TriggerOnNestedPort</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvMsZiEeSDCqXZMptZiw" name="Overwrite" identifier="org.eclipse.papyrus.sysML.Overwrite" hint="UML::ObjectNode">
- <iconEntry xmi:id="_JbrvM8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/ObjectNode.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.ObjectNode</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvNMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Activities::Overwrite</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvNcZiEeSDCqXZMptZiw" name="ControlOperator Behavior" identifier="org.eclipse.papyrus.sysML.ControlOperator_Behavior" hint="UML::Behavior">
- <iconEntry xmi:id="_JbrvNsZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Behavior.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Behavior</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvN8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Activities::ControlOperator</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvOMZiEeSDCqXZMptZiw" name="ControlOperator Operation" identifier="org.eclipse.papyrus.sysML.ControlOperator_Operation" hint="UML::Operation">
- <iconEntry xmi:id="_JbrvOcZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Operation.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Operation</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvOsZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Activities::ControlOperator</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvO8ZiEeSDCqXZMptZiw" name="Rate ActivityEdge" identifier="org.eclipse.papyrus.sysML.Rate_ActivityEdge" hint="UML::ActivityEdge">
- <iconEntry xmi:id="_JbrvPMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/ActivityEdge.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.ActivityEdge</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvPcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Activities::Rate</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvPsZiEeSDCqXZMptZiw" name="Rate Parameter" identifier="org.eclipse.papyrus.sysML.Rate_Parameter" hint="UML::Parameter">
- <iconEntry xmi:id="_JbrvP8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Parameter.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Parameter</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvQMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Activities::Rate</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvQcZiEeSDCqXZMptZiw" name="NoBuffer" identifier="org.eclipse.papyrus.sysML.NoBuffer" hint="UML::ObjectNode">
- <iconEntry xmi:id="_JbrvQsZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/ObjectNode.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.ObjectNode</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvQ8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Activities::NoBuffer</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvRMZiEeSDCqXZMptZiw" name="Discrete ActivityEdge" identifier="org.eclipse.papyrus.sysML.Discrete_ActivityEdge" hint="UML::ActivityEdge">
- <iconEntry xmi:id="_JbrvRcZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/ActivityEdge.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.ActivityEdge</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvRsZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Activities::Discrete</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvR8ZiEeSDCqXZMptZiw" name="Discrete Parameter" identifier="org.eclipse.papyrus.sysML.Discrete_Parameter" hint="UML::Parameter">
- <iconEntry xmi:id="_JbrvSMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Parameter.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Parameter</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvScZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Activities::Discrete</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvSsZiEeSDCqXZMptZiw" name="Continuous ActivityEdge" identifier="org.eclipse.papyrus.sysML.Continuous_ActivityEdge" hint="UML::ActivityEdge">
- <iconEntry xmi:id="_JbrvS8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/ActivityEdge.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.ActivityEdge</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvTMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Activities::Continuous</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvTcZiEeSDCqXZMptZiw" name="Continuous Parameter" identifier="org.eclipse.papyrus.sysML.Continuous_Parameter" hint="UML::Parameter">
- <iconEntry xmi:id="_JbrvTsZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Parameter.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Parameter</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvT8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Activities::Continuous</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvUMZiEeSDCqXZMptZiw" name="Probability ActivityEdge" identifier="org.eclipse.papyrus.sysML.Probability_ActivityEdge" hint="UML::ActivityEdge">
- <iconEntry xmi:id="_JbrvUcZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/ActivityEdge.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.ActivityEdge</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvUsZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Activities::Probability</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvU8ZiEeSDCqXZMptZiw" name="Probability ParameterSet" identifier="org.eclipse.papyrus.sysML.Probability_ParameterSet" hint="UML::ParameterSet">
- <iconEntry xmi:id="_JbrvVMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/ParameterSet.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.ParameterSet</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvVcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Activities::Probability</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvVsZiEeSDCqXZMptZiw" name="Optional" identifier="org.eclipse.papyrus.sysML.Optional" hint="UML::Parameter">
- <iconEntry xmi:id="_JbrvV8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Parameter.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Parameter</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvWMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Activities::Optional</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvWcZiEeSDCqXZMptZiw" name="Rationale" identifier="org.eclipse.papyrus.sysML.Rationale" hint="UML::Comment">
- <iconEntry xmi:id="_JbrvWsZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Comment</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvW8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::ModelElements::Rationale</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvXMZiEeSDCqXZMptZiw" name="View Package" identifier="org.eclipse.papyrus.sysML.View_Package" hint="UML::Package">
- <iconEntry xmi:id="_JbrvXcZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Package.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Package</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvXsZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::ModelElements::View</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvX8ZiEeSDCqXZMptZiw" name="View Class" identifier="org.eclipse.papyrus.sysML.View_Class" hint="UML::Class">
- <iconEntry xmi:id="_JbrvYMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvYcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::ModelElements::View</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvYsZiEeSDCqXZMptZiw" name="Conform Dependency" identifier="org.eclipse.papyrus.sysML.Conform_Dependency" hint="UML::Dependency">
- <iconEntry xmi:id="_JbrvY8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Dependency</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvZMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::ModelElements::Conform</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvZcZiEeSDCqXZMptZiw" name="Conform Generalization" identifier="org.eclipse.papyrus.sysML.Conform_Generalization" hint="UML::Generalization">
- <iconEntry xmi:id="_JbrvZsZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Generalization.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Generalization</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvZ8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::ModelElements::Conform</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvaMZiEeSDCqXZMptZiw" name="Problem" identifier="org.eclipse.papyrus.sysML.Problem" hint="UML::Comment">
- <iconEntry xmi:id="_JbrvacZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Comment</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvasZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::ModelElements::Problem</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbrva8ZiEeSDCqXZMptZiw" name="ViewPoint" identifier="org.eclipse.papyrus.sysML.ViewPoint" hint="UML::Class">
- <iconEntry xmi:id="_JbrvbMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvbcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::ModelElements::ViewPoint</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvbsZiEeSDCqXZMptZiw" name="Stakeholder" identifier="org.eclipse.papyrus.sysML.Stakeholder" hint="UML::Classifier">
- <iconEntry xmi:id="_Jbrvb8ZiEeSDCqXZMptZiw" iconPath="/icons/Classifier.gif" bundleId="org.eclipse.papyrus.uml.service.types"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Classifier</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvcMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::ModelElements::Stakeholder</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvccZiEeSDCqXZMptZiw" name="Expose" identifier="org.eclipse.papyrus.sysML.Expose" hint="UML::Dependency">
- <iconEntry xmi:id="_JbrvcsZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Dependency</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbrvc8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::ModelElements::Expose</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvdMZiEeSDCqXZMptZiw" name="ElementGroup" identifier="org.eclipse.papyrus.sysML.ElementGroup" hint="UML::Comment">
- <iconEntry xmi:id="_JbrvdcZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Comment</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvdsZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::ModelElements::ElementGroup</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbrvd8ZiEeSDCqXZMptZiw" name="ConstraintBlock" identifier="org.eclipse.papyrus.sysML.ConstraintBlock" hint="UML::Class">
- <iconEntry xmi:id="_JbrveMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvecZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::ConstraintBlocks::ConstraintBlock</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvesZiEeSDCqXZMptZiw" name="AllocateActivityPartition" identifier="org.eclipse.papyrus.sysML.AllocateActivityPartition" hint="UML::ActivityPartition">
- <iconEntry xmi:id="_Jbrve8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/ActivityPartition.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.ActivityPartition</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvfMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Allocations::AllocateActivityPartition</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvfcZiEeSDCqXZMptZiw" name="Allocate Abstraction" identifier="org.eclipse.papyrus.sysML.Allocate_Abstraction" hint="UML::Abstraction">
- <iconEntry xmi:id="_JbrvfsZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Abstraction</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbrvf8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Allocations::Allocate</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvgMZiEeSDCqXZMptZiw" name="Allocate DirectedRelationship" identifier="org.eclipse.papyrus.sysML.Allocate_DirectedRelationship" hint="UML::DirectedRelationship">
- <iconEntry xmi:id="_JbrvgcZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/DirectedRelationship.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.DirectedRelationship</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvgsZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Allocations::Allocate</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbrvg8ZiEeSDCqXZMptZiw" name="DeriveReqt Abstraction" identifier="org.eclipse.papyrus.sysML.DeriveReqt_Abstraction" hint="UML::Abstraction">
- <iconEntry xmi:id="_JbrvhMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Abstraction</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvhcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::DeriveReqt</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvhsZiEeSDCqXZMptZiw" name="DeriveReqt DirectedRelationship" identifier="org.eclipse.papyrus.sysML.DeriveReqt_DirectedRelationship" hint="UML::DirectedRelationship">
- <iconEntry xmi:id="_Jbrvh8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/DirectedRelationship.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.DirectedRelationship</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrviMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::DeriveReqt</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvicZiEeSDCqXZMptZiw" name="Copy Abstraction" identifier="org.eclipse.papyrus.sysML.Copy_Abstraction" hint="UML::Abstraction">
- <iconEntry xmi:id="_JbrvisZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Abstraction</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbrvi8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::Copy</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvjMZiEeSDCqXZMptZiw" name="Copy DirectedRelationship" identifier="org.eclipse.papyrus.sysML.Copy_DirectedRelationship" hint="UML::DirectedRelationship">
- <iconEntry xmi:id="_JbrvjcZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/DirectedRelationship.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.DirectedRelationship</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvjsZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::Copy</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbrvj8ZiEeSDCqXZMptZiw" name="Satisfy Abstraction" identifier="org.eclipse.papyrus.sysML.Satisfy_Abstraction" hint="UML::Abstraction">
- <iconEntry xmi:id="_JbrvkMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Abstraction</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvkcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::Satisfy</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvksZiEeSDCqXZMptZiw" name="Satisfy DirectedRelationship" identifier="org.eclipse.papyrus.sysML.Satisfy_DirectedRelationship" hint="UML::DirectedRelationship">
- <iconEntry xmi:id="_Jbrvk8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/DirectedRelationship.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.DirectedRelationship</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvlMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::Satisfy</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvlcZiEeSDCqXZMptZiw" name="TestCase Operation" identifier="org.eclipse.papyrus.sysML.TestCase_Operation" hint="UML::Operation">
- <iconEntry xmi:id="_JbrvlsZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Operation.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Operation</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbrvl8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::TestCase</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvmMZiEeSDCqXZMptZiw" name="TestCase Behavior" identifier="org.eclipse.papyrus.sysML.TestCase_Behavior" hint="UML::Behavior">
- <iconEntry xmi:id="_JbrvmcZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Behavior.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Behavior</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvmsZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::TestCase</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbrvm8ZiEeSDCqXZMptZiw" name="Requirement" identifier="org.eclipse.papyrus.sysML.Requirement" hint="UML::Class">
- <iconEntry xmi:id="_JbrvnMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvncZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::Requirement</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvnsZiEeSDCqXZMptZiw" name="Verify Abstraction" identifier="org.eclipse.papyrus.sysML.Verify_Abstraction" hint="UML::Abstraction">
- <iconEntry xmi:id="_Jbrvn8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Abstraction</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvoMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::Verify</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvocZiEeSDCqXZMptZiw" name="Verify DirectedRelationship" identifier="org.eclipse.papyrus.sysML.Verify_DirectedRelationship" hint="UML::DirectedRelationship">
- <iconEntry xmi:id="_JbrvosZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/DirectedRelationship.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.DirectedRelationship</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbrvo8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::Verify</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvpMZiEeSDCqXZMptZiw" name="Trace Abstraction" identifier="org.eclipse.papyrus.sysML.Trace_Abstraction" hint="UML::Abstraction">
- <iconEntry xmi:id="_JbrvpcZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Abstraction</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvpsZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::Trace</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbrvp8ZiEeSDCqXZMptZiw" name="Trace DirectedRelationship" identifier="org.eclipse.papyrus.sysML.Trace_DirectedRelationship" hint="UML::DirectedRelationship">
- <iconEntry xmi:id="_JbrvqMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/DirectedRelationship.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.DirectedRelationship</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvqcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::Trace</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvqsZiEeSDCqXZMptZiw" name="Refine Abstraction" identifier="org.eclipse.papyrus.sysML.Refine_Abstraction" hint="UML::Abstraction">
- <iconEntry xmi:id="_Jbrvq8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Abstraction</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvrMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::Refine</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvrcZiEeSDCqXZMptZiw" name="Refine DirectedRelationship" identifier="org.eclipse.papyrus.sysML.Refine_DirectedRelationship" hint="UML::DirectedRelationship">
- <iconEntry xmi:id="_JbrvrsZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/DirectedRelationship.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.DirectedRelationship</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbrvr8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::Requirements::Refine</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvsMZiEeSDCqXZMptZiw" name="FlowPort" identifier="org.eclipse.papyrus.sysML.FlowPort" hint="UML::Port">
- <iconEntry xmi:id="_JbrvscZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Port.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Port</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvssZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::FlowPort</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbrvs8ZiEeSDCqXZMptZiw" name="FlowSpecification" identifier="org.eclipse.papyrus.sysML.FlowSpecification" hint="UML::Interface">
- <iconEntry xmi:id="_JbrvtMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Interface.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Interface</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvtcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::FlowSpecification</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvtsZiEeSDCqXZMptZiw" name="Allocated" identifier="org.eclipse.papyrus.sysML.Allocated" hint="UML::NamedElement">
- <iconEntry xmi:id="_Jbrvt8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/NamedElement.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.NamedElement</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvuMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Allocated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvucZiEeSDCqXZMptZiw" name="RequirementRelated" identifier="org.eclipse.papyrus.sysML.RequirementRelated" hint="UML::NamedElement">
- <iconEntry xmi:id="_JbrvusZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/NamedElement.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.NamedElement</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbrvu8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::RequirementRelated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvvMZiEeSDCqXZMptZiw" name="Deprecated ValueSpecification" identifier="org.eclipse.papyrus.sysML.Deprecated_ValueSpecification" hint="UML::ValueSpecification">
- <iconEntry xmi:id="_JbrvvcZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/ValueSpecification.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.ValueSpecification</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvvsZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbrvv8ZiEeSDCqXZMptZiw" name="Deprecated Property" identifier="org.eclipse.papyrus.sysML.Deprecated_Property" hint="UML::Property">
- <iconEntry xmi:id="_JbrvwMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvwcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvwsZiEeSDCqXZMptZiw" name="Deprecated InstanceSpecification" identifier="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification" hint="UML::InstanceSpecification">
- <iconEntry xmi:id="_Jbrvw8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/InstanceSpecification.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.InstanceSpecification</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvxMZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvxcZiEeSDCqXZMptZiw" name="Deprecated Class" identifier="org.eclipse.papyrus.sysML.Deprecated_Class" hint="UML::Class">
- <iconEntry xmi:id="_JbrvxsZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbrvx8ZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvyMZiEeSDCqXZMptZiw" name="Deprecated Association" identifier="org.eclipse.papyrus.sysML.Deprecated_Association_UML::Association" hint="UML::Association">
- <iconEntry xmi:id="_JbrvycZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Association.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Association</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvysZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Jbrvy8ZiEeSDCqXZMptZiw" name="Deprecated Generalization" identifier="org.eclipse.papyrus.sysML.Deprecated_Generalization" hint="UML::Generalization">
- <iconEntry xmi:id="_JbrvzMZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/Generalization.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Generalization</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_JbrvzcZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_JbrvzsZiEeSDCqXZMptZiw" name="Deprecated DataType" identifier="org.eclipse.papyrus.sysML.Deprecated_DataType" hint="UML::DataType">
- <iconEntry xmi:id="_Jbrvz8ZiEeSDCqXZMptZiw" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.DataType</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Jbrv0MZiEeSDCqXZMptZiw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsV8MZiEeSDCqXZMptZiw" name="Apply ValueType" identifier="org.eclipse.papyrus.sysML.valueType" target="_Jbru4cZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsV8cZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::ValueType" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsV8sZiEeSDCqXZMptZiw" name="Apply DistributedProperty" identifier="org.eclipse.papyrus.sysML.distributedProperty" target="_Jbru5MZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsV88ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::DistributedProperty" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsV9MZiEeSDCqXZMptZiw" name="Apply ConnectorProperty" identifier="org.eclipse.papyrus.sysML.connectorProperty" target="_Jbru58ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsV9cZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::ConnectorProperty" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsV9sZiEeSDCqXZMptZiw" name="Apply ParticipantProperty" identifier="org.eclipse.papyrus.sysML.participantProperty" target="_Jbru6sZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsV98ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::ParticipantProperty" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsV-MZiEeSDCqXZMptZiw" name="Apply BindingConnector" identifier="org.eclipse.papyrus.sysML.bindingConnector" target="_Jbru7cZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsV-cZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::BindingConnector" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsV-sZiEeSDCqXZMptZiw" name="Apply Block" identifier="org.eclipse.papyrus.sysML.block" target="_Jbru8MZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsV-8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::Block" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsV_MZiEeSDCqXZMptZiw" name="Apply PropertySpecificType" identifier="org.eclipse.papyrus.sysML.propertySpecificType" target="_Jbru88ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsV_cZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::PropertySpecificType" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsV_sZiEeSDCqXZMptZiw" name="Apply NestedConnectorEnd" identifier="org.eclipse.papyrus.sysML.nestedConnectorEnd" target="_Jbru9sZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsV_8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::NestedConnectorEnd" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWAMZiEeSDCqXZMptZiw" name="Apply NestedConnectorEnd" identifier="org.eclipse.papyrus.sysML.nestedConnectorEnd" target="_Jbru-cZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWAcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::NestedConnectorEnd" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWAsZiEeSDCqXZMptZiw" name="Apply DirectedRelationshipPropertyPath" identifier="org.eclipse.papyrus.sysML.directedRelationshipPropertyPath" target="_Jbru_MZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWA8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::DirectedRelationshipPropertyPath" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWBMZiEeSDCqXZMptZiw" name="Apply ElementPropertyPath" identifier="org.eclipse.papyrus.sysML.elementPropertyPath" target="_Jbru_8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWBcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::ElementPropertyPath" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWBsZiEeSDCqXZMptZiw" name="Apply EndPathMultiplicity" identifier="org.eclipse.papyrus.sysML.endPathMultiplicity" target="_JbrvAsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWB8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::EndPathMultiplicity" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWCMZiEeSDCqXZMptZiw" name="Apply BoundReference" identifier="org.eclipse.papyrus.sysML.boundReference" target="_JbrvBcZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWCcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::BoundReference" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWCsZiEeSDCqXZMptZiw" name="Apply AdjunctProperty" identifier="org.eclipse.papyrus.sysML.adjunctProperty" target="_JbrvCMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWC8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::AdjunctProperty" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWDMZiEeSDCqXZMptZiw" name="Apply ClassifierBehaviorProperty" identifier="org.eclipse.papyrus.sysML.classifierBehaviorProperty" target="_JbrvC8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWDcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Blocks::ClassifierBehaviorProperty" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWDsZiEeSDCqXZMptZiw" name="Apply ItemFlow" identifier="org.eclipse.papyrus.sysML.itemFlow" target="_JbrvDsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWD8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::PortsandFlows::ItemFlow" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWEMZiEeSDCqXZMptZiw" name="Apply FlowProperty" identifier="org.eclipse.papyrus.sysML.flowProperty" target="_JbrvEcZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWEcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::PortsandFlows::FlowProperty" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWEsZiEeSDCqXZMptZiw" name="Apply FullPort" identifier="org.eclipse.papyrus.sysML.fullPort" target="_JbrvFMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWE8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::PortsandFlows::FullPort" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWFMZiEeSDCqXZMptZiw" name="Apply InterfaceBlock" identifier="org.eclipse.papyrus.sysML.interfaceBlock" target="_JbrvF8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWFcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::PortsandFlows::InterfaceBlock" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWFsZiEeSDCqXZMptZiw" name="Apply ProxyPort" identifier="org.eclipse.papyrus.sysML.proxyPort" target="_JbrvGsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWF8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::PortsandFlows::ProxyPort" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWGMZiEeSDCqXZMptZiw" name="Apply AcceptChangeStructuralFeatureEventAction" identifier="org.eclipse.papyrus.sysML.acceptChangeStructuralFeatureEventAction" target="_JbrvHcZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWGcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::PortsandFlows::AcceptChangeStructuralFeatureEventAction" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWGsZiEeSDCqXZMptZiw" name="Apply ChangeStructuralFeatureEvent" identifier="org.eclipse.papyrus.sysML.changeStructuralFeatureEvent" target="_JbrvIMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWG8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::PortsandFlows::ChangeStructuralFeatureEvent" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWHMZiEeSDCqXZMptZiw" name="Apply DirectedFeature" identifier="org.eclipse.papyrus.sysML.directedFeature" target="_JbrvI8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWHcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::PortsandFlows::DirectedFeature" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWHsZiEeSDCqXZMptZiw" name="Apply InvocationOnNestedPortAction" identifier="org.eclipse.papyrus.sysML.invocationOnNestedPortAction" target="_JbrvJsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWH8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::PortsandFlows::InvocationOnNestedPortAction" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWIMZiEeSDCqXZMptZiw" name="Apply InvocationOnNestedPortAction" identifier="org.eclipse.papyrus.sysML.invocationOnNestedPortAction" target="_JbrvKcZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWIcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::PortsandFlows::InvocationOnNestedPortAction" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWIsZiEeSDCqXZMptZiw" name="Apply TriggerOnNestedPort" identifier="org.eclipse.papyrus.sysML.triggerOnNestedPort" target="_JbrvLMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWI8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::PortsandFlows::TriggerOnNestedPort" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWJMZiEeSDCqXZMptZiw" name="Apply TriggerOnNestedPort" identifier="org.eclipse.papyrus.sysML.triggerOnNestedPort" target="_JbrvL8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWJcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::PortsandFlows::TriggerOnNestedPort" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWJsZiEeSDCqXZMptZiw" name="Apply Overwrite" identifier="org.eclipse.papyrus.sysML.overwrite" target="_JbrvMsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWJ8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Activities::Overwrite" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWKMZiEeSDCqXZMptZiw" name="Apply ControlOperator" identifier="org.eclipse.papyrus.sysML.controlOperator" target="_JbrvNcZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWKcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Activities::ControlOperator" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWKsZiEeSDCqXZMptZiw" name="Apply ControlOperator" identifier="org.eclipse.papyrus.sysML.controlOperator" target="_JbrvOMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWK8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Activities::ControlOperator" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWLMZiEeSDCqXZMptZiw" name="Apply Rate" identifier="org.eclipse.papyrus.sysML.rate" target="_JbrvO8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWLcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Activities::Rate" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWLsZiEeSDCqXZMptZiw" name="Apply Rate" identifier="org.eclipse.papyrus.sysML.rate" target="_JbrvPsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWL8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Activities::Rate" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWMMZiEeSDCqXZMptZiw" name="Apply NoBuffer" identifier="org.eclipse.papyrus.sysML.noBuffer" target="_JbrvQcZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWMcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Activities::NoBuffer" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWMsZiEeSDCqXZMptZiw" name="Apply Discrete" identifier="org.eclipse.papyrus.sysML.discrete" target="_JbrvRMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWM8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Activities::Discrete" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWNMZiEeSDCqXZMptZiw" name="Apply Discrete" identifier="org.eclipse.papyrus.sysML.discrete" target="_JbrvR8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWNcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Activities::Discrete" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWNsZiEeSDCqXZMptZiw" name="Apply Continuous" identifier="org.eclipse.papyrus.sysML.continuous" target="_JbrvSsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWN8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Activities::Continuous" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWOMZiEeSDCqXZMptZiw" name="Apply Continuous" identifier="org.eclipse.papyrus.sysML.continuous" target="_JbrvTcZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWOcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Activities::Continuous" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWOsZiEeSDCqXZMptZiw" name="Apply Probability" identifier="org.eclipse.papyrus.sysML.probability" target="_JbrvUMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWO8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Activities::Probability" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWPMZiEeSDCqXZMptZiw" name="Apply Probability" identifier="org.eclipse.papyrus.sysML.probability" target="_JbrvU8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWPcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Activities::Probability" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWPsZiEeSDCqXZMptZiw" name="Apply Optional" identifier="org.eclipse.papyrus.sysML.optional" target="_JbrvVsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWP8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Activities::Optional" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWQMZiEeSDCqXZMptZiw" name="Apply Rationale" identifier="org.eclipse.papyrus.sysML.rationale" target="_JbrvWcZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWQcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::ModelElements::Rationale" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWQsZiEeSDCqXZMptZiw" name="Apply View" identifier="org.eclipse.papyrus.sysML.view" target="_JbrvXMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWQ8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::ModelElements::View" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWRMZiEeSDCqXZMptZiw" name="Apply View" identifier="org.eclipse.papyrus.sysML.view" target="_JbrvX8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWRcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::ModelElements::View" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWRsZiEeSDCqXZMptZiw" name="Apply Conform" identifier="org.eclipse.papyrus.sysML.conform" target="_JbrvYsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWR8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::ModelElements::Conform" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWSMZiEeSDCqXZMptZiw" name="Apply Conform" identifier="org.eclipse.papyrus.sysML.conform" target="_JbrvZcZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWScZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::ModelElements::Conform" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWSsZiEeSDCqXZMptZiw" name="Apply Problem" identifier="org.eclipse.papyrus.sysML.problem" target="_JbrvaMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWS8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::ModelElements::Problem" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWTMZiEeSDCqXZMptZiw" name="Apply ViewPoint" identifier="org.eclipse.papyrus.sysML.viewPoint" target="_Jbrva8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWTcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::ModelElements::ViewPoint" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWTsZiEeSDCqXZMptZiw" name="Apply Stakeholder" identifier="org.eclipse.papyrus.sysML.stakeholder" target="_JbrvbsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWT8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::ModelElements::Stakeholder" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWUMZiEeSDCqXZMptZiw" name="Apply Expose" identifier="org.eclipse.papyrus.sysML.expose" target="_JbrvccZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWUcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::ModelElements::Expose" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWUsZiEeSDCqXZMptZiw" name="Apply ElementGroup" identifier="org.eclipse.papyrus.sysML.elementGroup" target="_JbrvdMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWU8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::ModelElements::ElementGroup" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWVMZiEeSDCqXZMptZiw" name="Apply ConstraintBlock" identifier="org.eclipse.papyrus.sysML.constraintBlock" target="_Jbrvd8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWVcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::ConstraintBlocks::ConstraintBlock" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWVsZiEeSDCqXZMptZiw" name="Apply AllocateActivityPartition" identifier="org.eclipse.papyrus.sysML.allocateActivityPartition" target="_JbrvesZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWV8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Allocations::AllocateActivityPartition" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWWMZiEeSDCqXZMptZiw" name="Apply Allocate" identifier="org.eclipse.papyrus.sysML.allocate" target="_JbrvfcZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWWcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Allocations::Allocate" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWWsZiEeSDCqXZMptZiw" name="Apply Allocate" identifier="org.eclipse.papyrus.sysML.allocate" target="_JbrvgMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWW8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Allocations::Allocate" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWXMZiEeSDCqXZMptZiw" name="Apply DeriveReqt" identifier="org.eclipse.papyrus.sysML.deriveReqt" target="_Jbrvg8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWXcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::DeriveReqt" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWXsZiEeSDCqXZMptZiw" name="Apply DeriveReqt" identifier="org.eclipse.papyrus.sysML.deriveReqt" target="_JbrvhsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWX8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::DeriveReqt" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWYMZiEeSDCqXZMptZiw" name="Apply Copy" identifier="org.eclipse.papyrus.sysML.copy" target="_JbrvicZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWYcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::Copy" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWYsZiEeSDCqXZMptZiw" name="Apply Copy" identifier="org.eclipse.papyrus.sysML.copy" target="_JbrvjMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWY8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::Copy" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWZMZiEeSDCqXZMptZiw" name="Apply Satisfy" identifier="org.eclipse.papyrus.sysML.satisfy" target="_Jbrvj8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWZcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::Satisfy" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWZsZiEeSDCqXZMptZiw" name="Apply Satisfy" identifier="org.eclipse.papyrus.sysML.satisfy" target="_JbrvksZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWZ8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::Satisfy" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWaMZiEeSDCqXZMptZiw" name="Apply TestCase" identifier="org.eclipse.papyrus.sysML.testCase" target="_JbrvlcZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWacZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::TestCase" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWasZiEeSDCqXZMptZiw" name="Apply TestCase" identifier="org.eclipse.papyrus.sysML.testCase" target="_JbrvmMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWa8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::TestCase" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWbMZiEeSDCqXZMptZiw" name="Apply Requirement" identifier="org.eclipse.papyrus.sysML.requirement" target="_Jbrvm8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWbcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::Requirement" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWbsZiEeSDCqXZMptZiw" name="Apply Verify" identifier="org.eclipse.papyrus.sysML.verify" target="_JbrvnsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWb8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::Verify" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWcMZiEeSDCqXZMptZiw" name="Apply Verify" identifier="org.eclipse.papyrus.sysML.verify" target="_JbrvocZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWccZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::Verify" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWcsZiEeSDCqXZMptZiw" name="Apply Trace" identifier="org.eclipse.papyrus.sysML.trace" target="_JbrvpMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWc8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::Trace" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWdMZiEeSDCqXZMptZiw" name="Apply Trace" identifier="org.eclipse.papyrus.sysML.trace" target="_Jbrvp8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWdcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::Trace" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWdsZiEeSDCqXZMptZiw" name="Apply Refine" identifier="org.eclipse.papyrus.sysML.refine" target="_JbrvqsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWd8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::Refine" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWeMZiEeSDCqXZMptZiw" name="Apply Refine" identifier="org.eclipse.papyrus.sysML.refine" target="_JbrvrcZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWecZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::Requirements::Refine" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWesZiEeSDCqXZMptZiw" name="Apply FlowPort" identifier="org.eclipse.papyrus.sysML.flowPort" target="_JbrvsMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWe8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::DeprecatedElements::FlowPort" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWfMZiEeSDCqXZMptZiw" name="Apply FlowSpecification" identifier="org.eclipse.papyrus.sysML.flowSpecification" target="_Jbrvs8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWfcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::DeprecatedElements::FlowSpecification" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWfsZiEeSDCqXZMptZiw" name="Apply Allocated" identifier="org.eclipse.papyrus.sysML.allocated" target="_JbrvtsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWf8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::DeprecatedElements::Allocated" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWgMZiEeSDCqXZMptZiw" name="Apply RequirementRelated" identifier="org.eclipse.papyrus.sysML.requirementRelated" target="_JbrvucZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWgcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::DeprecatedElements::RequirementRelated" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWgsZiEeSDCqXZMptZiw" name="Apply Deprecated" identifier="org.eclipse.papyrus.sysML.deprecated" target="_JbrvvMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWg8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWhMZiEeSDCqXZMptZiw" name="Apply Deprecated" identifier="org.eclipse.papyrus.sysML.deprecated" target="_Jbrvv8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWhcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWhsZiEeSDCqXZMptZiw" name="Apply Deprecated" identifier="org.eclipse.papyrus.sysML.deprecated" target="_JbrvwsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWh8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWiMZiEeSDCqXZMptZiw" name="Apply Deprecated" identifier="org.eclipse.papyrus.sysML.deprecated" target="_JbrvxcZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWicZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWisZiEeSDCqXZMptZiw" name="Apply Deprecated" identifier="org.eclipse.papyrus.sysML.deprecated_UML::Association" target="_JbrvyMZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWi8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWjMZiEeSDCqXZMptZiw" name="Apply Deprecated" identifier="org.eclipse.papyrus.sysML.deprecated" target="_Jbrvy8ZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWjcZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_JbsWjsZiEeSDCqXZMptZiw" name="Apply Deprecated" identifier="org.eclipse.papyrus.sysML.deprecated" target="_JbrvzsZiEeSDCqXZMptZiw">
- <stereotypesToApply xmi:id="_JbsWj8ZiEeSDCqXZMptZiw" stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated" updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
-</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/plugin.xml b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/plugin.xml index 3ecb6dae43c..dcefff146bf 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/plugin.xml +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/plugin.xml @@ -114,7 +114,16 @@ </profile> </extension> - + <extension + point="org.eclipse.papyrus.uml.extensionpoints.UMLLibrary"> + <library + description="UML library for SysML (from OMG SysML V1.4)" + iconpath="icons/SysMLLibrary.gif" + name="SyMLLibraries" + path="platform:/plugin/org.eclipse.papyrus.sysml14/model/SyMLLibraries.uml" + provider="CEA LIST"> + </library> + </extension> </plugin> diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/util/SysmlResource.java b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/util/SysmlResource.java index 6e1eaf76bfd..8cfa17446a7 100644 --- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/util/SysmlResource.java +++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14/src/org/eclipse/papyrus/sysml14/util/SysmlResource.java @@ -17,5 +17,6 @@ public class SysmlResource { public static final String PROFILE_URI = "http://www.omg.org/spec/SysML/20131201/SysML"; //$NON-NLS-1$ - + public static final String LIBRARY_PATH = "platform:/plugin/org.eclipse.papyrus.sysml14/model/SyMLLibraries.uml"; //$NON-NLS-1$ + } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/UnapplyAllStereotypesCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/UnapplyAllStereotypesCommand.java index 4de1fb4fe43..4cb4c53aaa6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/UnapplyAllStereotypesCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/commands/UnapplyAllStereotypesCommand.java @@ -1,13 +1,14 @@ /******************************************************************************* - * Copyright (c) 2008 Conselleria de Infraestructuras y Transporte, - * Generalitat de la Comunitat Valenciana . + * Copyright (c) 2008, 2015 Conselleria de Infraestructuras y Transporte, Generalitat de la Comunitat Valenciana, Christian W. Damus, 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: Francisco Javier Cano Muñoz (Prodevelop) - initial API implementation - * Mathieu Velten (Atos Origin) - rewrite using transactional command + * Contributors: + * Francisco Javier Cano Muñoz (Prodevelop) - initial API implementation + * Mathieu Velten (Atos Origin) - rewrite using transactional command + * Christian W. Damus - bug 458685 * ******************************************************************************/ @@ -18,18 +19,21 @@ import java.util.ListIterator; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.gmf.runtime.common.core.command.CompositeCommand; +import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand; import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand; import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest; import org.eclipse.uml2.uml.Element; /** * Unapplies all stereotypes from an Element. + * + * @deprecated Proper delegation to the Edit Service ensures deletion of stereotype applications when UML elements are deleted. */ -public class UnapplyAllStereotypesCommand extends CompositeCommand { +@Deprecated +public class UnapplyAllStereotypesCommand extends CompositeTransactionalCommand { public UnapplyAllStereotypesCommand(TransactionalEditingDomain domain, String label, Element element) { - super(label); + super(domain, label); List<EObject> stereotypeApplications = element.getStereotypeApplications(); for (ListIterator<EObject> it = stereotypeApplications.listIterator(stereotypeApplications.size()); it.hasPrevious();) { EObject stereotypeApplication = it.previous(); diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/BorderItemNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/BorderItemNameEditPart.java index 4f8e7b057c7..112f9a976e7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/BorderItemNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/BorderItemNameEditPart.java @@ -1,680 +1,678 @@ -/**
- * Copyright (c) 2015 CEA LIST.
- *
- * 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.common.editparts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.CellEditorLocator;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.directedit.locator.CellEditorLocatorAccess;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.LabelAlignmentEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure;
-import org.eclipse.papyrus.uml.diagram.common.locator.MultilineCellEditorLocator;
-import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.Feature;
-
-public class BorderItemNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
-
-
- private DirectEditManager manager;
-
- private IParser parser;
- private List<?> parserElements;
-
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
-
- public BorderItemNameEditPart(View view) {
- super(view);
- }
-
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL, new OperationLabelEditPolicy());
- installEditPolicy(LabelAlignmentEditPolicy.LABEL_ALIGNMENT_KEY, new LabelAlignmentEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
- }
-
- @Override
- protected boolean getDefaultLabelVisibility() {
- return true;
- }
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if(parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator)constraint;
- }
- return null;
- }
-
- public void refreshBounds() {
- int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- public void setLabel(IFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- public void setParser(IParser parser) {
- this.parser = parser;
- }
-
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- protected Image getLabelIcon() {
- EObject parserElement = getParserElement();
- if(parserElement == null) {
- return null;
- }
- List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for(View view : views) {
- if(AppearanceHelper.showElementIcon(view)) {
- return org.eclipse.papyrus.uml.diagram.common.Activator.getDefault().getImage(parserElement.eClass());
- }
- }
- return null;
- }
-
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
- // shouldn't get here
- return null;
- }
- };
- }
-
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- public IParser getParser() {
- if(parser == null) {
- parser = new NamedElementLabelParser();
-
- }
- return parser;
- }
-
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- protected void performDirectEdit() {
- BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
-
- @Override
- public void run() {
- getManager().show();
- }
- });
- }
-
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) {
- if (source.getFigure() instanceof IMultilineEditableFigure) {
- return new MultilineCellEditorLocator(
- (IMultilineEditableFigure) source.getFigure());
- }
- else {
- return CellEditorLocatorAccess.INSTANCE.getTextCellEditorLocator(source);
-
- }
- }
-
- protected void performDirectEditRequest(Request request) {
- final Request theRequest = request;
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- // Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), getTextCellEditorLocator(this)));
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
- initializeDirectEditManager(theRequest);
- return;
- } else if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
- initializeDirectEditManager(theRequest);
- break;
- default:
- break;
- }
- }
-
- protected void initializeDirectEditManager(final Request request) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- @Override
- public void run() {
- if(isActive() && isEditable()) {
- if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if(maskLabelPolicy == null) {
- View view = (View)getModel();
- if(view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- } else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- if(resolveSemanticElement() instanceof Feature) {
- if(((Feature)resolveSemanticElement()).isStatic()) {
- ((WrappingLabel)getFigure()).setTextUnderline(true);
- } else {
- ((WrappingLabel)getFigure()).setTextUnderline(false);
- }
- }
- }
-
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- * @param theRequest the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- @Override
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new PapyrusWrappingLabel();
- }
-}
+/** + * Copyright (c) 2015 CEA LIST. + * + * 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: + * CEA LIST - Initial API and implementation + */ +package org.eclipse.papyrus.uml.diagram.common.editparts; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.emf.transaction.RunnableWithResult; +import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.gef.AccessibleEditPart; +import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.Request; +import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.gef.tools.CellEditorLocator; +import org.eclipse.gef.tools.DirectEditManager; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParser; +import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus; +import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart; +import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy; +import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator; +import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry; +import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants; +import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager; +import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; +import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter; +import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser; +import org.eclipse.gmf.runtime.notation.FontStyle; +import org.eclipse.gmf.runtime.notation.NotationPackage; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.gmf.tooling.runtime.directedit.locator.CellEditorLocatorAccess; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.viewers.ICellEditorValidator; +import org.eclipse.jface.window.Window; +import org.eclipse.papyrus.extensionpoints.editors.Activator; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration; +import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; +import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper; +import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil; +import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds; +import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.LabelAlignmentEditPolicy; +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel; +import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition; +import org.eclipse.papyrus.uml.diagram.common.editpolicies.UMLTextSelectionEditPolicy; +import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure; +import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure; +import org.eclipse.papyrus.uml.diagram.common.locator.MultilineCellEditorLocator; +import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser; +import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; +import org.eclipse.uml2.uml.Feature; + +public class BorderItemNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart { + + + private DirectEditManager manager; + + private IParser parser; + private List<?> parserElements; + + private String defaultText; + + /** + * direct edition mode (default, undefined, registered editor, etc.) + * @generated + */ + protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR; + + /** + * configuration from a registered edit dialog + * @generated + */ + protected IDirectEditorConfiguration configuration; + + + public BorderItemNameEditPart(View view) { + super(view); + } + + protected void createDefaultEditPolicies() { + super.createDefaultEditPolicies(); + installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); + installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy()); + installEditPolicy(LabelAlignmentEditPolicy.LABEL_ALIGNMENT_KEY, new LabelAlignmentEditPolicy()); + installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy()); + } + + @Override + protected boolean getDefaultLabelVisibility() { + return true; + } + public IBorderItemLocator getBorderItemLocator() { + IFigure parentFigure = getFigure().getParent(); + if(parentFigure != null && parentFigure.getLayoutManager() != null) { + Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure()); + return (IBorderItemLocator)constraint; + } + return null; + } + + public void refreshBounds() { + int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); + int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); + int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); + int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); + getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height)); + } + + protected String getLabelTextHelper(IFigure figure) { + if(figure instanceof WrappingLabel) { + return ((WrappingLabel)figure).getText(); + } else if(figure instanceof ILabelFigure) { + return ((ILabelFigure)figure).getText(); + } else { + return ((Label)figure).getText(); + } + } + + protected void setLabelTextHelper(IFigure figure, String text) { + if(figure instanceof WrappingLabel) { + ((WrappingLabel)figure).setText(text); + } else if(figure instanceof ILabelFigure) { + ((ILabelFigure)figure).setText(text); + } else { + ((Label)figure).setText(text); + } + } + + protected Image getLabelIconHelper(IFigure figure) { + if(figure instanceof WrappingLabel) { + return ((WrappingLabel)figure).getIcon(); + } else if(figure instanceof ILabelFigure) { + return ((ILabelFigure)figure).getIcon(); + } else { + return ((Label)figure).getIcon(); + } + } + + protected void setLabelIconHelper(IFigure figure, Image icon) { + if(figure instanceof WrappingLabel) { + ((WrappingLabel)figure).setIcon(icon); + } else if(figure instanceof ILabelFigure) { + ((ILabelFigure)figure).setIcon(icon); + } else { + ((Label)figure).setIcon(icon); + } + } + + public void setLabel(IFigure figure) { + unregisterVisuals(); + setFigure(figure); + defaultText = getLabelTextHelper(figure); + registerVisuals(); + refreshVisuals(); + } + + /** + * @generated + */ + protected List<?> getModelChildren() { + return Collections.EMPTY_LIST; + } + + public IGraphicalEditPart getChildBySemanticHint(String semanticHint) { + return null; + } + + public void setParser(IParser parser) { + this.parser = parser; + } + + protected EObject getParserElement() { + return resolveSemanticElement(); + } + + protected Image getLabelIcon() { + EObject parserElement = getParserElement(); + if(parserElement == null) { + return null; + } + List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer()); + for(View view : views) { + if(AppearanceHelper.showElementIcon(view)) { + return org.eclipse.papyrus.uml.diagram.common.Activator.getDefault().getImage(parserElement.eClass()); + } + } + return null; + } + + protected String getLabelText() { + String text = null; + EObject parserElement = getParserElement(); + if(parserElement != null && getParser() != null) { + text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue()); + } + if(text == null || text.length() == 0) { + text = defaultText; + } + return text; + } + + public void setLabelText(String text) { + setLabelTextHelper(getFigure(), text); + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback(); + } + } + + public String getEditText() { + if(getParserElement() == null || getParser() == null) { + return ""; //$NON-NLS-1$ + } + return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue()); + } + + protected boolean isEditable() { + return getParser() != null; + } + + public ICellEditorValidator getEditTextValidator() { + return new ICellEditorValidator() { + + @Override + public String isValid(final Object value) { + if(value instanceof String) { + final EObject element = getParserElement(); + final IParser parser = getParser(); + try { + IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() { + + @Override + public void run() { + setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value)); + } + }); + return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage(); + } catch (InterruptedException ie) { + ie.printStackTrace(); + } + } + // shouldn't get here + return null; + } + }; + } + + public IContentAssistProcessor getCompletionProcessor() { + if(getParserElement() == null || getParser() == null) { + return null; + } + return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement())); + } + + public ParserOptions getParserOptions() { + return ParserOptions.NONE; + } + + public IParser getParser() { + if(parser == null) { + parser = new NamedElementLabelParser(); + + } + return parser; + } + + protected DirectEditManager getManager() { + if(manager == null) { + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), getTextCellEditorLocator(this))); + } + return manager; + } + + protected void setManager(DirectEditManager manager) { + this.manager = manager; + } + + protected void performDirectEdit() { + BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() { + + @Override + public void run() { + getManager().show(); + } + }); + } + + protected void performDirectEdit(Point eventLocation) { + if(getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint()); + } + } + + private void performDirectEdit(char initialCharacter) { + if(getManager() instanceof TextDirectEditManager) { + ((TextDirectEditManager)getManager()).show(initialCharacter); + } else { + performDirectEdit(); + } + } + + public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) { + if (source.getFigure() instanceof IMultilineEditableFigure) { + return new MultilineCellEditorLocator( + (IMultilineEditableFigure) source.getFigure()); + } + else { + return CellEditorLocatorAccess.INSTANCE.getTextCellEditorLocator(source); + + } + } + + protected void performDirectEditRequest(Request request) { + final Request theRequest = request; + if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) { + directEditionMode = getDirectEditionType(); + } + switch(directEditionMode) { + case IDirectEdition.NO_DIRECT_EDITION: + // no direct edition mode => does nothing + return; + case IDirectEdition.EXTENDED_DIRECT_EDITOR: + updateExtendedEditorConfiguration(); + if(configuration == null || configuration.getLanguage() == null) { + // Create default edit manager + setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), getTextCellEditorLocator(this))); + performDefaultDirectEditorEdit(theRequest); + } else { + configuration.preEditAction(resolveSemanticElement()); + Dialog dialog = null; + if(configuration instanceof ICustomDirectEditorConfiguration) { + setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this)); + initializeDirectEditManager(theRequest); + return; + } else if(configuration instanceof IPopupEditorConfiguration) { + IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this); + helper.showEditor(); + return; + } else if(configuration instanceof IAdvancedEditorConfiguration) { + dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement())); + } else if(configuration instanceof IDirectEditorConfiguration) { + dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration); + } else { + return; + } + final Dialog finalDialog = dialog; + if(Window.OK == dialog.open()) { + TransactionalEditingDomain domain = getEditingDomain(); + RecordingCommand command = new RecordingCommand(domain, "Edit Label") { + + @Override + protected void doExecute() { + configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue()); + } + }; + domain.getCommandStack().execute(command); + } + } + break; + case IDirectEdition.DEFAULT_DIRECT_EDITOR: + initializeDirectEditManager(theRequest); + break; + default: + break; + } + } + + protected void initializeDirectEditManager(final Request request) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if(isActive() && isEditable()) { + if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + protected void refreshVisuals() { + super.refreshVisuals(); + refreshLabel(); + refreshFont(); + refreshFontColor(); + refreshUnderline(); + refreshStrikeThrough(); + } + + protected void refreshLabel() { + EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY); + if(maskLabelPolicy == null) { + maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL); + } + if(maskLabelPolicy == null) { + View view = (View)getModel(); + if(view.isVisible()) { + setLabelTextHelper(getFigure(), getLabelText()); + setLabelIconHelper(getFigure(), getLabelIcon()); + } else { + setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$ + setLabelIconHelper(getFigure(), null); + } + } + Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE); + if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback(); + } + Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE); + if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) { + ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback(); + } + } + + protected void refreshUnderline() { + FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if(style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline()); + } + if(resolveSemanticElement() instanceof Feature) { + if(((Feature)resolveSemanticElement()).isStatic()) { + ((WrappingLabel)getFigure()).setTextUnderline(true); + } else { + ((WrappingLabel)getFigure()).setTextUnderline(false); + } + } + } + + protected void refreshStrikeThrough() { + FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if(style != null && getFigure() instanceof WrappingLabel) { + ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough()); + } + } + + protected void refreshFont() { + FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle()); + if(style != null) { + FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL)); + setFont(fontData); + } + } + + protected void setFontColor(Color color) { + getFigure().setForegroundColor(color); + } + + protected void addSemanticListeners() { + if(getParser() instanceof ISemanticParser) { + EObject element = resolveSemanticElement(); + parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element); + for(int i = 0; i < parserElements.size(); i++) { + addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$ + } + } else { + super.addSemanticListeners(); + } + } + + protected void removeSemanticListeners() { + if(parserElements != null) { + for(int i = 0; i < parserElements.size(); i++) { + removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$ + } + } else { + super.removeSemanticListeners(); + } + } + + protected AccessibleEditPart getAccessibleEditPart() { + if(accessibleEP == null) { + accessibleEP = new AccessibleGraphicalEditPart() { + + @Override + public void getName(AccessibleEvent e) { + e.result = getLabelTextHelper(getFigure()); + } + }; + } + return accessibleEP; + } + + private View getFontStyleOwnerView() { + return getPrimaryView(); + } + + /** + * Returns the kind of associated editor for direct edition. + * + * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition + * @generated + */ + public int getDirectEditionType() { + if(checkExtendedEditor()) { + initExtendedEditorConfiguration(); + return IDirectEdition.EXTENDED_DIRECT_EDITOR; + } + if(checkDefaultEdition()) { + return IDirectEdition.DEFAULT_DIRECT_EDITOR; + } + // not a named element. no specific editor => do nothing + return IDirectEdition.NO_DIRECT_EDITION; + } + + /** + * Checks if an extended editor is present. + * + * @return <code>true</code> if an extended editor is present. + * @generated + */ + protected boolean checkExtendedEditor() { + if(resolveSemanticElement() != null) { + return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName()); + } + return false; + } + + /** + * Checks if a default direct edition is available + * + * @return <code>true</code> if a default direct edition is available + * @generated + */ + protected boolean checkDefaultEdition() { + return (getParser() != null); + } + + /** + * Initializes the extended editor configuration + * @generated + */ + protected void initExtendedEditorConfiguration() { + if(configuration == null) { + final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if(languagePreferred != null && !languagePreferred.equals("")) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else { + configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName()); + } + } + } + + /** + * Updates the preference configuration + * @generated + */ + protected void updateExtendedEditorConfiguration() { + String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName()); + if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) { + configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName()); + } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) { + configuration = null; + } + } + + /** + * Performs the direct edit usually used by GMF editors. + * @param theRequest the direct edit request that starts the direct edit system + * @generated + */ + protected void performDefaultDirectEditorEdit(final Request theRequest) { + // initialize the direct edit manager + try { + getEditingDomain().runExclusive(new Runnable() { + + @Override + public void run() { + if(isActive() && isEditable()) { + if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) { + Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR); + performDirectEdit(initialChar.charValue()); + } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) { + DirectEditRequest editRequest = (DirectEditRequest)theRequest; + performDirectEdit(editRequest.getLocation()); + } else { + performDirectEdit(); + } + } + } + }); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + protected void handleNotificationEvent(Notification event) { + Object feature = event.getFeature(); + if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) { + Integer c = (Integer)event.getNewValue(); + setFontColor(DiagramColorRegistry.getInstance().getColor(c)); + } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) { + refreshUnderline(); + } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) { + refreshStrikeThrough(); + } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) { + refreshFont(); + } else { + if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) { + refreshLabel(); + } + if(getParser() instanceof ISemanticParser) { + ISemanticParser modelParser = (ISemanticParser)getParser(); + if(modelParser.areSemanticElementsAffected(null, event)) { + removeSemanticListeners(); + if(resolveSemanticElement() != null) { + addSemanticListeners(); + } + refreshLabel(); + } + } + } + super.handleNotificationEvent(event); + } + + /** + * @generated + */ + protected IFigure createFigure() { + IFigure label = createFigurePrim(); + defaultText = getLabelTextHelper(label); + return label; + } + + /** + * @generated + */ + protected IFigure createFigurePrim() { + return new PapyrusWrappingLabel(); + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/UMLBaseEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/UMLBaseEditHelper.java index 46b83fd21be..fd3d6728369 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/UMLBaseEditHelper.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/helper/UMLBaseEditHelper.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2009 CEA LIST. + * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, and others. * * * All rights reserved. This program and the accompanying materials @@ -9,11 +9,11 @@ * * Contributors: * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation + * Christian W. Damus - bug 458685 * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.common.helper; -import org.eclipse.emf.ecore.EObject; import org.eclipse.gmf.runtime.common.core.command.CompositeCommand; import org.eclipse.gmf.runtime.common.core.command.ICommand; import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry; @@ -22,11 +22,8 @@ import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper; import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest; -import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; -import org.eclipse.papyrus.uml.diagram.common.commands.UnapplyAllStereotypesCommand; -import org.eclipse.uml2.uml.Element; /** * @generated @@ -91,21 +88,6 @@ public class UMLBaseEditHelper extends AbstractEditHelper { } /** - * @generated NOT handle unapply stereotypes before delete - */ - @Override - protected ICommand getDestroyElementCommand(DestroyElementRequest req) { - EObject elementToDestroy = req.getElementToDestroy(); - if (elementToDestroy instanceof Element) { - UnapplyAllStereotypesCommand command = new UnapplyAllStereotypesCommand(req.getEditingDomain(), req.getLabel(), (Element) elementToDestroy); - if (!command.isEmpty()) { - return command; - } - } - return null; - } - - /** * @generated */ @Override diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF index c24682fbe3b..9253047c54d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF @@ -67,7 +67,9 @@ Require-Bundle: org.eclipse.core.expressions, org.eclipse.papyrus.uml.diagram.menu;bundle-version="1.1.0",
org.eclipse.papyrus.infra.constraints;bundle-version="1.1.0",
org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0"
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.canonical;bundle-version="1.1.0",
+ com.google.guava;bundle-version="11.0.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.1.0.qualifier
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/canonical/LifelineSemanticChildrenStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/canonical/LifelineSemanticChildrenStrategy.java new file mode 100644 index 00000000000..b5378ed18c3 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/canonical/LifelineSemanticChildrenStrategy.java @@ -0,0 +1,76 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.sequence.canonical; + +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.papyrus.uml.diagram.common.canonical.DefaultUMLSemanticChildrenStrategy; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.ExecutionSpecification; +import org.eclipse.uml2.uml.Lifeline; +import org.eclipse.uml2.uml.MessageEnd; + +import com.google.common.collect.Iterables; +import com.google.common.collect.Lists; + +/** + * Custom semantic-children strategy for lifelines in sequence diagrams. + */ +public class LifelineSemanticChildrenStrategy extends DefaultUMLSemanticChildrenStrategy { + + public LifelineSemanticChildrenStrategy() { + super(); + } + + @Override + public List<? extends EObject> getCanonicalSemanticChildren(EObject semanticFromEditPart, View viewFromEditPart) { + List<? extends EObject> _result; + + if (semanticFromEditPart instanceof Lifeline) { + // Get the execution specifications covering it + Lifeline lifeline = (Lifeline) semanticFromEditPart; + + List<EObject> result = Lists.newArrayList(); + _result = result; + + Iterables.addAll(result, Iterables.filter(lifeline.getCoveredBys(), ExecutionSpecification.class)); + } else { + _result = super.getCanonicalSemanticChildren(semanticFromEditPart, viewFromEditPart); + } + + return _result; + } + + @Override + public List<? extends EObject> getCanonicalSemanticConnections(EObject semanticFromEditPart, View viewFromEditPart) { + // Lifelines are responsible for the messages connected to them via message-ends + List<? extends EObject> result = null; + + Lifeline lifeline = (semanticFromEditPart instanceof Lifeline) ? (Lifeline) semanticFromEditPart : null; + if (lifeline != null) { + List<Element> messages = Lists.newArrayList(); + result = messages; + + for (MessageEnd next : Iterables.filter(lifeline.getCoveredBys(), MessageEnd.class)) { + if (next.getMessage() != null) { + messages.add(next.getMessage()); + } + } + } + + return result; + } +} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineEditPart.java index 2a15ab91230..5b1488cb4e4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineEditPart.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2010 CEA
+ * Copyright (c) 2010, 2015 CEA, Christian W. Damus, and others
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@ *
* Contributors:
* Soyatec - Initial API and implementation
+ * Christian W. Damus - bug 433206
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
@@ -257,7 +258,7 @@ public class CustomLifelineEditPart extends LifelineEditPart { // DestructionOccurrenceSpecification is always on the bottom
if (anchor.eContainer() instanceof Edge) {
Edge edge = (Edge) anchor.eContainer();
- if (edge.getElement() instanceof Message && ((Message)edge.getElement()).getReceiveEvent() instanceof DestructionOccurrenceSpecification) {
+ if (edge.getElement() instanceof Message && ((Message) edge.getElement()).getReceiveEvent() instanceof DestructionOccurrenceSpecification) {
if (anchor.equals(edge.getTargetAnchor())) {
return "(0.5, 1.0)";
}
@@ -468,7 +469,7 @@ public class CustomLifelineEditPart extends LifelineEditPart { case TimeConstraintEditPart.VISUAL_ID:
case TimeObservationEditPart.VISUAL_ID:
case DurationConstraintEditPart.VISUAL_ID:
- //case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
+ // case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
@@ -860,11 +861,11 @@ public class CustomLifelineEditPart extends LifelineEditPart { if (!(part instanceof GraphicalEditPart)) {
continue;
}
- if (ignoreDestructionOccurence) {
+ if (ignoreDestructionOccurence) {
if (part instanceof DestructionOccurrenceSpecificationEditPart) {
continue;
}
- if (part.getParent() instanceof CustomMessage5EditPart && ((CustomMessage5EditPart)part.getParent()).getSource() != this) {
+ if (part.getParent() instanceof CustomMessage5EditPart && ((CustomMessage5EditPart) part.getParent()).getSource() != this) {
continue;
}
}
@@ -1289,35 +1290,35 @@ public class CustomLifelineEditPart extends LifelineEditPart { if (false == getParent() instanceof CustomInteractionInteractionCompartmentEditPart) {
return -1;
}
- CustomInteractionInteractionCompartmentEditPart parentEP = (CustomInteractionInteractionCompartmentEditPart)getParent();
- CustomInteractionEditPart grandParent = (CustomInteractionEditPart)parentEP.getParent();
+ CustomInteractionInteractionCompartmentEditPart parentEP = (CustomInteractionInteractionCompartmentEditPart) getParent();
+ CustomInteractionEditPart grandParent = (CustomInteractionEditPart) parentEP.getParent();
final Bounds bounds = (Bounds) ((Shape) getModel()).getLayoutConstraint();
- final Bounds boundsGrandParent = (Bounds) ((Shape)grandParent.getModel()).getLayoutConstraint();
+ final Bounds boundsGrandParent = (Bounds) ((Shape) grandParent.getModel()).getLayoutConstraint();
if (bounds != null && boundsGrandParent != null) {
Rectangle grandParentRect = OperandBoundsComputeHelper.fillRectangle(boundsGrandParent);
if (grandParentRect.height == -1) {
grandParentRect = grandParent.getFigure().getBounds().getCopy();
- }
+ }
Rectangle boundsRect = OperandBoundsComputeHelper.fillRectangle(bounds);
if (boundsRect.height == -1) {
boundsRect.height = this.getFigure().getBounds().height;
}
grandParent.getFigure().translateToRelative(boundsRect);
- //return boundsGrandParent.getHeight() - boundsRect.y - LifelineXYLayoutEditPolicy.LIFELINE_SOUTH_SPACING;
+ // return boundsGrandParent.getHeight() - boundsRect.y - LifelineXYLayoutEditPolicy.LIFELINE_SOUTH_SPACING;
int heightDiff = grandParent.getFigure().getBounds().height - parentEP.getFigure().getBounds().height;
Dimension zoomedAddon = new Dimension(0, LifelineXYLayoutEditPolicy.LIFELINE_SOUTH_SPACING);
grandParent.getFigure().translateToRelative(zoomedAddon);
return grandParentRect.height() - bounds.getY() - heightDiff - zoomedAddon.height;
}
- return -1;
+ return -1;
}
-
+
/**
* Allign bottom of the lifeline to the parent's one.
*
*/
public Command getAlignLifelineBottomToParentCommand(Command command, boolean ignoreDOS) {
- EObject element = ViewUtil.resolveSemanticElement((View)getModel());
+ EObject element = ViewUtil.resolveSemanticElement((View) getModel());
if (false == element instanceof Lifeline) {
return command;
}
@@ -1329,9 +1330,11 @@ public class CustomLifelineEditPart extends LifelineEditPart { return command;
}
}
- }
+ }
ICommand cmd = new AbstractTransactionalCommand(getEditingDomain(), "Allign Lifeline bottom", null) {
protected int heightDelta = 0;
+
+ @Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
final int adjustedHeight = getAdjustedHeight();
final Bounds bounds = (Bounds) ((Shape) getModel()).getLayoutConstraint();
@@ -1409,7 +1412,7 @@ public class CustomLifelineEditPart extends LifelineEditPart { /**
* This method automatically moves a lifeline according to the change of the size of the name and stereotypes container.
* This avoids the move of the dash line and its ES.
- * Also the dash line's height is adjusted (upon lifeline's creation)
+ * Also the dash line's height is adjusted (upon lifeline's creation)
*/
public void updateLifelinePosition() {
Bounds bounds = getBounds();
@@ -1442,10 +1445,14 @@ public class CustomLifelineEditPart extends LifelineEditPart { */
Dimension size = getPrimaryShape().getFigureLifelineNameContainerFigure().getPreferredSize(-1, oldNameContainerHeight);
if (!LifelineResizeHelper.isManualSize(this)) {
+ // If rect.width == -1, then we haven't yet computed the bounds
+ if (rect.width == -1) {
+ rect.width = updatedRect.width / 2;
+ }
if (size.width != rect.width) {
moveExecutionParts(new Dimension(size.width - rect.width, 0));
rect.width = size.width;
- rect.height = getAdjustedHeight();
+ rect.height = getAdjustedHeight();
updateLifelineBounds(rect);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java index c676a050516..e87961ea5a0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2009 CEA + * Copyright (c) 2009, 2015 CEA, Christian W. Damus, and others * * * All rights reserved. This program and the accompanying materials @@ -9,6 +9,7 @@ * * Contributors: * Atos Origin - Initial API and implementation + * Christian W. Damus - bug 433206 * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.sequence.edit.policies; @@ -64,12 +65,12 @@ import org.eclipse.gmf.runtime.notation.View; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.osgi.util.NLS; import org.eclipse.papyrus.commands.wrappers.CommandProxyWithResult; -import org.eclipse.papyrus.uml.diagram.common.commands.DeferredCreateCommand; import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter; +import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil; +import org.eclipse.papyrus.uml.diagram.common.commands.DeferredCreateCommand; import org.eclipse.papyrus.uml.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy; import org.eclipse.papyrus.uml.diagram.common.helper.DurationConstraintHelper; import org.eclipse.papyrus.uml.diagram.common.helper.DurationObservationHelper; -import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil; import org.eclipse.papyrus.uml.diagram.sequence.command.CreateGateViewCommand; import org.eclipse.papyrus.uml.diagram.sequence.command.CreateLocatedConnectionViewCommand; import org.eclipse.papyrus.uml.diagram.sequence.command.RestoreDurationConstraintLinkCommand; @@ -229,11 +230,9 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo if (someCombinedFragment && someNonCombinedFragment) { // Can't Drop CombinedFragment and other nodes at the same time return UnexecutableCommand.INSTANCE; - } - else if (someNonCombinedFragment) { + } else if (someNonCombinedFragment) { return command; - } - else { + } else { return getMoveCombinedFragmentCommand((ChangeBoundsRequest) request); } } @@ -253,8 +252,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo if (editParts != null) { for (Object part : editParts) { CustomCombinedFragmentEditPart combinedFragmentEP = (CustomCombinedFragmentEditPart) part; - CombinedFragment combinedFragment = (CombinedFragment) ViewUtil. - resolveSemanticElement((View) ((IGraphicalEditPart) combinedFragmentEP).getModel()); + CombinedFragment combinedFragment = (CombinedFragment) ViewUtil.resolveSemanticElement((View) ((IGraphicalEditPart) combinedFragmentEP).getModel()); if (combinedFragmentEP.getParent() == newParentEP) { continue; // no change of the parent @@ -1212,6 +1210,11 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo finishLocation = SequenceUtil.findLocationOfEvent(hostLifeline, finishEvent); if (finishLocation == null) { possibleFinishLocations = SequenceUtil.findPossibleLocationsForEvent(hostLifeline, finishEvent); + + // Minimum shape (not just an horizontal line) + if (possibleFinishLocations.height <= 0) { + possibleFinishLocations.height = LifelineXYLayoutEditPolicy.EXECUTION_INIT_HEIGHT; + } } // find start and finish locations with correct y (start.y < finish.y) and proportions if (startLocation == null) { diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml index 31b8593c533..bc418e0f77f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml @@ -1860,4 +1860,12 @@ <!-- optionally, specify keybindings --> + + <extension + point="org.eclipse.papyrus.infra.gmfdiag.canonical.strategies"> + <semanticChildrenStrategy + editPart="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart" + class="org.eclipse.papyrus.uml.diagram.sequence.canonical.LifelineSemanticChildrenStrategy"> + </semanticChildrenStrategy> + </extension> </plugin> diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/UMLBaseEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/UMLBaseEditHelper.java index af5d84ab8ae..88ba04316c7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/UMLBaseEditHelper.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/src/org/eclipse/papyrus/uml/diagram/sequence/edit/helpers/UMLBaseEditHelper.java @@ -1,5 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2009 Atos Origin.
+ * Copyright (c) 2009, 2015 Atos Origin, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,31 +9,16 @@ *
* Contributors:
* Atos Origin - Initial API and implementation
+ * Christian W. Damus - bug 458685
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.edit.helpers;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.gmf.tooling.runtime.edit.helpers.GeneratedEditHelperBase;
-import org.eclipse.papyrus.uml.diagram.common.commands.UnapplyAllStereotypesCommand;
-import org.eclipse.uml2.uml.Element;
/**
* @generated
*/
public class UMLBaseEditHelper extends GeneratedEditHelperBase {
- @Override
- protected ICommand getDestroyElementCommand(DestroyElementRequest req) {
- EObject elementToDestroy = req.getElementToDestroy();
- if (elementToDestroy instanceof Element) {
- UnapplyAllStereotypesCommand command = new UnapplyAllStereotypesCommand(req.getEditingDomain(), req.getLabel(), (Element) elementToDestroy);
- if (!command.isEmpty()) {
- return command;
- }
- }
- return null;
- }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/.options b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/.options index 5d073b3c789..35607526f8d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/.options +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/.options @@ -1,7 +1,7 @@ -# Tracing options for the org.eclipse.papyrus.uml.diagram.statemachine plug-in
-
-# Common issues
-org.eclipse.papyrus.uml.diagram.statemachine/debug=false
-
-# Visual IDs
-org.eclipse.papyrus.uml.diagram.statemachine/debug/visualID=false
+# Tracing options for the org.eclipse.papyrus.uml.diagram.statemachine plug-in + +# Common issues +org.eclipse.papyrus.uml.diagram.statemachine/debug=false + +# Visual IDs +org.eclipse.papyrus.uml.diagram.statemachine/debug/visualID=false diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomRegionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomRegionItemSemanticEditPolicy.java deleted file mode 100644 index dde9d0a9088..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomRegionItemSemanticEditPolicy.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (c) 2014 CEA LIST. - * - * 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: - * CEA LIST - Initial API and implementation - */ -package org.eclipse.papyrus.uml.diagram.statemachine.custom.policies; - -import java.util.Iterator; - -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.emf.ecore.EAnnotation; -import org.eclipse.gef.commands.Command; -import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand; -import org.eclipse.gmf.runtime.diagram.core.commands.SetPropertyCommand; -import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand; -import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest; -import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest; -import org.eclipse.gmf.runtime.notation.Node; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.papyrus.uml.diagram.common.commands.SemanticAdapter; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.commands.CustomRegionDeleteCommand; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.commands.CustomRegionDestroyElementCommand; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.RegionCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.RegionItemSemanticEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry; - -public class CustomRegionItemSemanticEditPolicy extends RegionItemSemanticEditPolicy { - @Override - protected Command addDeleteViewCommand(Command mainCommand, DestroyRequest completedRequest) { - Command deleteViewCommand = getGEFWrapper(new CustomRegionDeleteCommand(getEditingDomain(), (View) getHost().getModel())); - return mainCommand == null ? deleteViewCommand : mainCommand.chain(deleteViewCommand); - } - - @Override - protected void addDestroyChildNodesCommand(ICompositeCommand cmd) { - View view = (View) getHost().getModel(); - for (Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) { - Node node = (Node) nit.next(); - switch (UMLVisualIDRegistry.getVisualID(node)) { - case RegionCompartmentEditPart.VISUAL_ID: - for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) { - Node cnode = (Node) cit.next(); - switch (UMLVisualIDRegistry.getVisualID(cnode)) { - } - } - break; - } - } - } - - @Override - protected Command getDestroyElementCommand(DestroyElementRequest req) { - View view = (View) getHost().getModel(); - CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null); - cmd.setTransactionNestingEnabled(false); - EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$ - if (annotation == null) { - // there are indirectly referenced children, need extra commands: - // false - addDestroyChildNodesCommand(cmd); - addDestroyShortcutsCommand(cmd, view); - // delete host element - cmd.add(new CustomRegionDestroyElementCommand(req)); - } else { - cmd.add(new CustomRegionDeleteCommand(getEditingDomain(), view)); - } - View compartmentView = (View) view.eContainer(); - // get and adaptable for it, to pass on to commands - IAdaptable adaptableForCompartmentView = new SemanticAdapter(null, compartmentView); - if (compartmentView.getChildren().size() == 1) { - SetPropertyCommand showCompartment = new SetPropertyCommand(getEditingDomain(), adaptableForCompartmentView, "notation.View.visible", "Visibility", false); - cmd.compose(showCompartment); - } - return getGEFWrapper(cmd.reduce()); - } -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomStateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomStateItemSemanticEditPolicy.java deleted file mode 100644 index 82c0bdb37b7..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/custom-src/org/eclipse/papyrus/uml/diagram/statemachine/custom/policies/CustomStateItemSemanticEditPolicy.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) 2014 CEA LIST. - * - * 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: - * CEA LIST - Initial API and implementation - */ -package org.eclipse.papyrus.uml.diagram.statemachine.custom.policies; - -import org.eclipse.gef.commands.Command; -import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.StateItemSemanticEditPolicy; - - -public class CustomStateItemSemanticEditPolicy extends StateItemSemanticEditPolicy { - - /** - * Returns command to reorient EClass based link. New link target or source - * should be the domain model element associated with this node. - * - * @generated - */ - @Override - protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) { - switch (getVisualID(req)) { - } - return super.getReorientRelationshipCommand(req); - } -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.gmfgen index 43e20682c30..4a013d5700d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.gmfgen +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/model/stateMachineDiagram.gmfgen @@ -55,6 +55,7 @@ <elementType
xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Package_1000"
+ definedExternally="true"
editHelperClassName="PackageEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -1989,6 +1990,7 @@ xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Transition_7000"
displayName="Transition"
+ definedExternally="true"
editHelperClassName="TransitionEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -2092,6 +2094,7 @@ xsi:type="gmfgen:MetamodelType"
uniqueIdentifier="org.eclipse.papyrus.uml.diagram.statemachine.Generalization_19000"
displayName="Generalization"
+ definedExternally="true"
editHelperClassName="GeneralizationEditHelper"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
@@ -2146,7 +2149,8 @@ <diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType
- xsi:type="gmfgen:SpecializationType"/>
+ xsi:type="gmfgen:SpecializationType"
+ definedExternally="true"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
@@ -2165,7 +2169,8 @@ <diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType
- xsi:type="gmfgen:SpecializationType"/>
+ xsi:type="gmfgen:SpecializationType"
+ definedExternally="true"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
@@ -2184,7 +2189,8 @@ <diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
<elementType
- xsi:type="gmfgen:SpecializationType"/>
+ xsi:type="gmfgen:SpecializationType"
+ definedExternally="true"/>
<viewmap
xsi:type="gmfgen:FigureViewmap"
figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.statemachine.custom.figures.CustomContextLinkFigure"/>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/custom/expressions/UMLOCLFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/custom/expressions/UMLOCLFactory.java index 212f76d5069..f3a6802491a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/custom/expressions/UMLOCLFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/custom/expressions/UMLOCLFactory.java @@ -48,7 +48,8 @@ public class UMLOCLFactory { */
protected UMLOCLFactory() {
this.expressions = new UMLAbstractExpression[4];
- this.expressionBodies = new String[] { "(kind = TransitionKind::internal) implies (source.oclIsKindOf (State) and source = target)", //$NON-NLS-1$
+ this.expressionBodies = new String[] {
+ "(kind = TransitionKind::internal) implies (source.oclIsKindOf (State) and source = target)", //$NON-NLS-1$
"if self.owner.oclIsKindOf(State)\r\nthen self.owner.oclAsType(State).exit->includes(self)\r\nelse false endif", //$NON-NLS-1$
"if self.owner.oclIsKindOf(State)\r\nthen self.owner.oclAsType(State).entry->includes(self)\r\nelse false endif", //$NON-NLS-1$
"if self.owner.oclIsKindOf(State)\r\nthen self.owner.oclAsType(State).doActivity->includes(self)\r\nelse false endif", //$NON-NLS-1$
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/CommentBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/CommentBodyEditPart.java index 6d004561229..e77106044b9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/CommentBodyEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/CommentBodyEditPart.java @@ -195,8 +195,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -308,15 +307,14 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -445,8 +443,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -491,8 +488,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -529,8 +525,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -549,17 +544,15 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -569,9 +562,8 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -582,14 +574,12 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -683,7 +673,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -707,9 +697,9 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -723,8 +713,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -795,18 +784,15 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceEditPart.java index 76b8eb56407..7295939cfbf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceEditPart.java @@ -116,8 +116,7 @@ public class ConnectionPointReferenceEditPart extends AbstractBorderEditPart { mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
@@ -190,11 +189,11 @@ public class ConnectionPointReferenceEditPart extends AbstractBorderEditPart { BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
locator.setBorderItemOffset(new Dimension(-20, -20));
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof ConnectionPointReferenceNameEditPart) {
+ } else
+ if (borderItemEditPart instanceof ConnectionPointReferenceNameEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceNameEditPart.java index 9e560768473..6b3d9fc0698 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceNameEditPart.java @@ -124,6 +124,7 @@ public class ConnectionPointReferenceNameEditPart extends PapyrusLabelEditPart i * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -229,8 +230,7 @@ public class ConnectionPointReferenceNameEditPart extends PapyrusLabelEditPart i /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -341,15 +341,14 @@ public class ConnectionPointReferenceNameEditPart extends PapyrusLabelEditPart i final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -478,8 +477,7 @@ public class ConnectionPointReferenceNameEditPart extends PapyrusLabelEditPart i IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -524,8 +522,7 @@ public class ConnectionPointReferenceNameEditPart extends PapyrusLabelEditPart i RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -562,8 +559,7 @@ public class ConnectionPointReferenceNameEditPart extends PapyrusLabelEditPart i if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -582,17 +578,15 @@ public class ConnectionPointReferenceNameEditPart extends PapyrusLabelEditPart i * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -602,9 +596,8 @@ public class ConnectionPointReferenceNameEditPart extends PapyrusLabelEditPart i * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -615,14 +608,12 @@ public class ConnectionPointReferenceNameEditPart extends PapyrusLabelEditPart i */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -716,7 +707,7 @@ public class ConnectionPointReferenceNameEditPart extends PapyrusLabelEditPart i */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -740,9 +731,9 @@ public class ConnectionPointReferenceNameEditPart extends PapyrusLabelEditPart i if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -756,8 +747,7 @@ public class ConnectionPointReferenceNameEditPart extends PapyrusLabelEditPart i String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -809,18 +799,15 @@ public class ConnectionPointReferenceNameEditPart extends PapyrusLabelEditPart i refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceStereotypeEditPart.java index cdc736b0ca6..b2bb3660af3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConnectionPointReferenceStereotypeEditPart.java @@ -126,6 +126,7 @@ public class ConnectionPointReferenceStereotypeEditPart extends AbstractLabelEdi * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -232,8 +233,7 @@ public class ConnectionPointReferenceStereotypeEditPart extends AbstractLabelEdi /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -344,15 +344,14 @@ public class ConnectionPointReferenceStereotypeEditPart extends AbstractLabelEdi final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -481,8 +480,7 @@ public class ConnectionPointReferenceStereotypeEditPart extends AbstractLabelEdi IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -527,8 +525,7 @@ public class ConnectionPointReferenceStereotypeEditPart extends AbstractLabelEdi RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -565,8 +562,7 @@ public class ConnectionPointReferenceStereotypeEditPart extends AbstractLabelEdi if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -585,17 +581,15 @@ public class ConnectionPointReferenceStereotypeEditPart extends AbstractLabelEdi * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -605,9 +599,8 @@ public class ConnectionPointReferenceStereotypeEditPart extends AbstractLabelEdi * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -618,14 +611,12 @@ public class ConnectionPointReferenceStereotypeEditPart extends AbstractLabelEdi */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -719,7 +710,7 @@ public class ConnectionPointReferenceStereotypeEditPart extends AbstractLabelEdi */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -743,9 +734,9 @@ public class ConnectionPointReferenceStereotypeEditPart extends AbstractLabelEdi if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -759,8 +750,7 @@ public class ConnectionPointReferenceStereotypeEditPart extends AbstractLabelEdi String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -812,18 +802,15 @@ public class ConnectionPointReferenceStereotypeEditPart extends AbstractLabelEdi refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintBodyEditPart.java index 54575f92988..6f565394ac9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintBodyEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintBodyEditPart.java @@ -195,8 +195,7 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -308,15 +307,14 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -445,8 +443,7 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -491,8 +488,7 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -529,8 +525,7 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -549,17 +544,15 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -569,9 +562,8 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -582,14 +574,12 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -683,7 +673,7 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -707,9 +697,9 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -723,8 +713,7 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -795,18 +784,15 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintNameLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintNameLabelEditPart.java index 6c12250be06..7530a47a1c4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintNameLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ConstraintNameLabelEditPart.java @@ -199,8 +199,7 @@ public class ConstraintNameLabelEditPart extends PapyrusCompartmentEditPart impl /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -322,15 +321,14 @@ public class ConstraintNameLabelEditPart extends PapyrusCompartmentEditPart impl final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -459,8 +457,7 @@ public class ConstraintNameLabelEditPart extends PapyrusCompartmentEditPart impl IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -505,8 +502,7 @@ public class ConstraintNameLabelEditPart extends PapyrusCompartmentEditPart impl RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -543,8 +539,7 @@ public class ConstraintNameLabelEditPart extends PapyrusCompartmentEditPart impl if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -563,17 +558,15 @@ public class ConstraintNameLabelEditPart extends PapyrusCompartmentEditPart impl * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -583,9 +576,8 @@ public class ConstraintNameLabelEditPart extends PapyrusCompartmentEditPart impl * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -596,14 +588,12 @@ public class ConstraintNameLabelEditPart extends PapyrusCompartmentEditPart impl */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -697,7 +687,7 @@ public class ConstraintNameLabelEditPart extends PapyrusCompartmentEditPart impl */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -721,9 +711,9 @@ public class ConstraintNameLabelEditPart extends PapyrusCompartmentEditPart impl if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -737,8 +727,7 @@ public class ConstraintNameLabelEditPart extends PapyrusCompartmentEditPart impl String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -809,18 +798,15 @@ public class ConstraintNameLabelEditPart extends PapyrusCompartmentEditPart impl refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ContextLinkAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ContextLinkAppliedStereotypeEditPart.java index 6e13c19f0a2..ce065bf0017 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ContextLinkAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ContextLinkAppliedStereotypeEditPart.java @@ -123,6 +123,7 @@ public class ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart i * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -212,8 +213,7 @@ public class ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart i /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -325,15 +325,14 @@ public class ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart i final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -462,8 +461,7 @@ public class ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart i IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -508,8 +506,7 @@ public class ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart i RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -559,17 +556,15 @@ public class ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart i * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -579,9 +574,8 @@ public class ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart i * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -592,14 +586,12 @@ public class ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart i */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -685,7 +677,7 @@ public class ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart i */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -709,9 +701,9 @@ public class ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart i if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -725,8 +717,7 @@ public class ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart i String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -778,18 +769,15 @@ public class ContextLinkAppliedStereotypeEditPart extends PapyrusLabelEditPart i refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/DoActivityStateBehaviorStateEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/DoActivityStateBehaviorStateEditPart.java index b6bc9ec0fb8..f3eead5a992 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/DoActivityStateBehaviorStateEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/DoActivityStateBehaviorStateEditPart.java @@ -218,8 +218,7 @@ public class DoActivityStateBehaviorStateEditPart extends CompartmentEditPart im /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -331,15 +330,14 @@ public class DoActivityStateBehaviorStateEditPart extends CompartmentEditPart im final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -468,8 +466,7 @@ public class DoActivityStateBehaviorStateEditPart extends CompartmentEditPart im IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -514,8 +511,7 @@ public class DoActivityStateBehaviorStateEditPart extends CompartmentEditPart im RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -552,8 +548,7 @@ public class DoActivityStateBehaviorStateEditPart extends CompartmentEditPart im if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -572,17 +567,15 @@ public class DoActivityStateBehaviorStateEditPart extends CompartmentEditPart im * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -592,9 +585,8 @@ public class DoActivityStateBehaviorStateEditPart extends CompartmentEditPart im * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -605,14 +597,12 @@ public class DoActivityStateBehaviorStateEditPart extends CompartmentEditPart im */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -706,7 +696,7 @@ public class DoActivityStateBehaviorStateEditPart extends CompartmentEditPart im */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -730,9 +720,9 @@ public class DoActivityStateBehaviorStateEditPart extends CompartmentEditPart im if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -746,8 +736,7 @@ public class DoActivityStateBehaviorStateEditPart extends CompartmentEditPart im String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -817,18 +806,15 @@ public class DoActivityStateBehaviorStateEditPart extends CompartmentEditPart im refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/EntryStateBehaviorEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/EntryStateBehaviorEditPart.java index 0026e4f3adf..16ff34038cf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/EntryStateBehaviorEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/EntryStateBehaviorEditPart.java @@ -218,8 +218,7 @@ public class EntryStateBehaviorEditPart extends CompartmentEditPart implements I /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -331,15 +330,14 @@ public class EntryStateBehaviorEditPart extends CompartmentEditPart implements I final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -468,8 +466,7 @@ public class EntryStateBehaviorEditPart extends CompartmentEditPart implements I IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -514,8 +511,7 @@ public class EntryStateBehaviorEditPart extends CompartmentEditPart implements I RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -552,8 +548,7 @@ public class EntryStateBehaviorEditPart extends CompartmentEditPart implements I if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -572,17 +567,15 @@ public class EntryStateBehaviorEditPart extends CompartmentEditPart implements I * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -592,9 +585,8 @@ public class EntryStateBehaviorEditPart extends CompartmentEditPart implements I * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -605,14 +597,12 @@ public class EntryStateBehaviorEditPart extends CompartmentEditPart implements I */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -706,7 +696,7 @@ public class EntryStateBehaviorEditPart extends CompartmentEditPart implements I */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -730,9 +720,9 @@ public class EntryStateBehaviorEditPart extends CompartmentEditPart implements I if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -746,8 +736,7 @@ public class EntryStateBehaviorEditPart extends CompartmentEditPart implements I String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -817,18 +806,15 @@ public class EntryStateBehaviorEditPart extends CompartmentEditPart implements I refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ExitStateBehaviorEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ExitStateBehaviorEditPart.java index f46f6bf11ad..93ccecfc068 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ExitStateBehaviorEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/ExitStateBehaviorEditPart.java @@ -218,8 +218,7 @@ public class ExitStateBehaviorEditPart extends CompartmentEditPart implements IT /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -331,15 +330,14 @@ public class ExitStateBehaviorEditPart extends CompartmentEditPart implements IT final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -468,8 +466,7 @@ public class ExitStateBehaviorEditPart extends CompartmentEditPart implements IT IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -514,8 +511,7 @@ public class ExitStateBehaviorEditPart extends CompartmentEditPart implements IT RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -552,8 +548,7 @@ public class ExitStateBehaviorEditPart extends CompartmentEditPart implements IT if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -572,17 +567,15 @@ public class ExitStateBehaviorEditPart extends CompartmentEditPart implements IT * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -592,9 +585,8 @@ public class ExitStateBehaviorEditPart extends CompartmentEditPart implements IT * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -605,14 +597,12 @@ public class ExitStateBehaviorEditPart extends CompartmentEditPart implements IT */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -706,7 +696,7 @@ public class ExitStateBehaviorEditPart extends CompartmentEditPart implements IT */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -730,9 +720,9 @@ public class ExitStateBehaviorEditPart extends CompartmentEditPart implements IT if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -746,8 +736,7 @@ public class ExitStateBehaviorEditPart extends CompartmentEditPart implements IT String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -817,18 +806,15 @@ public class ExitStateBehaviorEditPart extends CompartmentEditPart implements IT refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateEditPart.java index b105a2f7af0..172d6c9ede8 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateEditPart.java @@ -112,8 +112,7 @@ public class FinalStateEditPart extends RoundedCompartmentEditPart { mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
@@ -186,11 +185,11 @@ public class FinalStateEditPart extends RoundedCompartmentEditPart { if (borderItemEditPart instanceof FinalStateFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof FinalStateStereotypeEditPart) {
+ } else
+ if (borderItemEditPart instanceof FinalStateStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateFloatingLabelEditPart.java index c6e03e3652b..ff87d050b0d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateFloatingLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateFloatingLabelEditPart.java @@ -86,8 +86,7 @@ import org.eclipse.uml2.uml.Feature; */
public class FinalStateFloatingLabelEditPart extends
FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+ implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -235,8 +234,7 @@ public class FinalStateFloatingLabelEditPart extends /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -347,15 +345,14 @@ public class FinalStateFloatingLabelEditPart extends final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -484,8 +481,7 @@ public class FinalStateFloatingLabelEditPart extends IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -530,8 +526,7 @@ public class FinalStateFloatingLabelEditPart extends RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -568,8 +563,7 @@ public class FinalStateFloatingLabelEditPart extends if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -588,17 +582,15 @@ public class FinalStateFloatingLabelEditPart extends * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -608,9 +600,8 @@ public class FinalStateFloatingLabelEditPart extends * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -621,14 +612,12 @@ public class FinalStateFloatingLabelEditPart extends */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -722,7 +711,7 @@ public class FinalStateFloatingLabelEditPart extends */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -746,9 +735,9 @@ public class FinalStateFloatingLabelEditPart extends if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -762,8 +751,7 @@ public class FinalStateFloatingLabelEditPart extends String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -816,18 +804,15 @@ public class FinalStateFloatingLabelEditPart extends refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateStereotypeEditPart.java index be24cd34f23..68870b47a74 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/FinalStateStereotypeEditPart.java @@ -126,6 +126,7 @@ public class FinalStateStereotypeEditPart extends AbstractLabelEditPart implemen * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -232,8 +233,7 @@ public class FinalStateStereotypeEditPart extends AbstractLabelEditPart implemen /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -344,15 +344,14 @@ public class FinalStateStereotypeEditPart extends AbstractLabelEditPart implemen final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -481,8 +480,7 @@ public class FinalStateStereotypeEditPart extends AbstractLabelEditPart implemen IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -527,8 +525,7 @@ public class FinalStateStereotypeEditPart extends AbstractLabelEditPart implemen RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -565,8 +562,7 @@ public class FinalStateStereotypeEditPart extends AbstractLabelEditPart implemen if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -585,17 +581,15 @@ public class FinalStateStereotypeEditPart extends AbstractLabelEditPart implemen * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -605,9 +599,8 @@ public class FinalStateStereotypeEditPart extends AbstractLabelEditPart implemen * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -618,14 +611,12 @@ public class FinalStateStereotypeEditPart extends AbstractLabelEditPart implemen */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -719,7 +710,7 @@ public class FinalStateStereotypeEditPart extends AbstractLabelEditPart implemen */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -743,9 +734,9 @@ public class FinalStateStereotypeEditPart extends AbstractLabelEditPart implemen if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -759,8 +750,7 @@ public class FinalStateStereotypeEditPart extends AbstractLabelEditPart implemen String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -812,18 +802,15 @@ public class FinalStateStereotypeEditPart extends AbstractLabelEditPart implemen refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/GeneralizationStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/GeneralizationStereotypeEditPart.java index 6c37a1a1f3b..4c7265958a3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/GeneralizationStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/GeneralizationStereotypeEditPart.java @@ -122,6 +122,7 @@ public class GeneralizationStereotypeEditPart extends PapyrusLabelEditPart imple * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -210,8 +211,7 @@ public class GeneralizationStereotypeEditPart extends PapyrusLabelEditPart imple /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -323,15 +323,14 @@ public class GeneralizationStereotypeEditPart extends PapyrusLabelEditPart imple final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -460,8 +459,7 @@ public class GeneralizationStereotypeEditPart extends PapyrusLabelEditPart imple IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -506,8 +504,7 @@ public class GeneralizationStereotypeEditPart extends PapyrusLabelEditPart imple RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -557,17 +554,15 @@ public class GeneralizationStereotypeEditPart extends PapyrusLabelEditPart imple * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -577,9 +572,8 @@ public class GeneralizationStereotypeEditPart extends PapyrusLabelEditPart imple * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -590,14 +584,12 @@ public class GeneralizationStereotypeEditPart extends PapyrusLabelEditPart imple */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -683,7 +675,7 @@ public class GeneralizationStereotypeEditPart extends PapyrusLabelEditPart imple */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -707,9 +699,9 @@ public class GeneralizationStereotypeEditPart extends PapyrusLabelEditPart imple if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -723,8 +715,7 @@ public class GeneralizationStereotypeEditPart extends PapyrusLabelEditPart imple String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -776,18 +767,15 @@ public class GeneralizationStereotypeEditPart extends PapyrusLabelEditPart imple refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/InternalTransitionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/InternalTransitionEditPart.java index ab56fcb88e7..871f418142a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/InternalTransitionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/InternalTransitionEditPart.java @@ -218,8 +218,7 @@ public class InternalTransitionEditPart extends CompartmentEditPart implements I /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -331,15 +330,14 @@ public class InternalTransitionEditPart extends CompartmentEditPart implements I final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -468,8 +466,7 @@ public class InternalTransitionEditPart extends CompartmentEditPart implements I IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -514,8 +511,7 @@ public class InternalTransitionEditPart extends CompartmentEditPart implements I RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -552,8 +548,7 @@ public class InternalTransitionEditPart extends CompartmentEditPart implements I if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -572,17 +567,15 @@ public class InternalTransitionEditPart extends CompartmentEditPart implements I * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -592,9 +585,8 @@ public class InternalTransitionEditPart extends CompartmentEditPart implements I * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -605,14 +597,12 @@ public class InternalTransitionEditPart extends CompartmentEditPart implements I */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -698,7 +688,7 @@ public class InternalTransitionEditPart extends CompartmentEditPart implements I */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -722,9 +712,9 @@ public class InternalTransitionEditPart extends CompartmentEditPart implements I if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -738,8 +728,7 @@ public class InternalTransitionEditPart extends CompartmentEditPart implements I String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -809,18 +798,15 @@ public class InternalTransitionEditPart extends CompartmentEditPart implements I refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PackageEditPart.java index d361468a1c1..c9ce4fd1234 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PackageEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PackageEditPart.java @@ -1,68 +1,68 @@ -/** - * Copyright (c) 2014 CEA LIST. - * - * 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: - * CEA LIST - Initial API and implementation - */ -package org.eclipse.papyrus.uml.diagram.statemachine.edit.parts; - -import org.eclipse.gef.EditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusDiagramEditPart; -import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy; -import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomPackageCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomPackageXYLayoutEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy; - -/** - * @generated - */ -public class PackageEditPart extends PapyrusDiagramEditPart { - - /** - * @generated - */ - public final static String MODEL_ID = "PapyrusUMLStateMachineDiagram"; //$NON-NLS-1$ - - /** - * @generated - */ - public static final int VISUAL_ID = 1000; - - /** - * @generated - */ - public PackageEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - super.createDefaultEditPolicies(); - - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy()); - installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy()); - - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy()); - //in Papyrus diagrams are not strongly synchronised - //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.PackageCanonicalEditPolicy()); - - installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$ - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomPackageCreationEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, new CustomPackageXYLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomStateMachineDiagramDragDropEditPolicy()); - // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE); - } -} +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.statemachine.edit.parts;
+
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusDiagramEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomPackageCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomPackageXYLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy;
+
+/**
+ * @generated
+ */
+public class PackageEditPart extends PapyrusDiagramEditPart {
+
+ /**
+ * @generated
+ */
+ public final static String MODEL_ID = "PapyrusUMLStateMachineDiagram"; //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 1000;
+
+ /**
+ * @generated
+ */
+ public PackageEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ //in Papyrus diagrams are not strongly synchronised
+ //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.PackageCanonicalEditPolicy());
+
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomPackageCreationEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new CustomPackageXYLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomStateMachineDiagramDragDropEditPolicy());
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceEditPart.java index bf9fd17b535..02e358d319a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceEditPart.java @@ -115,8 +115,7 @@ public class PseudostateChoiceEditPart extends RoundedCompartmentEditPart { mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
@@ -189,11 +188,11 @@ public class PseudostateChoiceEditPart extends RoundedCompartmentEditPart { if (borderItemEditPart instanceof PseudostateChoiceFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof PseudostateChoiceStereotypeEditPart) {
+ } else
+ if (borderItemEditPart instanceof PseudostateChoiceStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceFloatingLabelEditPart.java index b554076ce4b..eff64838208 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceFloatingLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceFloatingLabelEditPart.java @@ -86,8 +86,7 @@ import org.eclipse.uml2.uml.Feature; */
public class PseudostateChoiceFloatingLabelEditPart extends
FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+ implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -235,8 +234,7 @@ public class PseudostateChoiceFloatingLabelEditPart extends /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -347,15 +345,14 @@ public class PseudostateChoiceFloatingLabelEditPart extends final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -484,8 +481,7 @@ public class PseudostateChoiceFloatingLabelEditPart extends IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -530,8 +526,7 @@ public class PseudostateChoiceFloatingLabelEditPart extends RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -568,8 +563,7 @@ public class PseudostateChoiceFloatingLabelEditPart extends if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -588,17 +582,15 @@ public class PseudostateChoiceFloatingLabelEditPart extends * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -608,9 +600,8 @@ public class PseudostateChoiceFloatingLabelEditPart extends * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -621,14 +612,12 @@ public class PseudostateChoiceFloatingLabelEditPart extends */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -722,7 +711,7 @@ public class PseudostateChoiceFloatingLabelEditPart extends */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -746,9 +735,9 @@ public class PseudostateChoiceFloatingLabelEditPart extends if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -762,8 +751,7 @@ public class PseudostateChoiceFloatingLabelEditPart extends String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -816,18 +804,15 @@ public class PseudostateChoiceFloatingLabelEditPart extends refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceStereotypeEditPart.java index 62cf44bf198..deaa3d840b6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateChoiceStereotypeEditPart.java @@ -126,6 +126,7 @@ public class PseudostateChoiceStereotypeEditPart extends AbstractLabelEditPart i * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -232,8 +233,7 @@ public class PseudostateChoiceStereotypeEditPart extends AbstractLabelEditPart i /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -344,15 +344,14 @@ public class PseudostateChoiceStereotypeEditPart extends AbstractLabelEditPart i final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -481,8 +480,7 @@ public class PseudostateChoiceStereotypeEditPart extends AbstractLabelEditPart i IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -527,8 +525,7 @@ public class PseudostateChoiceStereotypeEditPart extends AbstractLabelEditPart i RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -565,8 +562,7 @@ public class PseudostateChoiceStereotypeEditPart extends AbstractLabelEditPart i if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -585,17 +581,15 @@ public class PseudostateChoiceStereotypeEditPart extends AbstractLabelEditPart i * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -605,9 +599,8 @@ public class PseudostateChoiceStereotypeEditPart extends AbstractLabelEditPart i * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -618,14 +611,12 @@ public class PseudostateChoiceStereotypeEditPart extends AbstractLabelEditPart i */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -719,7 +710,7 @@ public class PseudostateChoiceStereotypeEditPart extends AbstractLabelEditPart i */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -743,9 +734,9 @@ public class PseudostateChoiceStereotypeEditPart extends AbstractLabelEditPart i if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -759,8 +750,7 @@ public class PseudostateChoiceStereotypeEditPart extends AbstractLabelEditPart i String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -812,18 +802,15 @@ public class PseudostateChoiceStereotypeEditPart extends AbstractLabelEditPart i refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryEditPart.java index 7e39e51dcb8..f87c0f1a99b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryEditPart.java @@ -115,8 +115,7 @@ public class PseudostateDeepHistoryEditPart extends RoundedCompartmentEditPart { mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
@@ -189,11 +188,11 @@ public class PseudostateDeepHistoryEditPart extends RoundedCompartmentEditPart { if (borderItemEditPart instanceof PseudostateDeepHistoryFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof PseudostateDeepHistoryStereotypeEditPart) {
+ } else
+ if (borderItemEditPart instanceof PseudostateDeepHistoryStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryFloatingLabelEditPart.java index 42f59fba1b5..a52fe79ceb0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryFloatingLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryFloatingLabelEditPart.java @@ -86,8 +86,7 @@ import org.eclipse.uml2.uml.Feature; */
public class PseudostateDeepHistoryFloatingLabelEditPart extends
FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+ implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -235,8 +234,7 @@ public class PseudostateDeepHistoryFloatingLabelEditPart extends /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -347,15 +345,14 @@ public class PseudostateDeepHistoryFloatingLabelEditPart extends final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -484,8 +481,7 @@ public class PseudostateDeepHistoryFloatingLabelEditPart extends IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -530,8 +526,7 @@ public class PseudostateDeepHistoryFloatingLabelEditPart extends RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -568,8 +563,7 @@ public class PseudostateDeepHistoryFloatingLabelEditPart extends if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -588,17 +582,15 @@ public class PseudostateDeepHistoryFloatingLabelEditPart extends * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -608,9 +600,8 @@ public class PseudostateDeepHistoryFloatingLabelEditPart extends * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -621,14 +612,12 @@ public class PseudostateDeepHistoryFloatingLabelEditPart extends */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -722,7 +711,7 @@ public class PseudostateDeepHistoryFloatingLabelEditPart extends */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -746,9 +735,9 @@ public class PseudostateDeepHistoryFloatingLabelEditPart extends if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -762,8 +751,7 @@ public class PseudostateDeepHistoryFloatingLabelEditPart extends String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -816,18 +804,15 @@ public class PseudostateDeepHistoryFloatingLabelEditPart extends refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryStereotypeEditPart.java index 65414778600..94b419cbd44 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateDeepHistoryStereotypeEditPart.java @@ -126,6 +126,7 @@ public class PseudostateDeepHistoryStereotypeEditPart extends AbstractLabelEditP * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -232,8 +233,7 @@ public class PseudostateDeepHistoryStereotypeEditPart extends AbstractLabelEditP /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -344,15 +344,14 @@ public class PseudostateDeepHistoryStereotypeEditPart extends AbstractLabelEditP final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -481,8 +480,7 @@ public class PseudostateDeepHistoryStereotypeEditPart extends AbstractLabelEditP IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -527,8 +525,7 @@ public class PseudostateDeepHistoryStereotypeEditPart extends AbstractLabelEditP RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -565,8 +562,7 @@ public class PseudostateDeepHistoryStereotypeEditPart extends AbstractLabelEditP if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -585,17 +581,15 @@ public class PseudostateDeepHistoryStereotypeEditPart extends AbstractLabelEditP * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -605,9 +599,8 @@ public class PseudostateDeepHistoryStereotypeEditPart extends AbstractLabelEditP * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -618,14 +611,12 @@ public class PseudostateDeepHistoryStereotypeEditPart extends AbstractLabelEditP */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -719,7 +710,7 @@ public class PseudostateDeepHistoryStereotypeEditPart extends AbstractLabelEditP */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -743,9 +734,9 @@ public class PseudostateDeepHistoryStereotypeEditPart extends AbstractLabelEditP if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -759,8 +750,7 @@ public class PseudostateDeepHistoryStereotypeEditPart extends AbstractLabelEditP String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -812,18 +802,15 @@ public class PseudostateDeepHistoryStereotypeEditPart extends AbstractLabelEditP refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointEditPart.java index a78401e54b4..5374fc558fa 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointEditPart.java @@ -116,8 +116,7 @@ public class PseudostateEntryPointEditPart extends RoundedBorderNamedElementEdit mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
@@ -189,11 +188,11 @@ public class PseudostateEntryPointEditPart extends RoundedBorderNamedElementEdit if (borderItemEditPart instanceof PseudostateEntryPointFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof PseudostateEntryPointStereotypeEditPart) {
+ } else
+ if (borderItemEditPart instanceof PseudostateEntryPointStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointFloatingLabelEditPart.java index 7b4819e966d..20d41e20a80 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointFloatingLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointFloatingLabelEditPart.java @@ -86,8 +86,7 @@ import org.eclipse.uml2.uml.Feature; */
public class PseudostateEntryPointFloatingLabelEditPart extends
FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+ implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -235,8 +234,7 @@ public class PseudostateEntryPointFloatingLabelEditPart extends /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -347,15 +345,14 @@ public class PseudostateEntryPointFloatingLabelEditPart extends final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -484,8 +481,7 @@ public class PseudostateEntryPointFloatingLabelEditPart extends IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -530,8 +526,7 @@ public class PseudostateEntryPointFloatingLabelEditPart extends RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -568,8 +563,7 @@ public class PseudostateEntryPointFloatingLabelEditPart extends if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -588,17 +582,15 @@ public class PseudostateEntryPointFloatingLabelEditPart extends * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -608,9 +600,8 @@ public class PseudostateEntryPointFloatingLabelEditPart extends * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -621,14 +612,12 @@ public class PseudostateEntryPointFloatingLabelEditPart extends */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -722,7 +711,7 @@ public class PseudostateEntryPointFloatingLabelEditPart extends */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -746,9 +735,9 @@ public class PseudostateEntryPointFloatingLabelEditPart extends if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -762,8 +751,7 @@ public class PseudostateEntryPointFloatingLabelEditPart extends String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -816,18 +804,15 @@ public class PseudostateEntryPointFloatingLabelEditPart extends refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointStereotypeEditPart.java index f8434f56123..488f9ac3c72 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateEntryPointStereotypeEditPart.java @@ -126,6 +126,7 @@ public class PseudostateEntryPointStereotypeEditPart extends AbstractLabelEditPa * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -232,8 +233,7 @@ public class PseudostateEntryPointStereotypeEditPart extends AbstractLabelEditPa /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -344,15 +344,14 @@ public class PseudostateEntryPointStereotypeEditPart extends AbstractLabelEditPa final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -481,8 +480,7 @@ public class PseudostateEntryPointStereotypeEditPart extends AbstractLabelEditPa IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -527,8 +525,7 @@ public class PseudostateEntryPointStereotypeEditPart extends AbstractLabelEditPa RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -565,8 +562,7 @@ public class PseudostateEntryPointStereotypeEditPart extends AbstractLabelEditPa if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -585,17 +581,15 @@ public class PseudostateEntryPointStereotypeEditPart extends AbstractLabelEditPa * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -605,9 +599,8 @@ public class PseudostateEntryPointStereotypeEditPart extends AbstractLabelEditPa * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -618,14 +611,12 @@ public class PseudostateEntryPointStereotypeEditPart extends AbstractLabelEditPa */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -719,7 +710,7 @@ public class PseudostateEntryPointStereotypeEditPart extends AbstractLabelEditPa */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -743,9 +734,9 @@ public class PseudostateEntryPointStereotypeEditPart extends AbstractLabelEditPa if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -759,8 +750,7 @@ public class PseudostateEntryPointStereotypeEditPart extends AbstractLabelEditPa String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -812,18 +802,15 @@ public class PseudostateEntryPointStereotypeEditPart extends AbstractLabelEditPa refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointEditPart.java index 90911e192ef..6feb0dc7698 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointEditPart.java @@ -118,8 +118,7 @@ public class PseudostateExitPointEditPart extends RoundedBorderNamedElementEditP mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
@@ -192,11 +191,11 @@ public class PseudostateExitPointEditPart extends RoundedBorderNamedElementEditP BorderItemLocator locator = new BorderItemLocator(getMainFigure(), PositionConstants.SOUTH);
locator.setBorderItemOffset(new Dimension(-20, -20));
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof PseudostateExitPointFloatingLabelEditPart) {
+ } else
+ if (borderItemEditPart instanceof PseudostateExitPointFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointFloatingLabelEditPart.java index e8c07ef62ef..1035dede6f0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointFloatingLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointFloatingLabelEditPart.java @@ -86,8 +86,7 @@ import org.eclipse.uml2.uml.Feature; */
public class PseudostateExitPointFloatingLabelEditPart extends
FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+ implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -235,8 +234,7 @@ public class PseudostateExitPointFloatingLabelEditPart extends /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -347,15 +345,14 @@ public class PseudostateExitPointFloatingLabelEditPart extends final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -484,8 +481,7 @@ public class PseudostateExitPointFloatingLabelEditPart extends IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -530,8 +526,7 @@ public class PseudostateExitPointFloatingLabelEditPart extends RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -568,8 +563,7 @@ public class PseudostateExitPointFloatingLabelEditPart extends if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -588,17 +582,15 @@ public class PseudostateExitPointFloatingLabelEditPart extends * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -608,9 +600,8 @@ public class PseudostateExitPointFloatingLabelEditPart extends * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -621,14 +612,12 @@ public class PseudostateExitPointFloatingLabelEditPart extends */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -722,7 +711,7 @@ public class PseudostateExitPointFloatingLabelEditPart extends */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -746,9 +735,9 @@ public class PseudostateExitPointFloatingLabelEditPart extends if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -762,8 +751,7 @@ public class PseudostateExitPointFloatingLabelEditPart extends String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -816,18 +804,15 @@ public class PseudostateExitPointFloatingLabelEditPart extends refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointStereotypeEditPart.java index cbd59dfae3a..627d220fc87 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateExitPointStereotypeEditPart.java @@ -126,6 +126,7 @@ public class PseudostateExitPointStereotypeEditPart extends AbstractLabelEditPar * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -232,8 +233,7 @@ public class PseudostateExitPointStereotypeEditPart extends AbstractLabelEditPar /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -344,15 +344,14 @@ public class PseudostateExitPointStereotypeEditPart extends AbstractLabelEditPar final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -481,8 +480,7 @@ public class PseudostateExitPointStereotypeEditPart extends AbstractLabelEditPar IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -527,8 +525,7 @@ public class PseudostateExitPointStereotypeEditPart extends AbstractLabelEditPar RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -565,8 +562,7 @@ public class PseudostateExitPointStereotypeEditPart extends AbstractLabelEditPar if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -585,17 +581,15 @@ public class PseudostateExitPointStereotypeEditPart extends AbstractLabelEditPar * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -605,9 +599,8 @@ public class PseudostateExitPointStereotypeEditPart extends AbstractLabelEditPar * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -618,14 +611,12 @@ public class PseudostateExitPointStereotypeEditPart extends AbstractLabelEditPar */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -719,7 +710,7 @@ public class PseudostateExitPointStereotypeEditPart extends AbstractLabelEditPar */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -743,9 +734,9 @@ public class PseudostateExitPointStereotypeEditPart extends AbstractLabelEditPar if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -759,8 +750,7 @@ public class PseudostateExitPointStereotypeEditPart extends AbstractLabelEditPar String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -812,18 +802,15 @@ public class PseudostateExitPointStereotypeEditPart extends AbstractLabelEditPar refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkEditPart.java index 58d3770615c..7cd82c0f7cf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkEditPart.java @@ -117,8 +117,7 @@ public class PseudostateForkEditPart extends RoundedCompartmentEditPart { mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
@@ -191,11 +190,11 @@ public class PseudostateForkEditPart extends RoundedCompartmentEditPart { if (borderItemEditPart instanceof PseudostateForkNameEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof PseudostateForkStereotypeEditPart) {
+ } else
+ if (borderItemEditPart instanceof PseudostateForkStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkNameEditPart.java index 1b7ca30f880..982c1c92568 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkNameEditPart.java @@ -124,6 +124,7 @@ public class PseudostateForkNameEditPart extends FloatingLabelEditPart implement * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -229,8 +230,7 @@ public class PseudostateForkNameEditPart extends FloatingLabelEditPart implement /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -341,15 +341,14 @@ public class PseudostateForkNameEditPart extends FloatingLabelEditPart implement final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -478,8 +477,7 @@ public class PseudostateForkNameEditPart extends FloatingLabelEditPart implement IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -524,8 +522,7 @@ public class PseudostateForkNameEditPart extends FloatingLabelEditPart implement RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -562,8 +559,7 @@ public class PseudostateForkNameEditPart extends FloatingLabelEditPart implement if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -582,17 +578,15 @@ public class PseudostateForkNameEditPart extends FloatingLabelEditPart implement * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -602,9 +596,8 @@ public class PseudostateForkNameEditPart extends FloatingLabelEditPart implement * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -615,14 +608,12 @@ public class PseudostateForkNameEditPart extends FloatingLabelEditPart implement */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -716,7 +707,7 @@ public class PseudostateForkNameEditPart extends FloatingLabelEditPart implement */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -740,9 +731,9 @@ public class PseudostateForkNameEditPart extends FloatingLabelEditPart implement if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -756,8 +747,7 @@ public class PseudostateForkNameEditPart extends FloatingLabelEditPart implement String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -809,18 +799,15 @@ public class PseudostateForkNameEditPart extends FloatingLabelEditPart implement refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkStereotypeEditPart.java index 2edfbccd2ee..f57f4bc4a51 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateForkStereotypeEditPart.java @@ -126,6 +126,7 @@ public class PseudostateForkStereotypeEditPart extends AbstractLabelEditPart imp * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -232,8 +233,7 @@ public class PseudostateForkStereotypeEditPart extends AbstractLabelEditPart imp /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -344,15 +344,14 @@ public class PseudostateForkStereotypeEditPart extends AbstractLabelEditPart imp final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -481,8 +480,7 @@ public class PseudostateForkStereotypeEditPart extends AbstractLabelEditPart imp IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -527,8 +525,7 @@ public class PseudostateForkStereotypeEditPart extends AbstractLabelEditPart imp RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -565,8 +562,7 @@ public class PseudostateForkStereotypeEditPart extends AbstractLabelEditPart imp if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -585,17 +581,15 @@ public class PseudostateForkStereotypeEditPart extends AbstractLabelEditPart imp * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -605,9 +599,8 @@ public class PseudostateForkStereotypeEditPart extends AbstractLabelEditPart imp * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -618,14 +611,12 @@ public class PseudostateForkStereotypeEditPart extends AbstractLabelEditPart imp */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -719,7 +710,7 @@ public class PseudostateForkStereotypeEditPart extends AbstractLabelEditPart imp */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -743,9 +734,9 @@ public class PseudostateForkStereotypeEditPart extends AbstractLabelEditPart imp if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -759,8 +750,7 @@ public class PseudostateForkStereotypeEditPart extends AbstractLabelEditPart imp String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -812,18 +802,15 @@ public class PseudostateForkStereotypeEditPart extends AbstractLabelEditPart imp refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialEditPart.java index c064fa5ac3f..fb76791a902 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialEditPart.java @@ -115,8 +115,7 @@ public class PseudostateInitialEditPart extends RoundedCompartmentEditPart { mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
@@ -189,11 +188,11 @@ public class PseudostateInitialEditPart extends RoundedCompartmentEditPart { if (borderItemEditPart instanceof PseudostateInitialFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof PseudostateInitialStereotypeEditPart) {
+ } else
+ if (borderItemEditPart instanceof PseudostateInitialStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialFloatingLabelEditPart.java index d85d5f2b761..2a12ce2e45c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialFloatingLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialFloatingLabelEditPart.java @@ -86,8 +86,7 @@ import org.eclipse.uml2.uml.Feature; */
public class PseudostateInitialFloatingLabelEditPart extends
FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+ implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -235,8 +234,7 @@ public class PseudostateInitialFloatingLabelEditPart extends /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -347,15 +345,14 @@ public class PseudostateInitialFloatingLabelEditPart extends final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -484,8 +481,7 @@ public class PseudostateInitialFloatingLabelEditPart extends IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -530,8 +526,7 @@ public class PseudostateInitialFloatingLabelEditPart extends RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -568,8 +563,7 @@ public class PseudostateInitialFloatingLabelEditPart extends if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -588,17 +582,15 @@ public class PseudostateInitialFloatingLabelEditPart extends * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -608,9 +600,8 @@ public class PseudostateInitialFloatingLabelEditPart extends * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -621,14 +612,12 @@ public class PseudostateInitialFloatingLabelEditPart extends */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -722,7 +711,7 @@ public class PseudostateInitialFloatingLabelEditPart extends */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -746,9 +735,9 @@ public class PseudostateInitialFloatingLabelEditPart extends if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -762,8 +751,7 @@ public class PseudostateInitialFloatingLabelEditPart extends String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -816,18 +804,15 @@ public class PseudostateInitialFloatingLabelEditPart extends refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialStereotypeEditPart.java index 04401cc7cc2..334f84aabe5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateInitialStereotypeEditPart.java @@ -126,6 +126,7 @@ public class PseudostateInitialStereotypeEditPart extends AbstractLabelEditPart * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -232,8 +233,7 @@ public class PseudostateInitialStereotypeEditPart extends AbstractLabelEditPart /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -344,15 +344,14 @@ public class PseudostateInitialStereotypeEditPart extends AbstractLabelEditPart final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -481,8 +480,7 @@ public class PseudostateInitialStereotypeEditPart extends AbstractLabelEditPart IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -527,8 +525,7 @@ public class PseudostateInitialStereotypeEditPart extends AbstractLabelEditPart RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -565,8 +562,7 @@ public class PseudostateInitialStereotypeEditPart extends AbstractLabelEditPart if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -585,17 +581,15 @@ public class PseudostateInitialStereotypeEditPart extends AbstractLabelEditPart * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -605,9 +599,8 @@ public class PseudostateInitialStereotypeEditPart extends AbstractLabelEditPart * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -618,14 +611,12 @@ public class PseudostateInitialStereotypeEditPart extends AbstractLabelEditPart */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -719,7 +710,7 @@ public class PseudostateInitialStereotypeEditPart extends AbstractLabelEditPart */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -743,9 +734,9 @@ public class PseudostateInitialStereotypeEditPart extends AbstractLabelEditPart if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -759,8 +750,7 @@ public class PseudostateInitialStereotypeEditPart extends AbstractLabelEditPart String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -812,18 +802,15 @@ public class PseudostateInitialStereotypeEditPart extends AbstractLabelEditPart refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinEditPart.java index 7ce0ee8ac4c..08b50a2dd7b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinEditPart.java @@ -117,8 +117,7 @@ public class PseudostateJoinEditPart extends RoundedCompartmentEditPart { mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
@@ -191,11 +190,11 @@ public class PseudostateJoinEditPart extends RoundedCompartmentEditPart { if (borderItemEditPart instanceof PseudostateJoinFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof PseudostateJoinStereotypeEditPart) {
+ } else
+ if (borderItemEditPart instanceof PseudostateJoinStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinFloatingLabelEditPart.java index ace789014c1..be8442e1bd7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinFloatingLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinFloatingLabelEditPart.java @@ -86,8 +86,7 @@ import org.eclipse.uml2.uml.Feature; */
public class PseudostateJoinFloatingLabelEditPart extends
FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+ implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -235,8 +234,7 @@ public class PseudostateJoinFloatingLabelEditPart extends /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -347,15 +345,14 @@ public class PseudostateJoinFloatingLabelEditPart extends final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -484,8 +481,7 @@ public class PseudostateJoinFloatingLabelEditPart extends IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -530,8 +526,7 @@ public class PseudostateJoinFloatingLabelEditPart extends RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -568,8 +563,7 @@ public class PseudostateJoinFloatingLabelEditPart extends if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -588,17 +582,15 @@ public class PseudostateJoinFloatingLabelEditPart extends * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -608,9 +600,8 @@ public class PseudostateJoinFloatingLabelEditPart extends * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -621,14 +612,12 @@ public class PseudostateJoinFloatingLabelEditPart extends */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -722,7 +711,7 @@ public class PseudostateJoinFloatingLabelEditPart extends */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -746,9 +735,9 @@ public class PseudostateJoinFloatingLabelEditPart extends if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -762,8 +751,7 @@ public class PseudostateJoinFloatingLabelEditPart extends String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -816,18 +804,15 @@ public class PseudostateJoinFloatingLabelEditPart extends refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinStereotypeEditPart.java index f2466bd0565..11bb346a473 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJoinStereotypeEditPart.java @@ -126,6 +126,7 @@ public class PseudostateJoinStereotypeEditPart extends AbstractLabelEditPart imp * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -232,8 +233,7 @@ public class PseudostateJoinStereotypeEditPart extends AbstractLabelEditPart imp /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -344,15 +344,14 @@ public class PseudostateJoinStereotypeEditPart extends AbstractLabelEditPart imp final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -481,8 +480,7 @@ public class PseudostateJoinStereotypeEditPart extends AbstractLabelEditPart imp IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -527,8 +525,7 @@ public class PseudostateJoinStereotypeEditPart extends AbstractLabelEditPart imp RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -565,8 +562,7 @@ public class PseudostateJoinStereotypeEditPart extends AbstractLabelEditPart imp if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -585,17 +581,15 @@ public class PseudostateJoinStereotypeEditPart extends AbstractLabelEditPart imp * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -605,9 +599,8 @@ public class PseudostateJoinStereotypeEditPart extends AbstractLabelEditPart imp * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -618,14 +611,12 @@ public class PseudostateJoinStereotypeEditPart extends AbstractLabelEditPart imp */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -719,7 +710,7 @@ public class PseudostateJoinStereotypeEditPart extends AbstractLabelEditPart imp */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -743,9 +734,9 @@ public class PseudostateJoinStereotypeEditPart extends AbstractLabelEditPart imp if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -759,8 +750,7 @@ public class PseudostateJoinStereotypeEditPart extends AbstractLabelEditPart imp String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -812,18 +802,15 @@ public class PseudostateJoinStereotypeEditPart extends AbstractLabelEditPart imp refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionEditPart.java index 41fe688baf8..42810789ba5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionEditPart.java @@ -115,8 +115,7 @@ public class PseudostateJunctionEditPart extends RoundedCompartmentEditPart { mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
@@ -189,11 +188,11 @@ public class PseudostateJunctionEditPart extends RoundedCompartmentEditPart { if (borderItemEditPart instanceof PseudostateJunctionFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof PseudostateJunctionStereotypeEditPart) {
+ } else
+ if (borderItemEditPart instanceof PseudostateJunctionStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionFloatingLabelEditPart.java index 9f8f7101364..11188731f67 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionFloatingLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionFloatingLabelEditPart.java @@ -86,8 +86,7 @@ import org.eclipse.uml2.uml.Feature; */
public class PseudostateJunctionFloatingLabelEditPart extends
FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+ implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -235,8 +234,7 @@ public class PseudostateJunctionFloatingLabelEditPart extends /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -347,15 +345,14 @@ public class PseudostateJunctionFloatingLabelEditPart extends final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -484,8 +481,7 @@ public class PseudostateJunctionFloatingLabelEditPart extends IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -530,8 +526,7 @@ public class PseudostateJunctionFloatingLabelEditPart extends RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -568,8 +563,7 @@ public class PseudostateJunctionFloatingLabelEditPart extends if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -588,17 +582,15 @@ public class PseudostateJunctionFloatingLabelEditPart extends * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -608,9 +600,8 @@ public class PseudostateJunctionFloatingLabelEditPart extends * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -621,14 +612,12 @@ public class PseudostateJunctionFloatingLabelEditPart extends */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -722,7 +711,7 @@ public class PseudostateJunctionFloatingLabelEditPart extends */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -746,9 +735,9 @@ public class PseudostateJunctionFloatingLabelEditPart extends if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -762,8 +751,7 @@ public class PseudostateJunctionFloatingLabelEditPart extends String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -816,18 +804,15 @@ public class PseudostateJunctionFloatingLabelEditPart extends refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionStereotypeEditPart.java index b26798fa4c0..a3d3d09af93 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateJunctionStereotypeEditPart.java @@ -126,6 +126,7 @@ public class PseudostateJunctionStereotypeEditPart extends AbstractLabelEditPart * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -232,8 +233,7 @@ public class PseudostateJunctionStereotypeEditPart extends AbstractLabelEditPart /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -344,15 +344,14 @@ public class PseudostateJunctionStereotypeEditPart extends AbstractLabelEditPart final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -481,8 +480,7 @@ public class PseudostateJunctionStereotypeEditPart extends AbstractLabelEditPart IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -527,8 +525,7 @@ public class PseudostateJunctionStereotypeEditPart extends AbstractLabelEditPart RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -565,8 +562,7 @@ public class PseudostateJunctionStereotypeEditPart extends AbstractLabelEditPart if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -585,17 +581,15 @@ public class PseudostateJunctionStereotypeEditPart extends AbstractLabelEditPart * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -605,9 +599,8 @@ public class PseudostateJunctionStereotypeEditPart extends AbstractLabelEditPart * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -618,14 +611,12 @@ public class PseudostateJunctionStereotypeEditPart extends AbstractLabelEditPart */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -719,7 +710,7 @@ public class PseudostateJunctionStereotypeEditPart extends AbstractLabelEditPart */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -743,9 +734,9 @@ public class PseudostateJunctionStereotypeEditPart extends AbstractLabelEditPart if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -759,8 +750,7 @@ public class PseudostateJunctionStereotypeEditPart extends AbstractLabelEditPart String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -812,18 +802,15 @@ public class PseudostateJunctionStereotypeEditPart extends AbstractLabelEditPart refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryEditPart.java index 04d6463d445..36237735d73 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryEditPart.java @@ -115,8 +115,7 @@ public class PseudostateShallowHistoryEditPart extends RoundedCompartmentEditPar mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
@@ -189,11 +188,11 @@ public class PseudostateShallowHistoryEditPart extends RoundedCompartmentEditPar if (borderItemEditPart instanceof PseudostateShallowHistoryFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof PseudostateShallowHistoryStereotypeEditPart) {
+ } else
+ if (borderItemEditPart instanceof PseudostateShallowHistoryStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryFloatingLabelEditPart.java index f08376d6c1b..ed9d75dd546 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryFloatingLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryFloatingLabelEditPart.java @@ -86,8 +86,7 @@ import org.eclipse.uml2.uml.Feature; */
public class PseudostateShallowHistoryFloatingLabelEditPart extends
FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+ implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -235,8 +234,7 @@ public class PseudostateShallowHistoryFloatingLabelEditPart extends /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -347,15 +345,14 @@ public class PseudostateShallowHistoryFloatingLabelEditPart extends final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -484,8 +481,7 @@ public class PseudostateShallowHistoryFloatingLabelEditPart extends IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -530,8 +526,7 @@ public class PseudostateShallowHistoryFloatingLabelEditPart extends RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -568,8 +563,7 @@ public class PseudostateShallowHistoryFloatingLabelEditPart extends if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -588,17 +582,15 @@ public class PseudostateShallowHistoryFloatingLabelEditPart extends * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -608,9 +600,8 @@ public class PseudostateShallowHistoryFloatingLabelEditPart extends * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -621,14 +612,12 @@ public class PseudostateShallowHistoryFloatingLabelEditPart extends */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -722,7 +711,7 @@ public class PseudostateShallowHistoryFloatingLabelEditPart extends */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -746,9 +735,9 @@ public class PseudostateShallowHistoryFloatingLabelEditPart extends if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -762,8 +751,7 @@ public class PseudostateShallowHistoryFloatingLabelEditPart extends String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -816,18 +804,15 @@ public class PseudostateShallowHistoryFloatingLabelEditPart extends refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryStereotypeEditPart.java index a2910991200..12fbd5a9625 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateShallowHistoryStereotypeEditPart.java @@ -126,6 +126,7 @@ public class PseudostateShallowHistoryStereotypeEditPart extends AbstractLabelEd * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -232,8 +233,7 @@ public class PseudostateShallowHistoryStereotypeEditPart extends AbstractLabelEd /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -344,15 +344,14 @@ public class PseudostateShallowHistoryStereotypeEditPart extends AbstractLabelEd final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -481,8 +480,7 @@ public class PseudostateShallowHistoryStereotypeEditPart extends AbstractLabelEd IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -527,8 +525,7 @@ public class PseudostateShallowHistoryStereotypeEditPart extends AbstractLabelEd RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -565,8 +562,7 @@ public class PseudostateShallowHistoryStereotypeEditPart extends AbstractLabelEd if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -585,17 +581,15 @@ public class PseudostateShallowHistoryStereotypeEditPart extends AbstractLabelEd * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -605,9 +599,8 @@ public class PseudostateShallowHistoryStereotypeEditPart extends AbstractLabelEd * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -618,14 +611,12 @@ public class PseudostateShallowHistoryStereotypeEditPart extends AbstractLabelEd */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -719,7 +710,7 @@ public class PseudostateShallowHistoryStereotypeEditPart extends AbstractLabelEd */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -743,9 +734,9 @@ public class PseudostateShallowHistoryStereotypeEditPart extends AbstractLabelEd if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -759,8 +750,7 @@ public class PseudostateShallowHistoryStereotypeEditPart extends AbstractLabelEd String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -812,18 +802,15 @@ public class PseudostateShallowHistoryStereotypeEditPart extends AbstractLabelEd refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateEditPart.java index 65cc0fe5a2b..7a184ef7fcc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateEditPart.java @@ -115,8 +115,7 @@ public class PseudostateTerminateEditPart extends RoundedCompartmentEditPart { mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
@@ -189,11 +188,11 @@ public class PseudostateTerminateEditPart extends RoundedCompartmentEditPart { if (borderItemEditPart instanceof PseudostateTerminateFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else if (borderItemEditPart instanceof PseudostateTerminateStereotypeEditPart) {
+ } else
+ if (borderItemEditPart instanceof PseudostateTerminateStereotypeEditPart) {
IBorderItemLocator locator = new ExternalLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateFloatingLabelEditPart.java index 9ff08a9c0c6..1ac60992451 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateFloatingLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateFloatingLabelEditPart.java @@ -86,8 +86,7 @@ import org.eclipse.uml2.uml.Feature; */
public class PseudostateTerminateFloatingLabelEditPart extends
FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+ implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -235,8 +234,7 @@ public class PseudostateTerminateFloatingLabelEditPart extends /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -347,15 +345,14 @@ public class PseudostateTerminateFloatingLabelEditPart extends final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -484,8 +481,7 @@ public class PseudostateTerminateFloatingLabelEditPart extends IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -530,8 +526,7 @@ public class PseudostateTerminateFloatingLabelEditPart extends RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -568,8 +563,7 @@ public class PseudostateTerminateFloatingLabelEditPart extends if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -588,17 +582,15 @@ public class PseudostateTerminateFloatingLabelEditPart extends * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -608,9 +600,8 @@ public class PseudostateTerminateFloatingLabelEditPart extends * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -621,14 +612,12 @@ public class PseudostateTerminateFloatingLabelEditPart extends */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -722,7 +711,7 @@ public class PseudostateTerminateFloatingLabelEditPart extends */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -746,9 +735,9 @@ public class PseudostateTerminateFloatingLabelEditPart extends if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -762,8 +751,7 @@ public class PseudostateTerminateFloatingLabelEditPart extends String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -816,18 +804,15 @@ public class PseudostateTerminateFloatingLabelEditPart extends refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateStereotypeEditPart.java index 440086b2361..0dbd04c0659 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/PseudostateTerminateStereotypeEditPart.java @@ -126,6 +126,7 @@ public class PseudostateTerminateStereotypeEditPart extends AbstractLabelEditPar * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -232,8 +233,7 @@ public class PseudostateTerminateStereotypeEditPart extends AbstractLabelEditPar /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -344,15 +344,14 @@ public class PseudostateTerminateStereotypeEditPart extends AbstractLabelEditPar final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -481,8 +480,7 @@ public class PseudostateTerminateStereotypeEditPart extends AbstractLabelEditPar IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -527,8 +525,7 @@ public class PseudostateTerminateStereotypeEditPart extends AbstractLabelEditPar RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -565,8 +562,7 @@ public class PseudostateTerminateStereotypeEditPart extends AbstractLabelEditPar if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -585,17 +581,15 @@ public class PseudostateTerminateStereotypeEditPart extends AbstractLabelEditPar * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -605,9 +599,8 @@ public class PseudostateTerminateStereotypeEditPart extends AbstractLabelEditPar * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -618,14 +611,12 @@ public class PseudostateTerminateStereotypeEditPart extends AbstractLabelEditPar */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -719,7 +710,7 @@ public class PseudostateTerminateStereotypeEditPart extends AbstractLabelEditPar */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -743,9 +734,9 @@ public class PseudostateTerminateStereotypeEditPart extends AbstractLabelEditPar if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -759,8 +750,7 @@ public class PseudostateTerminateStereotypeEditPart extends AbstractLabelEditPar String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -812,18 +802,15 @@ public class PseudostateTerminateStereotypeEditPart extends AbstractLabelEditPar refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/RegionCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/RegionCompartmentEditPart.java index aa747b7723b..aea40b71b3f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/RegionCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/RegionCompartmentEditPart.java @@ -1,151 +1,151 @@ -/** - * Copyright (c) 2014 CEA LIST. - * - * 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: - * CEA LIST - Initial API and implementation - */ -package org.eclipse.papyrus.uml.diagram.statemachine.edit.parts; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.GraphicalEditPart; -import org.eclipse.gef.Request; -import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy; -import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomRegionCompartmentCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomRegionCompartmentXYLayoutEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.part.Messages; - -/** - * @generated - */ -public class RegionCompartmentEditPart extends ShapeCompartmentEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 3002; - - /** - * @generated - */ - public RegionCompartmentEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - public String getCompartmentName() { - return Messages.RegionCompartmentEditPart_title; - } - - /** - * @generated - */ - @Override - public IFigure createFigure() { - ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure(); - result.setTitleVisibility(false); - return result; - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy()); - //in Papyrus diagrams are not strongly synchronised - //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.RegionCompartmentCanonicalEditPolicy()); - - installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$ - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomRegionCompartmentCreationEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomStateMachineDiagramDragDropEditPolicy()); - installEditPolicy(EditPolicy.LAYOUT_ROLE, new CustomRegionCompartmentXYLayoutEditPolicy()); - } - - /** - * @generated - */ - @Override - protected void setRatio(Double ratio) { - if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) { - super.setRatio(ratio); - } - } - - /** - * @generated - */ - @Override - public EditPart getTargetEditPart(Request request) { - - return super.getTargetEditPart(request); - } - - /** - * @generated - */ - @Override - protected void handleNotificationEvent(Notification notification) { - Object feature = notification.getFeature(); - if (NotationPackage.eINSTANCE.getSize_Width().equals(feature) - || NotationPackage.eINSTANCE.getSize_Height().equals(feature) - || NotationPackage.eINSTANCE.getLocation_X().equals(feature) - || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) { - refreshBounds(); - } - super.handleNotificationEvent(notification); - } - - /** - * @generated - */ - protected void refreshBounds() { - int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); - int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); - Dimension size = new Dimension(width, height); - int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); - int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); - Point loc = new Point(x, y); - ((GraphicalEditPart) getParent()).setLayoutConstraint( - this, - getFigure(), - new Rectangle(loc, size)); - } - - /** - * @generated - */ - @Override - protected void refreshVisuals() { - super.refreshVisuals(); - refreshBounds(); - } -} +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.statemachine.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomRegionCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomRegionCompartmentXYLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.Messages;
+
+/**
+ * @generated
+ */
+public class RegionCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3002;
+
+ /**
+ * @generated
+ */
+ public RegionCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.RegionCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ //in Papyrus diagrams are not strongly synchronised
+ //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.RegionCompartmentCanonicalEditPolicy());
+
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomRegionCompartmentCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomStateMachineDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new CustomRegionCompartmentXYLayoutEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if (NotationPackage.eINSTANCE.getSize_Width().equals(feature)
+ || NotationPackage.eINSTANCE.getSize_Height().equals(feature)
+ || NotationPackage.eINSTANCE.getLocation_X().equals(feature)
+ || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart) getParent()).setLayoutConstraint(
+ this,
+ getFigure(),
+ new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateCompartmentEditPart.java index 439e49586ee..aea73349186 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateCompartmentEditPart.java @@ -1,153 +1,153 @@ -/** - * Copyright (c) 2014 CEA LIST. - * - * 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: - * CEA LIST - Initial API and implementation - */ -package org.eclipse.papyrus.uml.diagram.statemachine.edit.parts; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.GraphicalEditPart; -import org.eclipse.gef.Request; -import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy; -import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy; -import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateCompartmentCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateCompartmentXYLayoutEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.part.Messages; - -/** - * @generated - */ -public class StateCompartmentEditPart extends ShapeCompartmentEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 6002; - - /** - * @generated - */ - public StateCompartmentEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - public String getCompartmentName() { - return Messages.StateCompartmentEditPart_title; - } - - /** - * @generated - */ - @Override - public IFigure createFigure() { - ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure(); - result.setTitleVisibility(false); - return result; - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy()); - //in Papyrus diagrams are not strongly synchronised - //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.StateCompartmentCanonicalEditPolicy()); - - installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$ - installEditPolicy(EditPolicy.LAYOUT_ROLE, new CustomStateCompartmentXYLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomStateMachineDiagramDragDropEditPolicy()); - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomStateCompartmentCreationEditPolicy()); - installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy()); - } - - /** - * @generated - */ - @Override - protected void setRatio(Double ratio) { - if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) { - super.setRatio(ratio); - } - } - - /** - * @generated - */ - @Override - public EditPart getTargetEditPart(Request request) { - - return super.getTargetEditPart(request); - } - - /** - * @generated - */ - @Override - protected void handleNotificationEvent(Notification notification) { - Object feature = notification.getFeature(); - if (NotationPackage.eINSTANCE.getSize_Width().equals(feature) - || NotationPackage.eINSTANCE.getSize_Height().equals(feature) - || NotationPackage.eINSTANCE.getLocation_X().equals(feature) - || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) { - refreshBounds(); - } - super.handleNotificationEvent(notification); - } - - /** - * @generated - */ - protected void refreshBounds() { - int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); - int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); - Dimension size = new Dimension(width, height); - int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); - int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); - Point loc = new Point(x, y); - ((GraphicalEditPart) getParent()).setLayoutConstraint( - this, - getFigure(), - new Rectangle(loc, size)); - } - - /** - * @generated - */ - @Override - protected void refreshVisuals() { - super.refreshVisuals(); - refreshBounds(); - } -} +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.statemachine.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.BorderDisplayEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateCompartmentCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateCompartmentXYLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.Messages;
+
+/**
+ * @generated
+ */
+public class StateCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 6002;
+
+ /**
+ * @generated
+ */
+ public StateCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.StateCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ //in Papyrus diagrams are not strongly synchronised
+ //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.StateCompartmentCanonicalEditPolicy());
+
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new CustomStateCompartmentXYLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomStateMachineDiagramDragDropEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomStateCompartmentCreationEditPolicy());
+ installEditPolicy(BorderDisplayEditPolicy.BORDER_DISPLAY_EDITPOLICY, new BorderDisplayEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if (NotationPackage.eINSTANCE.getSize_Width().equals(feature)
+ || NotationPackage.eINSTANCE.getSize_Height().equals(feature)
+ || NotationPackage.eINSTANCE.getLocation_X().equals(feature)
+ || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart) getParent()).setLayoutConstraint(
+ this,
+ getFigure(),
+ new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateEditPart.java index b06155c5dca..c3237f1f59a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateEditPart.java @@ -135,8 +135,7 @@ public class StateEditPart extends RoundedCompartmentEditPart { mh.setBorder(null);
return Collections.singletonList(mh);
}
- }
- ;
+ };
case PseudostateEntryPointEditPart.VISUAL_ID:
case PseudostateExitPointEditPart.VISUAL_ID:
case ConnectionPointReferenceEditPart.VISUAL_ID:
@@ -326,8 +325,7 @@ public class StateEditPart extends RoundedCompartmentEditPart { if (borderItemEditPart instanceof StateFloatingLabelEditPart) {
IBorderItemLocator locator = new RoundedRectangleLabelPositionLocator(getMainFigure());
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
- } else
- {
+ } else {
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateFloatingLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateFloatingLabelEditPart.java index 6a581926dbc..fa97cb53924 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateFloatingLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateFloatingLabelEditPart.java @@ -86,8 +86,7 @@ import org.eclipse.uml2.uml.Feature; */
public class StateFloatingLabelEditPart extends
FloatingLabelEditPart
- implements ITextAwareEditPart, IBorderItemEditPart
-{
+ implements ITextAwareEditPart, IBorderItemEditPart {
/**
* @generated
@@ -235,8 +234,7 @@ public class StateFloatingLabelEditPart extends /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -347,15 +345,14 @@ public class StateFloatingLabelEditPart extends final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -484,8 +481,7 @@ public class StateFloatingLabelEditPart extends IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -530,8 +526,7 @@ public class StateFloatingLabelEditPart extends RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -568,8 +563,7 @@ public class StateFloatingLabelEditPart extends if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -588,17 +582,15 @@ public class StateFloatingLabelEditPart extends * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -608,9 +600,8 @@ public class StateFloatingLabelEditPart extends * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -621,14 +612,12 @@ public class StateFloatingLabelEditPart extends */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -722,7 +711,7 @@ public class StateFloatingLabelEditPart extends */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -746,9 +735,9 @@ public class StateFloatingLabelEditPart extends if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -762,8 +751,7 @@ public class StateFloatingLabelEditPart extends String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -816,18 +804,15 @@ public class StateFloatingLabelEditPart extends refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineCompartmentEditPart.java index 7a91d09543a..b5b3db34d6f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineCompartmentEditPart.java @@ -1,149 +1,149 @@ -/** - * Copyright (c) 2014 CEA LIST. - * - * 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: - * CEA LIST - Initial API and implementation - */ -package org.eclipse.papyrus.uml.diagram.statemachine.edit.parts; - -import org.eclipse.draw2d.IFigure; -import org.eclipse.draw2d.geometry.Dimension; -import org.eclipse.draw2d.geometry.Point; -import org.eclipse.draw2d.geometry.Rectangle; -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.gef.EditPart; -import org.eclipse.gef.EditPolicy; -import org.eclipse.gef.GraphicalEditPart; -import org.eclipse.gef.Request; -import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy; -import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; -import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure; -import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout; -import org.eclipse.gmf.runtime.notation.NotationPackage; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy; -import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy; -import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineCompartmentXYLayoutEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy; -import org.eclipse.papyrus.uml.diagram.statemachine.part.Messages; - -/** - * @generated - */ -public class StateMachineCompartmentEditPart extends ShapeCompartmentEditPart { - - /** - * @generated - */ - public static final int VISUAL_ID = 2002; - - /** - * @generated - */ - public StateMachineCompartmentEditPart(View view) { - super(view); - } - - /** - * @generated - */ - @Override - public String getCompartmentName() { - return Messages.StateMachineCompartmentEditPart_title; - } - - /** - * @generated - */ - @Override - public IFigure createFigure() { - ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure(); - result.setTitleVisibility(false); - return result; - } - - /** - * @generated - */ - @Override - protected void createDefaultEditPolicies() { - super.createDefaultEditPolicies(); - installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy()); - installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy()); - installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy()); - //in Papyrus diagrams are not strongly synchronised - //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.StateMachineCompartmentCanonicalEditPolicy()); - - installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$ - installEditPolicy(EditPolicy.LAYOUT_ROLE, new CustomStateMachineCompartmentXYLayoutEditPolicy()); - installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomStateMachineDiagramDragDropEditPolicy()); - } - - /** - * @generated - */ - @Override - protected void setRatio(Double ratio) { - if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) { - super.setRatio(ratio); - } - } - - /** - * @generated - */ - @Override - public EditPart getTargetEditPart(Request request) { - - return super.getTargetEditPart(request); - } - - /** - * @generated - */ - @Override - protected void handleNotificationEvent(Notification notification) { - Object feature = notification.getFeature(); - if (NotationPackage.eINSTANCE.getSize_Width().equals(feature) - || NotationPackage.eINSTANCE.getSize_Height().equals(feature) - || NotationPackage.eINSTANCE.getLocation_X().equals(feature) - || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) { - refreshBounds(); - } - super.handleNotificationEvent(notification); - } - - /** - * @generated - */ - protected void refreshBounds() { - int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue(); - int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue(); - Dimension size = new Dimension(width, height); - int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue(); - int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue(); - Point loc = new Point(x, y); - ((GraphicalEditPart) getParent()).setLayoutConstraint( - this, - getFigure(), - new Rectangle(loc, size)); - } - - /** - * @generated - */ - @Override - protected void refreshVisuals() { - super.refreshVisuals(); - refreshBounds(); - } -} +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.statemachine.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineCompartmentXYLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.CustomStateMachineDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.custom.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.statemachine.part.Messages;
+
+/**
+ * @generated
+ */
+public class StateMachineCompartmentEditPart extends ShapeCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2002;
+
+ /**
+ * @generated
+ */
+ public StateMachineCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public String getCompartmentName() {
+ return Messages.StateMachineCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public IFigure createFigure() {
+ ResizableCompartmentFigure result = (ResizableCompartmentFigure) super.createFigure();
+ result.setTitleVisibility(false);
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new DefaultCompartmentSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new DefaultCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(PasteEditPolicy.PASTE_ROLE, new PasteEditPolicy());
+ //in Papyrus diagrams are not strongly synchronised
+ //installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new org.eclipse.papyrus.uml.diagram.statemachine.edit.policies.StateMachineCompartmentCanonicalEditPolicy());
+
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, new CustomStateMachineCompartmentXYLayoutEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new CustomStateMachineDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void setRatio(Double ratio) {
+ if (getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public EditPart getTargetEditPart(Request request) {
+
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if (NotationPackage.eINSTANCE.getSize_Width().equals(feature)
+ || NotationPackage.eINSTANCE.getSize_Height().equals(feature)
+ || NotationPackage.eINSTANCE.getLocation_X().equals(feature)
+ || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart) getParent()).setLayoutConstraint(
+ this,
+ getFigure(),
+ new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineNameEditPart.java index 346c37dc159..77196a8ab7e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateMachineNameEditPart.java @@ -195,8 +195,7 @@ public class StateMachineNameEditPart extends PapyrusCompartmentEditPart impleme /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -308,15 +307,14 @@ public class StateMachineNameEditPart extends PapyrusCompartmentEditPart impleme final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -445,8 +443,7 @@ public class StateMachineNameEditPart extends PapyrusCompartmentEditPart impleme IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -491,8 +488,7 @@ public class StateMachineNameEditPart extends PapyrusCompartmentEditPart impleme RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -529,8 +525,7 @@ public class StateMachineNameEditPart extends PapyrusCompartmentEditPart impleme if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -549,17 +544,15 @@ public class StateMachineNameEditPart extends PapyrusCompartmentEditPart impleme * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -569,9 +562,8 @@ public class StateMachineNameEditPart extends PapyrusCompartmentEditPart impleme * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -582,14 +574,12 @@ public class StateMachineNameEditPart extends PapyrusCompartmentEditPart impleme */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -683,7 +673,7 @@ public class StateMachineNameEditPart extends PapyrusCompartmentEditPart impleme */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -707,9 +697,9 @@ public class StateMachineNameEditPart extends PapyrusCompartmentEditPart impleme if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -723,8 +713,7 @@ public class StateMachineNameEditPart extends PapyrusCompartmentEditPart impleme String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -795,18 +784,15 @@ public class StateMachineNameEditPart extends PapyrusCompartmentEditPart impleme refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateNameEditPart.java index cb2e70b74f7..d41851cf20e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/StateNameEditPart.java @@ -195,8 +195,7 @@ public class StateNameEditPart extends PapyrusCompartmentEditPart implements ITe /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -308,15 +307,14 @@ public class StateNameEditPart extends PapyrusCompartmentEditPart implements ITe final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -445,8 +443,7 @@ public class StateNameEditPart extends PapyrusCompartmentEditPart implements ITe IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -491,8 +488,7 @@ public class StateNameEditPart extends PapyrusCompartmentEditPart implements ITe RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -529,8 +525,7 @@ public class StateNameEditPart extends PapyrusCompartmentEditPart implements ITe if (view.isVisible()) {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
- }
- else {
+ } else {
setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
setLabelIconHelper(getFigure(), null);
}
@@ -549,17 +544,15 @@ public class StateNameEditPart extends PapyrusCompartmentEditPart implements ITe * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -569,9 +562,8 @@ public class StateNameEditPart extends PapyrusCompartmentEditPart implements ITe * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -582,14 +574,12 @@ public class StateNameEditPart extends PapyrusCompartmentEditPart implements ITe */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -683,7 +673,7 @@ public class StateNameEditPart extends PapyrusCompartmentEditPart implements ITe */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -707,9 +697,9 @@ public class StateNameEditPart extends PapyrusCompartmentEditPart implements ITe if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -723,8 +713,7 @@ public class StateNameEditPart extends PapyrusCompartmentEditPart implements ITe String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -795,18 +784,15 @@ public class StateNameEditPart extends PapyrusCompartmentEditPart implements ITe refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionGuardEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionGuardEditPart.java index 91785cb88c3..57487f9bc23 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionGuardEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionGuardEditPart.java @@ -123,6 +123,7 @@ public class TransitionGuardEditPart extends PapyrusLabelEditPart implements ITe * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -211,8 +212,7 @@ public class TransitionGuardEditPart extends PapyrusLabelEditPart implements ITe /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -324,15 +324,14 @@ public class TransitionGuardEditPart extends PapyrusLabelEditPart implements ITe final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -461,8 +460,7 @@ public class TransitionGuardEditPart extends PapyrusLabelEditPart implements ITe IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -507,8 +505,7 @@ public class TransitionGuardEditPart extends PapyrusLabelEditPart implements ITe RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -558,17 +555,15 @@ public class TransitionGuardEditPart extends PapyrusLabelEditPart implements ITe * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -578,9 +573,8 @@ public class TransitionGuardEditPart extends PapyrusLabelEditPart implements ITe * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -591,14 +585,12 @@ public class TransitionGuardEditPart extends PapyrusLabelEditPart implements ITe */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -692,7 +684,7 @@ public class TransitionGuardEditPart extends PapyrusLabelEditPart implements ITe */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -716,9 +708,9 @@ public class TransitionGuardEditPart extends PapyrusLabelEditPart implements ITe if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -732,8 +724,7 @@ public class TransitionGuardEditPart extends PapyrusLabelEditPart implements ITe String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -785,18 +776,15 @@ public class TransitionGuardEditPart extends PapyrusLabelEditPart implements ITe refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionNameEditPart.java index f4222c7840a..7b567be0399 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionNameEditPart.java @@ -123,6 +123,7 @@ public class TransitionNameEditPart extends PapyrusLabelEditPart implements ITex * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -211,8 +212,7 @@ public class TransitionNameEditPart extends PapyrusLabelEditPart implements ITex /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -324,15 +324,14 @@ public class TransitionNameEditPart extends PapyrusLabelEditPart implements ITex final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -461,8 +460,7 @@ public class TransitionNameEditPart extends PapyrusLabelEditPart implements ITex IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -507,8 +505,7 @@ public class TransitionNameEditPart extends PapyrusLabelEditPart implements ITex RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -558,17 +555,15 @@ public class TransitionNameEditPart extends PapyrusLabelEditPart implements ITex * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -578,9 +573,8 @@ public class TransitionNameEditPart extends PapyrusLabelEditPart implements ITex * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -591,14 +585,12 @@ public class TransitionNameEditPart extends PapyrusLabelEditPart implements ITex */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -692,7 +684,7 @@ public class TransitionNameEditPart extends PapyrusLabelEditPart implements ITex */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -716,9 +708,9 @@ public class TransitionNameEditPart extends PapyrusLabelEditPart implements ITex if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -732,8 +724,7 @@ public class TransitionNameEditPart extends PapyrusLabelEditPart implements ITex String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -785,18 +776,15 @@ public class TransitionNameEditPart extends PapyrusLabelEditPart implements ITex refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionStereotypeEditPart.java index 45edd9341fa..e97adfd4825 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/TransitionStereotypeEditPart.java @@ -122,6 +122,7 @@ public class TransitionStereotypeEditPart extends PapyrusLabelEditPart implement * @generated
*/
protected IDirectEditorConfiguration configuration;
+
/**
* @generated
*/
@@ -210,8 +211,7 @@ public class TransitionStereotypeEditPart extends PapyrusLabelEditPart implement /**
* @generated
*/
- public void setLabel(IFigure
- figure) {
+ public void setLabel(IFigure figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
@@ -323,15 +323,14 @@ public class TransitionStereotypeEditPart extends PapyrusLabelEditPart implement final EObject element = getParserElement();
final IParser parser = getParser();
try {
- IParserEditStatus valid =
- (IParserEditStatus) getEditingDomain().runExclusive(
- new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
- }
- });
+ IParserEditStatus valid = (IParserEditStatus) getEditingDomain().runExclusive(
+ new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String) value));
+ }
+ });
return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
} catch (InterruptedException ie) {
ie.printStackTrace();
@@ -460,8 +459,7 @@ public class TransitionStereotypeEditPart extends PapyrusLabelEditPart implement IPopupEditorHelper helper = ((IPopupEditorConfiguration) configuration).createPopupEditorHelper(this);
helper.showEditor();
return;
- }
- else if (configuration instanceof IAdvancedEditorConfiguration) {
+ } else if (configuration instanceof IAdvancedEditorConfiguration) {
dialog = ((IAdvancedEditorConfiguration) configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
} else if (configuration instanceof IDirectEditorConfiguration) {
dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
@@ -506,8 +504,7 @@ public class TransitionStereotypeEditPart extends PapyrusLabelEditPart implement RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
Character initialChar = (Character) request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
performDirectEdit(initialChar.charValue());
- }
- else {
+ } else {
performDirectEdit();
}
}
@@ -557,17 +554,15 @@ public class TransitionStereotypeEditPart extends PapyrusLabelEditPart implement * @generated
*/
protected void refreshUnderline() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
if (resolveSemanticElement() instanceof Feature) {
if (((Feature) resolveSemanticElement()).isStatic()) {
((WrappingLabel) getFigure()).setTextUnderline(true);
- }
- else {
+ } else {
((WrappingLabel) getFigure()).setTextUnderline(false);
}
}
@@ -577,9 +572,8 @@ public class TransitionStereotypeEditPart extends PapyrusLabelEditPart implement * @generated
*/
protected void refreshStrikeThrough() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null && getFigure() instanceof WrappingLabel) {
((WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
@@ -590,14 +584,12 @@ public class TransitionStereotypeEditPart extends PapyrusLabelEditPart implement */
@Override
protected void refreshFont() {
- FontStyle style =
- (FontStyle) getFontStyleOwnerView().getStyle(
- NotationPackage.eINSTANCE.getFontStyle());
+ FontStyle style = (FontStyle) getFontStyleOwnerView().getStyle(
+ NotationPackage.eINSTANCE.getFontStyle());
if (style != null) {
FontData fontData = new FontData(
style.getFontName(), style.getFontHeight(),
- (style.isBold() ? SWT.BOLD : SWT.NORMAL) |
- (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
setFont(fontData);
}
}
@@ -683,7 +675,7 @@ public class TransitionStereotypeEditPart extends PapyrusLabelEditPart implement */
protected boolean checkExtendedEditor() {
if (resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement(), this);
}
return false;
}
@@ -707,9 +699,9 @@ public class TransitionStereotypeEditPart extends PapyrusLabelEditPart implement if (configuration == null) {
final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement(), this);
}
}
}
@@ -723,8 +715,7 @@ public class TransitionStereotypeEditPart extends PapyrusLabelEditPart implement String languagePreferred = Activator.getDefault().getPreferenceStore().getString(
IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
if (languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement()
- .eClass().getInstanceClassName());
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement(), this);
} else if (IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
configuration = null;
}
@@ -776,18 +767,15 @@ public class TransitionStereotypeEditPart extends PapyrusLabelEditPart implement refreshUnderline();
} else if (NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
refreshStrikeThrough();
- } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) ||
- NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ } else if (NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature)
+ || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
refreshFont();
} else {
if (getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
refreshLabel();
}
if (getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser =
- (ISemanticParser) getParser();
+ ISemanticParser modelParser = (ISemanticParser) getParser();
if (modelParser.areSemanticElementsAffected(null, event)) {
removeSemanticListeners();
if (resolveSemanticElement() != null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/UMLEditPartFactory.java index 2fcb485c1e7..a07833758af 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/UMLEditPartFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/parts/UMLEditPartFactory.java @@ -258,8 +258,7 @@ public class UMLEditPartFactory implements EditPartFactory { if (source.getFigure() instanceof IMultilineEditableFigure) {
return new MultilineCellEditorLocator(
(IMultilineEditableFigure) source.getFigure());
- }
- else {
+ } else {
return CellEditorLocatorAccess.INSTANCE.getTextCellEditorLocator(source);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/OpenDiagramEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/OpenDiagramEditPolicy.java index 855b052df36..8c5bf3ae88d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/OpenDiagramEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/OpenDiagramEditPolicy.java @@ -85,7 +85,7 @@ public class OpenDiagramEditPolicy extends OpenEditPolicy { * @generated
*/
OpenDiagramCommand(HintedDiagramLinkStyle linkStyle) {
- // editing domain is taken for original diagram,
+ // editing domain is taken for original diagram,
// if we open diagram from another file, we should use another editing domain
super(TransactionUtil.getEditingDomain(linkStyle), Messages.CommandName_OpenDiagram, null);
diagramFacet = linkStyle;
@@ -138,7 +138,6 @@ public class OpenDiagramEditPolicy extends OpenEditPolicy { }
try {
new WorkspaceModifyOperation() {
- @Override
protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
try {
for (Iterator<?> it = diagramFacet.eResource().getResourceSet().getResources().iterator(); it.hasNext();) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/RegionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/RegionItemSemanticEditPolicy.java deleted file mode 100644 index 7782b6e1690..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/RegionItemSemanticEditPolicy.java +++ /dev/null @@ -1,558 +0,0 @@ -/** - * Copyright (c) 2014 CEA LIST. - * - * 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: - * CEA LIST - Initial API and implementation - */ -package org.eclipse.papyrus.uml.diagram.statemachine.edit.policies; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.eclipse.emf.ecore.EAnnotation; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.edit.command.DeleteCommand; -import org.eclipse.gef.commands.Command; -import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand; -import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand; -import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand; -import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest; -import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest; -import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest; -import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest; -import org.eclipse.gmf.runtime.notation.Edge; -import org.eclipse.gmf.runtime.notation.Node; -import org.eclipse.gmf.runtime.notation.View; -import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper; -import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; -import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.CommentAnnotatedElementEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.CommentEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ConstraintConstrainedElementEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ConstraintEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ContextLinkEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.FinalStateEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateChoiceEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateDeepHistoryEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateForkEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateInitialEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJoinEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateJunctionEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateShallowHistoryEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateTerminateEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.RegionCompartmentEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionEditPart; -import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry; -import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes; - -/** - * @generated - */ -public class RegionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy { - - /** - * @generated - */ - public RegionItemSemanticEditPolicy() { - super(UMLElementTypes.Region_3000); - } - - /** - * @generated - */ - @Override - protected Command getDestroyElementCommand(DestroyElementRequest req) { - View view = (View) getHost().getModel(); - CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null); - cmd.setTransactionNestingEnabled(true); - EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$ - if (annotation == null) { - // there are indirectly referenced children, need extra commands: true - addDestroyChildNodesCommand(cmd); - addDestroyShortcutsCommand(cmd, view); - // delete host element - List<EObject> todestroy = new ArrayList<EObject>(); - todestroy.add(req.getElementToDestroy()); - // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req)); - cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy))); - } else { - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view)); - } - return getGEFWrapper(cmd.reduce()); - } - - /** - * @generated - */ - protected void addDestroyChildNodesCommand(ICompositeCommand cmd) { - View view = (View) getHost().getModel(); - for (Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) { - Node node = (Node) nit.next(); - switch (UMLVisualIDRegistry.getVisualID(node)) { - case RegionCompartmentEditPart.VISUAL_ID: - for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) { - Node cnode = (Node) cit.next(); - switch (UMLVisualIDRegistry.getVisualID(cnode)) { - case PseudostateInitialEditPart.VISUAL_ID: - - - - - - for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) { - Edge incomingLink = (Edge) it.next(); - switch (UMLVisualIDRegistry.getVisualID(incomingLink)) { - case CommentAnnotatedElementEditPart.VISUAL_ID: - case ConstraintConstrainedElementEditPart.VISUAL_ID: - DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false); - cmd.add(new DestroyReferenceCommand(destroyRefReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - case TransitionEditPart.VISUAL_ID: - DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false); - cmd.add(new DestroyElementCommand(destroyEltReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - } - } - - cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true - // don't need explicit deletion of cnode as parent's view deletion would clean child views as well - // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode)); - break; - case PseudostateJoinEditPart.VISUAL_ID: - - - - - - for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) { - Edge incomingLink = (Edge) it.next(); - switch (UMLVisualIDRegistry.getVisualID(incomingLink)) { - case CommentAnnotatedElementEditPart.VISUAL_ID: - case ConstraintConstrainedElementEditPart.VISUAL_ID: - DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false); - cmd.add(new DestroyReferenceCommand(destroyRefReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - case TransitionEditPart.VISUAL_ID: - DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false); - cmd.add(new DestroyElementCommand(destroyEltReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - } - } - - cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true - // don't need explicit deletion of cnode as parent's view deletion would clean child views as well - // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode)); - break; - case PseudostateForkEditPart.VISUAL_ID: - - - - - - for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) { - Edge incomingLink = (Edge) it.next(); - switch (UMLVisualIDRegistry.getVisualID(incomingLink)) { - case CommentAnnotatedElementEditPart.VISUAL_ID: - case ConstraintConstrainedElementEditPart.VISUAL_ID: - DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false); - cmd.add(new DestroyReferenceCommand(destroyRefReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - case TransitionEditPart.VISUAL_ID: - DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false); - cmd.add(new DestroyElementCommand(destroyEltReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - } - } - - cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true - // don't need explicit deletion of cnode as parent's view deletion would clean child views as well - // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode)); - break; - case PseudostateChoiceEditPart.VISUAL_ID: - - - - - - for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) { - Edge incomingLink = (Edge) it.next(); - switch (UMLVisualIDRegistry.getVisualID(incomingLink)) { - case CommentAnnotatedElementEditPart.VISUAL_ID: - case ConstraintConstrainedElementEditPart.VISUAL_ID: - DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false); - cmd.add(new DestroyReferenceCommand(destroyRefReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - case TransitionEditPart.VISUAL_ID: - DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false); - cmd.add(new DestroyElementCommand(destroyEltReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - } - } - - cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true - // don't need explicit deletion of cnode as parent's view deletion would clean child views as well - // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode)); - break; - case PseudostateJunctionEditPart.VISUAL_ID: - - - - - - for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) { - Edge incomingLink = (Edge) it.next(); - switch (UMLVisualIDRegistry.getVisualID(incomingLink)) { - case CommentAnnotatedElementEditPart.VISUAL_ID: - case ConstraintConstrainedElementEditPart.VISUAL_ID: - DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false); - cmd.add(new DestroyReferenceCommand(destroyRefReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - case TransitionEditPart.VISUAL_ID: - DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false); - cmd.add(new DestroyElementCommand(destroyEltReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - } - } - - cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true - // don't need explicit deletion of cnode as parent's view deletion would clean child views as well - // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode)); - break; - case PseudostateShallowHistoryEditPart.VISUAL_ID: - - - - - - for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) { - Edge incomingLink = (Edge) it.next(); - switch (UMLVisualIDRegistry.getVisualID(incomingLink)) { - case CommentAnnotatedElementEditPart.VISUAL_ID: - case ConstraintConstrainedElementEditPart.VISUAL_ID: - DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false); - cmd.add(new DestroyReferenceCommand(destroyRefReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - case TransitionEditPart.VISUAL_ID: - DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false); - cmd.add(new DestroyElementCommand(destroyEltReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - } - } - - cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true - // don't need explicit deletion of cnode as parent's view deletion would clean child views as well - // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode)); - break; - case PseudostateDeepHistoryEditPart.VISUAL_ID: - - - - - - for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) { - Edge incomingLink = (Edge) it.next(); - switch (UMLVisualIDRegistry.getVisualID(incomingLink)) { - case CommentAnnotatedElementEditPart.VISUAL_ID: - case ConstraintConstrainedElementEditPart.VISUAL_ID: - DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false); - cmd.add(new DestroyReferenceCommand(destroyRefReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - case TransitionEditPart.VISUAL_ID: - DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false); - cmd.add(new DestroyElementCommand(destroyEltReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - } - } - - cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true - // don't need explicit deletion of cnode as parent's view deletion would clean child views as well - // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode)); - break; - case PseudostateTerminateEditPart.VISUAL_ID: - - - - - - for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) { - Edge incomingLink = (Edge) it.next(); - switch (UMLVisualIDRegistry.getVisualID(incomingLink)) { - case CommentAnnotatedElementEditPart.VISUAL_ID: - case ConstraintConstrainedElementEditPart.VISUAL_ID: - DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false); - cmd.add(new DestroyReferenceCommand(destroyRefReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - case TransitionEditPart.VISUAL_ID: - DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false); - cmd.add(new DestroyElementCommand(destroyEltReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - } - } - - cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true - // don't need explicit deletion of cnode as parent's view deletion would clean child views as well - // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode)); - break; - case FinalStateEditPart.VISUAL_ID: - - - - - - for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) { - Edge incomingLink = (Edge) it.next(); - switch (UMLVisualIDRegistry.getVisualID(incomingLink)) { - case CommentAnnotatedElementEditPart.VISUAL_ID: - case ConstraintConstrainedElementEditPart.VISUAL_ID: - case ContextLinkEditPart.VISUAL_ID: - DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false); - cmd.add(new DestroyReferenceCommand(destroyRefReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - case TransitionEditPart.VISUAL_ID: - DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false); - cmd.add(new DestroyElementCommand(destroyEltReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - } - } - - cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true - // don't need explicit deletion of cnode as parent's view deletion would clean child views as well - // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode)); - break; - case StateEditPart.VISUAL_ID: - - - - - - for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) { - Edge incomingLink = (Edge) it.next(); - switch (UMLVisualIDRegistry.getVisualID(incomingLink)) { - case CommentAnnotatedElementEditPart.VISUAL_ID: - case ConstraintConstrainedElementEditPart.VISUAL_ID: - case ContextLinkEditPart.VISUAL_ID: - DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false); - cmd.add(new DestroyReferenceCommand(destroyRefReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - case TransitionEditPart.VISUAL_ID: - DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false); - cmd.add(new DestroyElementCommand(destroyEltReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - } - } - - cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true - // don't need explicit deletion of cnode as parent's view deletion would clean child views as well - // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode)); - break; - case PseudostateEntryPointEditPart.VISUAL_ID: - - - - - - for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) { - Edge incomingLink = (Edge) it.next(); - switch (UMLVisualIDRegistry.getVisualID(incomingLink)) { - case CommentAnnotatedElementEditPart.VISUAL_ID: - case ConstraintConstrainedElementEditPart.VISUAL_ID: - DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false); - cmd.add(new DestroyReferenceCommand(destroyRefReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - case TransitionEditPart.VISUAL_ID: - DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false); - cmd.add(new DestroyElementCommand(destroyEltReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - } - } - - cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: false - // don't need explicit deletion of cnode as parent's view deletion would clean child views as well - // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode)); - break; - case PseudostateExitPointEditPart.VISUAL_ID: - - - - - - for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) { - Edge incomingLink = (Edge) it.next(); - switch (UMLVisualIDRegistry.getVisualID(incomingLink)) { - case CommentAnnotatedElementEditPart.VISUAL_ID: - case ConstraintConstrainedElementEditPart.VISUAL_ID: - DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false); - cmd.add(new DestroyReferenceCommand(destroyRefReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - case TransitionEditPart.VISUAL_ID: - DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false); - cmd.add(new DestroyElementCommand(destroyEltReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - } - } - - cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: false - // don't need explicit deletion of cnode as parent's view deletion would clean child views as well - // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode)); - break; - case CommentEditPart.VISUAL_ID: - - - - - - for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) { - Edge incomingLink = (Edge) it.next(); - switch (UMLVisualIDRegistry.getVisualID(incomingLink)) { - case CommentAnnotatedElementEditPart.VISUAL_ID: - case ConstraintConstrainedElementEditPart.VISUAL_ID: - DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false); - cmd.add(new DestroyReferenceCommand(destroyRefReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - } - } - - cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true - // don't need explicit deletion of cnode as parent's view deletion would clean child views as well - // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode)); - break; - case ConstraintEditPart.VISUAL_ID: - - - - - - for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) { - Edge incomingLink = (Edge) it.next(); - switch (UMLVisualIDRegistry.getVisualID(incomingLink)) { - case CommentAnnotatedElementEditPart.VISUAL_ID: - case ConstraintConstrainedElementEditPart.VISUAL_ID: - DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false); - cmd.add(new DestroyReferenceCommand(destroyRefReq)); - cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink)); - break; - } - } - - cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true - // don't need explicit deletion of cnode as parent's view deletion would clean child views as well - // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode)); - break; - } - } - break; - } - } - } - - /** - * @generated - */ - @Override - protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) { - Command command = req.getTarget() == null ? - getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req); - return command != null ? command : super.getCreateRelationshipCommand(req); - } - - /** - * @generated - */ - protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) { - IElementType requestElementType = req.getElementType(); - if (requestElementType == null) { - return null; - } - IElementType baseElementType = requestElementType; - if (requestElementType instanceof IExtendedHintedElementType) { - baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType); - if (baseElementType != null) { - } else { - // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs. - baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType); - } - } - if (UMLElementTypes.CommentAnnotatedElement_667 == baseElementType) { - return null; - } - if (UMLElementTypes.ConstraintConstrainedElement_670 == baseElementType) { - return null; - } - if (UMLElementTypes.ConstraintContext_8500 == baseElementType) { - return null; - } - return null; - } - - /** - * @generated - */ - protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) { - IElementType requestElementType = req.getElementType(); - if (requestElementType == null) { - return null; - } - IElementType baseElementType = requestElementType; - boolean isExtendedType = false; - if (requestElementType instanceof IExtendedHintedElementType) { - baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType); - if (baseElementType != null) { - isExtendedType = true; - } else { - // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs. - baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType); - isExtendedType = true; - } - } - return null; - } - - /** - * Returns command to reorient EReference based link. New link target or source - * should be the domain model element associated with this node. - * - * @generated - */ - @Override - protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) { - switch (getVisualID(req)) { - } - return super.getReorientReferenceRelationshipCommand(req); - } -} diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateItemSemanticEditPolicy.java deleted file mode 100644 index c99dce84ee2..00000000000 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/StateItemSemanticEditPolicy.java +++ /dev/null @@ -1,436 +0,0 @@ -/**
- * Copyright (c) 2014 CEA LIST.
- *
- * 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.statemachine.edit.policies;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.DeleteCommand;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.notation.Edge;
-import org.eclipse.gmf.runtime.notation.Node;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
-import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
-import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.CommentAnnotatedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ConnectionPointReferenceEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ConstraintConstrainedElementEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ContextLinkEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.DoActivityStateBehaviorStateEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.EntryStateBehaviorEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.ExitStateBehaviorEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.InternalTransitionEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateEntryPointEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.PseudostateExitPointEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.RegionEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.StateCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.edit.parts.TransitionEditPart;
-import org.eclipse.papyrus.uml.diagram.statemachine.part.UMLVisualIDRegistry;
-import org.eclipse.papyrus.uml.diagram.statemachine.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class StateItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
-
- /**
- * @generated
- */
- public StateItemSemanticEditPolicy() {
- super(UMLElementTypes.State_6000);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateCommand(CreateElementRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return super.getCreateCommand(req);
- }
- return super.getCreateCommand(req);
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getDestroyElementCommand(DestroyElementRequest req) {
- View view = (View) getHost().getModel();
- CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
- cmd.setTransactionNestingEnabled(true);
- EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
- if (annotation == null) {
- // there are indirectly referenced children, need extra commands: true
- addDestroyChildNodesCommand(cmd);
- addDestroyShortcutsCommand(cmd, view);
- // delete host element
- List<EObject> todestroy = new ArrayList<EObject>();
- todestroy.add(req.getElementToDestroy());
- // cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
- } else {
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
- }
- return getGEFWrapper(cmd.reduce());
- }
-
- /**
- * @generated
- */
- protected void addDestroyChildNodesCommand(ICompositeCommand cmd) {
- View view = (View) getHost().getModel();
- for (Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) {
- Node node = (Node) nit.next();
- switch (UMLVisualIDRegistry.getVisualID(node)) {
- case EntryStateBehaviorEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = node.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- }
- }
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), node.getElement(), false))); // directlyOwned: true
- // don't need explicit deletion of node as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
- break;
- case DoActivityStateBehaviorStateEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = node.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- }
- }
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), node.getElement(), false))); // directlyOwned: true
- // don't need explicit deletion of node as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
- break;
- case ExitStateBehaviorEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = node.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- }
- }
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), node.getElement(), false))); // directlyOwned: true
- // don't need explicit deletion of node as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
- break;
- case InternalTransitionEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = node.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- }
- }
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), node.getElement(), false))); // directlyOwned: true
- // don't need explicit deletion of node as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
- break;
- case RegionEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = node.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- case ContextLinkEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for (Iterator<?> it = node.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- }
- }
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), node.getElement(), false))); // directlyOwned: false
- // don't need explicit deletion of node as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
- break;
- case PseudostateEntryPointEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = node.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case TransitionEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), node.getElement(), false))); // directlyOwned: false
- // don't need explicit deletion of node as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
- break;
- case PseudostateExitPointEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = node.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case TransitionEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), node.getElement(), false))); // directlyOwned: false
- // don't need explicit deletion of node as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
- break;
- case ConnectionPointReferenceEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = node.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case TransitionEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), node.getElement(), false))); // directlyOwned: true
- // don't need explicit deletion of node as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
- break;
- case StateCompartmentEditPart.VISUAL_ID:
- for (Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
- Node cnode = (Node) cit.next();
- switch (UMLVisualIDRegistry.getVisualID(cnode)) {
- case RegionEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- case ContextLinkEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- for (Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
- Edge outgoingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(outgoingLink)) {
- }
- }
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: false
- // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
- break;
- case ConnectionPointReferenceEditPart.VISUAL_ID:
-
-
-
-
-
- for (Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
- Edge incomingLink = (Edge) it.next();
- switch (UMLVisualIDRegistry.getVisualID(incomingLink)) {
- case CommentAnnotatedElementEditPart.VISUAL_ID:
- case ConstraintConstrainedElementEditPart.VISUAL_ID:
- DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
- cmd.add(new DestroyReferenceCommand(destroyRefReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- case TransitionEditPart.VISUAL_ID:
- DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
- cmd.add(new DestroyElementCommand(destroyEltReq));
- cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
- break;
- }
- }
-
- cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
- // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
- break;
- }
- }
- break;
- }
- }
- }
-
- /**
- * @generated
- */
- @Override
- protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
- Command command = req.getTarget() == null ?
- getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
- return command != null ? command : super.getCreateRelationshipCommand(req);
- }
-
- /**
- * @generated
- */
- protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
- if (UMLElementTypes.CommentAnnotatedElement_667 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintConstrainedElement_670 == baseElementType) {
- return null;
- }
- if (UMLElementTypes.ConstraintContext_8500 == baseElementType) {
- return null;
- }
- return null;
- }
-
- /**
- * @generated
- */
- protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
- IElementType requestElementType = req.getElementType();
- if (requestElementType == null) {
- return null;
- }
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if (requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if (baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType) requestElementType);
- isExtendedType = true;
- }
- }
- return null;
- }
-
- /**
- * Returns command to reorient EClass based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
- switch (getVisualID(req)) {
- }
- return super.getReorientRelationshipCommand(req);
- }
-
- /**
- * Returns command to reorient EReference based link. New link target or source
- * should be the domain model element associated with this node.
- *
- * @generated
- */
- @Override
- protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
- switch (getVisualID(req)) {
- }
- return super.getReorientReferenceRelationshipCommand(req);
- }
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/UMLBaseItemSemanticEditPolicy.java index 8ce4d742ae9..1d3deb8b118 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/UMLBaseItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/UMLBaseItemSemanticEditPolicy.java @@ -454,14 +454,12 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { */
public boolean canCreateConstraintContext_8500(Constraint source, Namespace target) {
if (source != null) {
- if (source.getContext()
- != null) {
+ if (source.getContext() != null) {
return false;
}
}
if (target != null && (target.getOwnedRules()
- .contains(target)
- )) {
+ .contains(target))) {
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/UMLTextNonResizableEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/UMLTextNonResizableEditPolicy.java index d5c542dfcf6..62a687f160a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/UMLTextNonResizableEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/edit/policies/UMLTextNonResizableEditPolicy.java @@ -235,8 +235,7 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl */
@Override
protected List<?> createSelectionHandles() {
- MoveHandle moveHandle =
- new MoveHandle((GraphicalEditPart) getHost());
+ MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost());
moveHandle.setBorder(null);
moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
return Collections.singletonList(moveHandle);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/DiagramEditorContextMenuProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/DiagramEditorContextMenuProvider.java index ddc5f5d8894..d00555f3985 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/DiagramEditorContextMenuProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/DiagramEditorContextMenuProvider.java @@ -48,13 +48,13 @@ public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider TransactionUtil.getEditingDomain(
(EObject) getViewer().getContents().getModel()).runExclusive(new Runnable() {
- @Override
- public void run() {
- ContributionItemService.getInstance().contributeToPopupMenu(
- DiagramEditorContextMenuProvider.this, part);
- menu.remove(ActionIds.ACTION_DELETE_FROM_MODEL);
- }
- });
+ @Override
+ public void run() {
+ ContributionItemService.getInstance().contributeToPopupMenu(
+ DiagramEditorContextMenuProvider.this, part);
+ menu.remove(ActionIds.ACTION_DELETE_FROM_MODEL);
+ }
+ });
} catch (Exception e) {
UMLDiagramEditorPlugin.getInstance().logError("Error building context menu", e);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLCreationWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLCreationWizard.java index bf75e3752e5..786cbc630a1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLCreationWizard.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLCreationWizard.java @@ -103,7 +103,8 @@ public class UMLCreationWizard extends Wizard implements INewWizard { this.workbench = workbench;
this.selection = selection;
setWindowTitle(Messages.UMLCreationWizardTitle);
- setDefaultPageImageDescriptor(UMLDiagramEditorPlugin.getBundledImageDescriptor("icons/wizban/NewUMLWizard.gif")); //$NON-NLS-1$
+ setDefaultPageImageDescriptor(UMLDiagramEditorPlugin.getBundledImageDescriptor(
+ "icons/wizban/NewUMLWizard.gif")); //$NON-NLS-1$
setNeedsProgressMonitor(true);
}
@@ -112,12 +113,14 @@ public class UMLCreationWizard extends Wizard implements INewWizard { */
@Override
public void addPages() {
- diagramModelFilePage = new UMLCreationWizardPage("DiagramModelFile", getSelection(), "PapyrusUMLStateMachine_diagram"); //$NON-NLS-1$ //$NON-NLS-2$
+ diagramModelFilePage = new UMLCreationWizardPage(
+ "DiagramModelFile", getSelection(), "PapyrusUMLStateMachine_diagram"); //$NON-NLS-1$ //$NON-NLS-2$
diagramModelFilePage.setTitle(Messages.UMLCreationWizard_DiagramModelFilePageTitle);
diagramModelFilePage.setDescription(Messages.UMLCreationWizard_DiagramModelFilePageDescription);
addPage(diagramModelFilePage);
- domainModelFilePage = new UMLCreationWizardPage("DomainModelFile", getSelection(), "PapyrusUMLStateMachine") { //$NON-NLS-1$ //$NON-NLS-2$
+ domainModelFilePage = new UMLCreationWizardPage(
+ "DomainModelFile", getSelection(), "PapyrusUMLStateMachine") { //$NON-NLS-1$ //$NON-NLS-2$
@Override
public void setVisible(boolean visible) {
@@ -140,25 +143,24 @@ public class UMLCreationWizard extends Wizard implements INewWizard { */
@Override
public boolean performFinish() {
- IRunnableWithProgress op =
- new WorkspaceModifyOperation(null) {
-
- @Override
- protected void execute(IProgressMonitor monitor)
- throws CoreException, InterruptedException {
- diagram = UMLDiagramEditorUtil.createDiagram(diagramModelFilePage.getURI(),
- domainModelFilePage.getURI(),
- monitor);
- if (isOpenNewlyCreatedDiagramEditor() && diagram != null) {
- try {
- UMLDiagramEditorUtil.openDiagram(diagram);
- } catch (PartInitException e) {
- ErrorDialog.openError(getContainer().getShell(),
- Messages.UMLCreationWizardOpenEditorError, null, e.getStatus());
- }
- }
+ IRunnableWithProgress op = new WorkspaceModifyOperation(null) {
+
+ @Override
+ protected void execute(IProgressMonitor monitor)
+ throws CoreException, InterruptedException {
+ diagram = UMLDiagramEditorUtil.createDiagram(diagramModelFilePage.getURI(),
+ domainModelFilePage.getURI(),
+ monitor);
+ if (isOpenNewlyCreatedDiagramEditor() && diagram != null) {
+ try {
+ UMLDiagramEditorUtil.openDiagram(diagram);
+ } catch (PartInitException e) {
+ ErrorDialog.openError(getContainer().getShell(),
+ Messages.UMLCreationWizardOpenEditorError, null, e.getStatus());
}
- };
+ }
+ }
+ };
try {
getContainer().run(false, true, op);
} catch (InterruptedException e) {
@@ -169,7 +171,8 @@ public class UMLCreationWizard extends Wizard implements INewWizard { Messages.UMLCreationWizardCreationError, null,
((CoreException) e.getTargetException()).getStatus());
} else {
- UMLDiagramEditorPlugin.getInstance().logError("Error creating diagram", e.getTargetException()); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Error creating diagram", e.getTargetException()); //$NON-NLS-1$
}
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditor.java index cdfb96464fb..0ff2d9fe275 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditor.java @@ -225,8 +225,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh @Override
protected void configureGraphicalViewer() {
super.configureGraphicalViewer();
- DiagramEditorContextMenuProvider provider =
- new DiagramEditorContextMenuProvider(this, getDiagramGraphicalViewer());
+ DiagramEditorContextMenuProvider provider = new DiagramEditorContextMenuProvider(this, getDiagramGraphicalViewer());
getDiagramGraphicalViewer().setContextMenu(provider);
getSite().registerContextMenu(ActionIds.DIAGRAM_EDITOR_CONTEXT_MENU, provider, getDiagramGraphicalViewer());
}
@@ -395,7 +394,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh * whenever a key is released, and the Tool is in the proper state. Override
* to support pressing the enter key to create a shape or connection
* (between two selected shapes)
- *
+ *
* @param event
* the KeyEvent
* @return <code>true</code> if KeyEvent was handled in some way
@@ -445,7 +444,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh /**
* Override to support double-clicking a palette tool entry to create a
* shape or connection (between two selected shapes).
- *
+ *
* @see MouseListener#mouseDoubleClick(MouseEvent)
*/
@Override
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditorPlugin.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditorPlugin.java index 0fe9421233b..bcb0534a26a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditorPlugin.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditorPlugin.java @@ -142,9 +142,8 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin { * @generated
*/
public ImageDescriptor getItemImageDescriptor(Object item) {
- IItemLabelProvider labelProvider =
- (IItemLabelProvider) adapterFactory.adapt(
- item, IItemLabelProvider.class);
+ IItemLabelProvider labelProvider = (IItemLabelProvider) adapterFactory.adapt(
+ item, IItemLabelProvider.class);
if (labelProvider != null) {
return ExtendedImageRegistry.getInstance().getImageDescriptor(
labelProvider.getImage(item));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditorUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditorUtil.java index 5745a9884e3..d745c2b0f9f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditorUtil.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramEditorUtil.java @@ -179,23 +179,21 @@ public class UMLDiagramEditorUtil { }
/**
- * Create a new instance of domain element associated with canvas.
- * <!-- begin-user-doc -->
+ * Create a new instance of domain element associated with canvas.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @generated
- */
+ * @generated
+ */
private static Package createInitialModel() {
return UMLFactory.eINSTANCE.createPackage();
}
/**
- * Store model element in the resource.
- * <!-- begin-user-doc -->
+ * Store model element in the resource.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @generated
- */
+ * @generated
+ */
private static void attachModelToResource(Package model, Resource resource) {
resource.getContents().add(model);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramUpdater.java index f7fbcb52b63..7fa28ed715b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramUpdater.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDiagramUpdater.java @@ -88,7 +88,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { * @generated
*/
protected UMLDiagramUpdater() {
- // to prevent instantiation allowing the override
+ //to prevent instantiation allowing the override
}
/**
@@ -495,8 +495,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getStateMachine_2000ContainedLinks(View view) {
StateMachine modelElement = (StateMachine) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_19000
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_19000(modelElement));
return result;
}
@@ -506,8 +505,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getRegion_3000ContainedLinks(View view) {
Region modelElement = (Region) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Transition_7000
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Transition_7000(modelElement));
return result;
}
@@ -608,8 +606,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getComment_666ContainedLinks(View view) {
Comment modelElement = (Comment) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement));
return result;
}
@@ -619,10 +616,8 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getConstraint_668ContainedLinks(View view) {
Constraint modelElement = (Constraint) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_Context_8500
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_Context_8500(modelElement));
return result;
}
@@ -639,8 +634,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getBehavior_690ContainedLinks(View view) {
Behavior modelElement = (Behavior) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_19000
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_19000(modelElement));
return result;
}
@@ -650,8 +644,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getBehavior_691ContainedLinks(View view) {
Behavior modelElement = (Behavior) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_19000
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_19000(modelElement));
return result;
}
@@ -661,8 +654,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getBehavior_692ContainedLinks(View view) {
Behavior modelElement = (Behavior) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_19000
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_19000(modelElement));
return result;
}
@@ -687,14 +679,10 @@ public class UMLDiagramUpdater implements DiagramUpdater { StateMachine modelElement = (StateMachine) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Generalization_19000
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500
- (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_19000(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferencer));
return result;
}
@@ -705,12 +693,9 @@ public class UMLDiagramUpdater implements DiagramUpdater { Region modelElement = (Region) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferencer));
return result;
}
@@ -721,14 +706,10 @@ public class UMLDiagramUpdater implements DiagramUpdater { FinalState modelElement = (FinalState) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Transition_7000
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500
- (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Transition_7000(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferencer));
return result;
}
@@ -739,14 +720,10 @@ public class UMLDiagramUpdater implements DiagramUpdater { State modelElement = (State) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Transition_7000
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500
- (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Transition_7000(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferencer));
return result;
}
@@ -757,12 +734,9 @@ public class UMLDiagramUpdater implements DiagramUpdater { Pseudostate modelElement = (Pseudostate) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Transition_7000
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Transition_7000(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
return result;
}
@@ -773,12 +747,9 @@ public class UMLDiagramUpdater implements DiagramUpdater { Pseudostate modelElement = (Pseudostate) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Transition_7000
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Transition_7000(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
return result;
}
@@ -789,12 +760,9 @@ public class UMLDiagramUpdater implements DiagramUpdater { Pseudostate modelElement = (Pseudostate) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Transition_7000
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Transition_7000(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
return result;
}
@@ -805,12 +773,9 @@ public class UMLDiagramUpdater implements DiagramUpdater { Pseudostate modelElement = (Pseudostate) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Transition_7000
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Transition_7000(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
return result;
}
@@ -821,12 +786,9 @@ public class UMLDiagramUpdater implements DiagramUpdater { Pseudostate modelElement = (Pseudostate) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Transition_7000
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Transition_7000(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
return result;
}
@@ -837,12 +799,9 @@ public class UMLDiagramUpdater implements DiagramUpdater { Pseudostate modelElement = (Pseudostate) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Transition_7000
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Transition_7000(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
return result;
}
@@ -853,12 +812,9 @@ public class UMLDiagramUpdater implements DiagramUpdater { Pseudostate modelElement = (Pseudostate) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Transition_7000
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Transition_7000(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
return result;
}
@@ -869,12 +825,9 @@ public class UMLDiagramUpdater implements DiagramUpdater { Pseudostate modelElement = (Pseudostate) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Transition_7000
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Transition_7000(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
return result;
}
@@ -885,12 +838,9 @@ public class UMLDiagramUpdater implements DiagramUpdater { Pseudostate modelElement = (Pseudostate) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Transition_7000
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Transition_7000(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
return result;
}
@@ -901,12 +851,9 @@ public class UMLDiagramUpdater implements DiagramUpdater { Pseudostate modelElement = (Pseudostate) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Transition_7000
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Transition_7000(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
return result;
}
@@ -917,12 +864,9 @@ public class UMLDiagramUpdater implements DiagramUpdater { ConnectionPointReference modelElement = (ConnectionPointReference) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingTypeModelFacetLinks_Transition_7000
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Transition_7000(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
return result;
}
@@ -933,10 +877,8 @@ public class UMLDiagramUpdater implements DiagramUpdater { Comment modelElement = (Comment) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
return result;
}
@@ -947,10 +889,8 @@ public class UMLDiagramUpdater implements DiagramUpdater { Constraint modelElement = (Constraint) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
return result;
}
@@ -989,12 +929,9 @@ public class UMLDiagramUpdater implements DiagramUpdater { Transition modelElement = (Transition) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferencer));
return result;
}
@@ -1005,10 +942,8 @@ public class UMLDiagramUpdater implements DiagramUpdater { Generalization modelElement = (Generalization) view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement, crossReferencer));
- result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement, crossReferencer));
return result;
}
@@ -1018,8 +953,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getStateMachine_2000OutgoingLinks(View view) {
StateMachine modelElement = (StateMachine) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getContainedTypeModelFacetLinks_Generalization_19000
- (modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_19000(modelElement));
return result;
}
@@ -1036,8 +970,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getFinalState_5000OutgoingLinks(View view) {
FinalState modelElement = (FinalState) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000(modelElement));
return result;
}
@@ -1047,8 +980,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getState_6000OutgoingLinks(View view) {
State modelElement = (State) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000(modelElement));
return result;
}
@@ -1058,8 +990,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getPseudostate_8000OutgoingLinks(View view) {
Pseudostate modelElement = (Pseudostate) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000(modelElement));
return result;
}
@@ -1069,8 +1000,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getPseudostate_9000OutgoingLinks(View view) {
Pseudostate modelElement = (Pseudostate) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000(modelElement));
return result;
}
@@ -1080,8 +1010,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getPseudostate_10000OutgoingLinks(View view) {
Pseudostate modelElement = (Pseudostate) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000(modelElement));
return result;
}
@@ -1091,8 +1020,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getPseudostate_11000OutgoingLinks(View view) {
Pseudostate modelElement = (Pseudostate) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000(modelElement));
return result;
}
@@ -1102,8 +1030,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getPseudostate_12000OutgoingLinks(View view) {
Pseudostate modelElement = (Pseudostate) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000(modelElement));
return result;
}
@@ -1113,8 +1040,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getPseudostate_13000OutgoingLinks(View view) {
Pseudostate modelElement = (Pseudostate) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000(modelElement));
return result;
}
@@ -1124,8 +1050,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getPseudostate_14000OutgoingLinks(View view) {
Pseudostate modelElement = (Pseudostate) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000(modelElement));
return result;
}
@@ -1135,8 +1060,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getPseudostate_15000OutgoingLinks(View view) {
Pseudostate modelElement = (Pseudostate) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000(modelElement));
return result;
}
@@ -1146,8 +1070,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getPseudostate_16000OutgoingLinks(View view) {
Pseudostate modelElement = (Pseudostate) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000(modelElement));
return result;
}
@@ -1157,8 +1080,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getPseudostate_17000OutgoingLinks(View view) {
Pseudostate modelElement = (Pseudostate) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000(modelElement));
return result;
}
@@ -1168,8 +1090,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getConnectionPointReference_18000OutgoingLinks(View view) {
ConnectionPointReference modelElement = (ConnectionPointReference) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000
- (modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Transition_7000(modelElement));
return result;
}
@@ -1179,8 +1100,7 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getComment_666OutgoingLinks(View view) {
Comment modelElement = (Comment) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_667
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Comment_AnnotatedElement_667(modelElement));
return result;
}
@@ -1190,10 +1110,8 @@ public class UMLDiagramUpdater implements DiagramUpdater { public List<UMLLinkDescriptor> getConstraint_668OutgoingLinks(View view) {
Constraint modelElement = (Constraint) view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_670
- (modelElement));
- result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_Context_8500
- (modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_ConstrainedElement_670(modelElement));
+ result.addAll(getOutgoingFeatureModelFacetLinks_Constraint_Context_8500(modelElement));
return result;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDocumentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDocumentProvider.java index 4e7beaa89ca..bcdcddc5319 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDocumentProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLDocumentProvider.java @@ -79,7 +79,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
NLS.bind(
Messages.UMLDocumentProvider_IncorrectInputError,
- new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
IEditorInput editorInput = (IEditorInput) element;
@@ -100,7 +100,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
NLS.bind(
Messages.UMLDocumentProvider_IncorrectInputError,
- new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
IDocument document = createEmptyDocument();
@@ -217,7 +217,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi try {
@SuppressWarnings({ "rawtypes", "unchecked" })
Map<?, ?> options = new HashMap(GMFResourceFactory.getDefaultLoadOptions());
- // @see 171060
+ // @see 171060
// options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
resource.load(options);
} catch (IOException e) {
@@ -256,7 +256,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
NLS.bind(
Messages.UMLDocumentProvider_IncorrectInputError,
- new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
}
@@ -553,7 +553,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi info.stopResourceListening();
fireElementStateChanging(element);
try {
- monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); // "Saving diagram"
+ monitor.beginTask(Messages.UMLDocumentProvider_SaveDiagramTask, info.getResourceSet().getResources().size() + 1); //"Saving diagram"
for (Iterator<Resource> it = info.getLoadedResourcesIterator(); it.hasNext();) {
Resource nextResource = it.next();
monitor.setTaskName(NLS.bind(
@@ -591,7 +591,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi throw new CoreException(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, 0,
NLS.bind(
Messages.UMLDocumentProvider_IncorrectInputError,
- new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
+ new Object[] { element, "org.eclipse.ui.part.FileEditorInput", "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ //$NON-NLS-2$
null));
}
if (false == document instanceof IDiagramDocument) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLInitDiagramFileAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLInitDiagramFileAction.java index c19f8bb188e..66f58b0fa3a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLInitDiagramFileAction.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLInitDiagramFileAction.java @@ -63,8 +63,7 @@ public class UMLInitDiagramFileAction implements IObjectActionDelegate { if (selection instanceof IStructuredSelection == false || selection.isEmpty()) {
return;
}
- IFile file =
- (IFile) ((IStructuredSelection) selection).getFirstElement();
+ IFile file = (IFile) ((IStructuredSelection) selection).getFirstElement();
domainModelURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
action.setEnabled(true);
}
@@ -81,8 +80,7 @@ public class UMLInitDiagramFileAction implements IObjectActionDelegate { */
@Override
public void run(IAction action) {
- TransactionalEditingDomain editingDomain =
- WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain();
+ TransactionalEditingDomain editingDomain = WorkspaceEditingDomainFactory.INSTANCE.createEditingDomain();
ResourceSet resourceSet = editingDomain.getResourceSet();
EObject diagramRoot = null;
try {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLNewDiagramFileWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLNewDiagramFileWizard.java index e0a32679fe8..039a0212da0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLNewDiagramFileWizard.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLNewDiagramFileWizard.java @@ -68,8 +68,7 @@ public class UMLNewDiagramFileWizard extends Wizard { assert diagramRoot != null : "Doagram root element must be specified"; //$NON-NLS-1$
assert editingDomain != null : "Editing domain must be specified"; //$NON-NLS-1$
- myFileCreationPage = new WizardNewFileCreationPage
- (Messages.UMLNewDiagramFileWizard_CreationPageName, StructuredSelection.EMPTY);
+ myFileCreationPage = new WizardNewFileCreationPage(Messages.UMLNewDiagramFileWizard_CreationPageName, StructuredSelection.EMPTY);
myFileCreationPage.setTitle(Messages.UMLNewDiagramFileWizard_CreationPageTitle);
myFileCreationPage.setDescription(NLS.bind(
Messages.UMLNewDiagramFileWizard_CreationPageDescription,
@@ -117,39 +116,39 @@ public class UMLNewDiagramFileWizard extends Wizard { URI diagramModelURI = URI.createPlatformResourceURI(diagramFile.getFullPath().toString(), true);
ResourceSet resourceSet = myEditingDomain.getResourceSet();
final Resource diagramResource = resourceSet.createResource(diagramModelURI);
- AbstractTransactionalCommand command =
- new AbstractTransactionalCommand(
- myEditingDomain, Messages.UMLNewDiagramFileWizard_InitDiagramCommand, affectedFiles) {
+ AbstractTransactionalCommand command = new AbstractTransactionalCommand(
+ myEditingDomain, Messages.UMLNewDiagramFileWizard_InitDiagramCommand, affectedFiles) {
- @Override
- protected CommandResult doExecuteWithResult(
- IProgressMonitor monitor, IAdaptable info)
+ @Override
+ protected CommandResult doExecuteWithResult(
+ IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- int diagramVID = UMLVisualIDRegistry.getDiagramVisualID(diagramRootElementSelectionPage.getModelElement());
- if (diagramVID != PackageEditPart.VISUAL_ID) {
- return CommandResult.newErrorCommandResult(
- Messages.UMLNewDiagramFileWizard_IncorrectRootError);
- }
- Diagram diagram =
- ViewService.createDiagram(
- diagramRootElementSelectionPage.getModelElement(), PackageEditPart.MODEL_ID,
- UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
- diagramResource.getContents().add(diagram);
- return CommandResult.newOKCommandResult();
- }
- };
+ int diagramVID = UMLVisualIDRegistry.getDiagramVisualID(diagramRootElementSelectionPage.getModelElement());
+ if (diagramVID != PackageEditPart.VISUAL_ID) {
+ return CommandResult.newErrorCommandResult(
+ Messages.UMLNewDiagramFileWizard_IncorrectRootError);
+ }
+ Diagram diagram = ViewService.createDiagram(
+ diagramRootElementSelectionPage.getModelElement(), PackageEditPart.MODEL_ID,
+ UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
+ diagramResource.getContents().add(diagram);
+ return CommandResult.newOKCommandResult();
+ }
+ };
try {
OperationHistoryFactory.getOperationHistory().execute(
command, new NullProgressMonitor(), null);
diagramResource.save(UMLDiagramEditorUtil.getSaveOptions());
UMLDiagramEditorUtil.openDiagram(diagramResource);
} catch (ExecutionException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to create model and diagram", e); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Unable to create model and diagram", e); //$NON-NLS-1$
} catch (IOException ex) {
UMLDiagramEditorPlugin.getInstance().logError(
"Save operation failed for: " + diagramModelURI, ex); //$NON-NLS-1$
} catch (PartInitException ex) {
- UMLDiagramEditorPlugin.getInstance().logError("Unable to open editor", ex); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Unable to open editor", ex); //$NON-NLS-1$
}
return true;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLVisualIDRegistry.java index d1ca77af91f..0d56f8849a6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLVisualIDRegistry.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/UMLVisualIDRegistry.java @@ -596,10 +596,9 @@ public class UMLVisualIDRegistry { private static boolean isPseudostate_8000(View containerView, Pseudostate domainElement) {
// Test if the pseudostate is an initial
if (domainElement instanceof Pseudostate) {
- PseudostateKind kind = domainElement.getKind();
- if (kind.equals(PseudostateKind.INITIAL_LITERAL)) {
+ PseudostateKind kind = ((Pseudostate) domainElement).getKind();
+ if (kind.equals(PseudostateKind.INITIAL_LITERAL))
return true;
- }
}
return false;
}
@@ -610,10 +609,9 @@ public class UMLVisualIDRegistry { private static boolean isPseudostate_9000(View containerView, Pseudostate domainElement) {
// Test if the pseudostate is a join
if (domainElement instanceof Pseudostate) {
- PseudostateKind kind = domainElement.getKind();
- if (kind.equals(PseudostateKind.JOIN_LITERAL)) {
+ PseudostateKind kind = ((Pseudostate) domainElement).getKind();
+ if (kind.equals(PseudostateKind.JOIN_LITERAL))
return true;
- }
}
return false;
}
@@ -624,10 +622,9 @@ public class UMLVisualIDRegistry { private static boolean isPseudostate_10000(View containerView, Pseudostate domainElement) {
// Test if the pseudostate is a fork
if (domainElement instanceof Pseudostate) {
- PseudostateKind kind = domainElement.getKind();
- if (kind.equals(PseudostateKind.FORK_LITERAL)) {
+ PseudostateKind kind = ((Pseudostate) domainElement).getKind();
+ if (kind.equals(PseudostateKind.FORK_LITERAL))
return true;
- }
}
return false;
}
@@ -638,10 +635,9 @@ public class UMLVisualIDRegistry { private static boolean isPseudostate_11000(View containerView, Pseudostate domainElement) {
// Test if the pseudostate is a choice
if (domainElement instanceof Pseudostate) {
- PseudostateKind kind = domainElement.getKind();
- if (kind.equals(PseudostateKind.CHOICE_LITERAL)) {
+ PseudostateKind kind = ((Pseudostate) domainElement).getKind();
+ if (kind.equals(PseudostateKind.CHOICE_LITERAL))
return true;
- }
}
return false;
}
@@ -652,10 +648,9 @@ public class UMLVisualIDRegistry { private static boolean isPseudostate_12000(View containerView, Pseudostate domainElement) {
// Test if the pseudostate is a junction
if (domainElement instanceof Pseudostate) {
- PseudostateKind kind = domainElement.getKind();
- if (kind.equals(PseudostateKind.JUNCTION_LITERAL)) {
+ PseudostateKind kind = ((Pseudostate) domainElement).getKind();
+ if (kind.equals(PseudostateKind.JUNCTION_LITERAL))
return true;
- }
}
return false;
}
@@ -666,10 +661,9 @@ public class UMLVisualIDRegistry { private static boolean isPseudostate_13000(View containerView, Pseudostate domainElement) {
// Test if the pseudostate is a shallowHistory
if (domainElement instanceof Pseudostate) {
- PseudostateKind kind = domainElement.getKind();
- if (kind.equals(PseudostateKind.SHALLOW_HISTORY_LITERAL)) {
+ PseudostateKind kind = ((Pseudostate) domainElement).getKind();
+ if (kind.equals(PseudostateKind.SHALLOW_HISTORY_LITERAL))
return true;
- }
}
return false;
}
@@ -680,10 +674,9 @@ public class UMLVisualIDRegistry { private static boolean isPseudostate_14000(View containerView, Pseudostate domainElement) {
// Test if the pseudostate is a deepHistory
if (domainElement instanceof Pseudostate) {
- PseudostateKind kind = domainElement.getKind();
- if (kind.equals(PseudostateKind.DEEP_HISTORY_LITERAL)) {
+ PseudostateKind kind = ((Pseudostate) domainElement).getKind();
+ if (kind.equals(PseudostateKind.DEEP_HISTORY_LITERAL))
return true;
- }
}
return false;
}
@@ -694,10 +687,9 @@ public class UMLVisualIDRegistry { private static boolean isPseudostate_15000(View containerView, Pseudostate domainElement) {
// Test if the pseudostate is a terminate
if (domainElement instanceof Pseudostate) {
- PseudostateKind kind = domainElement.getKind();
- if (kind.equals(PseudostateKind.TERMINATE_LITERAL)) {
+ PseudostateKind kind = ((Pseudostate) domainElement).getKind();
+ if (kind.equals(PseudostateKind.TERMINATE_LITERAL))
return true;
- }
}
return false;
}
@@ -708,10 +700,9 @@ public class UMLVisualIDRegistry { private static boolean isPseudostate_16000(View containerView, Pseudostate domainElement) {
// Test if the pseudostate is an entryPoint
if (domainElement instanceof Pseudostate) {
- PseudostateKind kind = domainElement.getKind();
- if (kind.equals(PseudostateKind.ENTRY_POINT_LITERAL)) {
+ PseudostateKind kind = ((Pseudostate) domainElement).getKind();
+ if (kind.equals(PseudostateKind.ENTRY_POINT_LITERAL))
return true;
- }
}
return false;
}
@@ -722,10 +713,9 @@ public class UMLVisualIDRegistry { private static boolean isPseudostate_17000(View containerView, Pseudostate domainElement) {
// Test if the pseudostate is an exitPoint
if (domainElement instanceof Pseudostate) {
- PseudostateKind kind = domainElement.getKind();
- if (kind.equals(PseudostateKind.EXIT_POINT_LITERAL)) {
+ PseudostateKind kind = ((Pseudostate) domainElement).getKind();
+ if (kind.equals(PseudostateKind.EXIT_POINT_LITERAL))
return true;
- }
}
return false;
}
@@ -759,7 +749,7 @@ public class UMLVisualIDRegistry { */
public static boolean checkNodeVisualID(View containerView, EObject domainElement, int candidate) {
if (candidate == -1) {
- // unrecognized id is always bad
+ //unrecognized id is always bad
return false;
}
int basic = getNodeVisualID(containerView, domainElement);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/ValidateAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/ValidateAction.java index 156f998d2fb..3130207737e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/ValidateAction.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/part/ValidateAction.java @@ -86,7 +86,7 @@ public class ValidateAction extends Action { runValidation(part.getDiagramEditPart(), part.getDiagram());
}
})
- .run(new NullProgressMonitor());
+ .run(new NullProgressMonitor());
} catch (Exception e) {
UMLDiagramEditorPlugin.getInstance().logError("Validation action failed", e); //$NON-NLS-1$
}
@@ -102,14 +102,14 @@ public class ValidateAction extends Action { IEditorPart editorPart = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (editorPart instanceof IDiagramWorkbenchPart) {
- runValidation(((IDiagramWorkbenchPart) editorPart).
- getDiagramEditPart(), view);
+ runValidation(((IDiagramWorkbenchPart) editorPart).getDiagramEditPart(), view);
} else {
runNonUIValidation(view);
}
}
} catch (Exception e) {
- UMLDiagramEditorPlugin.getInstance().logError("Validation action failed", e); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Validation action failed", e); //$NON-NLS-1$
}
}
@@ -122,9 +122,8 @@ public class ValidateAction extends Action { shell = new Shell();
}
- DiagramEditPart diagramEditPart =
- OffscreenEditPartFactory.getInstance().createDiagramEditPart(
- view.getDiagram(), shell);
+ DiagramEditPart diagramEditPart = OffscreenEditPartFactory.getInstance().createDiagramEditPart(
+ view.getDiagram(), shell);
runValidation(diagramEditPart, view);
}
@@ -164,17 +163,14 @@ public class ValidateAction extends Action { * @generated
*/
private static void validate(DiagramEditPart diagramEditPart, View view) {
- IFile target = view.eResource() != null ?
- WorkspaceSynchronizer.getFile(view.eResource()) : null;
+ IFile target = view.eResource() != null ? WorkspaceSynchronizer.getFile(view.eResource()) : null;
if (target != null) {
UMLMarkerNavigationProvider.deleteMarkers(target);
}
Diagnostic diagnostic = runEMFValidator(view);
createMarkers(target, diagnostic, diagramEditPart);
- IBatchValidator validator =
- (IBatchValidator)
- ModelValidationService.getInstance().newValidator(
- EvaluationMode.BATCH);
+ IBatchValidator validator = (IBatchValidator) ModelValidationService.getInstance().newValidator(
+ EvaluationMode.BATCH);
validator.setIncludeLiveConstraints(true);
if (view.isSetElement() && view.getElement() != null) {
IStatus status = validator.validate(view.getElement());
@@ -185,8 +181,7 @@ public class ValidateAction extends Action { /**
* @generated
*/
- private static void createMarkers(IFile
- target, IStatus validationStatus, DiagramEditPart diagramEditPart) {
+ private static void createMarkers(IFile target, IStatus validationStatus, DiagramEditPart diagramEditPart) {
if (validationStatus.isOK()) {
return;
}
@@ -196,8 +191,7 @@ public class ValidateAction extends Action { diagramEditPart.getDiagramView(),
collectTargetElements(rootStatus, new HashSet<EObject>(), allStatuses));
for (Iterator it = allStatuses.iterator(); it.hasNext();) {
- IConstraintStatus nextStatus =
- (IConstraintStatus) it.next();
+ IConstraintStatus nextStatus = (IConstraintStatus) it.next();
View view = UMLDiagramEditorUtil.findView(
diagramEditPart, nextStatus.getTarget(), element2ViewMap);
addMarker(diagramEditPart.getViewer(), target, view.eResource().getURIFragment(view),
@@ -209,17 +203,15 @@ public class ValidateAction extends Action { /**
* @generated
*/
- private static void createMarkers(IFile
- target, Diagnostic emfValidationStatus, DiagramEditPart diagramEditPart) {
+ private static void createMarkers(IFile target, Diagnostic emfValidationStatus, DiagramEditPart diagramEditPart) {
if (emfValidationStatus.getSeverity() == Diagnostic.OK) {
return;
}
final Diagnostic rootStatus = emfValidationStatus;
List<Diagnostic> allDiagnostics = new ArrayList<Diagnostic>();
- UMLDiagramEditorUtil.LazyElement2ViewMap element2ViewMap =
- new UMLDiagramEditorUtil.LazyElement2ViewMap(
- diagramEditPart.getDiagramView(),
- collectTargetElements(rootStatus, new HashSet<EObject>(), allDiagnostics));
+ UMLDiagramEditorUtil.LazyElement2ViewMap element2ViewMap = new UMLDiagramEditorUtil.LazyElement2ViewMap(
+ diagramEditPart.getDiagramView(),
+ collectTargetElements(rootStatus, new HashSet<EObject>(), allDiagnostics));
for (Iterator<Diagnostic> it = emfValidationStatus.getChildren().iterator(); it.hasNext();) {
Diagnostic nextDiagnostic = it.next();
List<?> data = nextDiagnostic.getData();
@@ -237,8 +229,7 @@ public class ValidateAction extends Action { /**
* @generated
*/
- private static void addMarker(EditPartViewer viewer, IFile
- target, String elementId, String location, String message, int statusSeverity) {
+ private static void addMarker(EditPartViewer viewer, IFile target, String elementId, String location, String message, int statusSeverity) {
if (target == null) {
return;
}
@@ -293,8 +284,7 @@ public class ValidateAction extends Action { }
if (diagnostic.getChildren() != null && !diagnostic.getChildren().isEmpty()) {
for (Iterator<Diagnostic> it = diagnostic.getChildren().iterator(); it.hasNext();) {
- collectTargetElements(it.next(),
- targetElementCollector, allDiagnostics);
+ collectTargetElements(it.next(), targetElementCollector, allDiagnostics);
}
}
return targetElementCollector;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/preferences/DiagramPreferenceInitializer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/preferences/DiagramPreferenceInitializer.java index 43ad1455a17..1d15aef6edb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/preferences/DiagramPreferenceInitializer.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/preferences/DiagramPreferenceInitializer.java @@ -31,11 +31,11 @@ public class DiagramPreferenceInitializer extends AbstractPreferenceInitializer @Override
public void initializeDefaultPreferences() {
IPreferenceStore store = getPreferenceStore();
- DiagramsPreferencePage.initDefaults(store);
- AppearancePreferencePage.initDefaults(store);
- ConnectionsPreferencePage.initDefaults(store);
- PrintingPreferencePage.initDefaults(store);
- RulerGridPreferencePage.initDefaults(store);
+ DiagramGeneralPreferencePage.initDefaults(store);
+ DiagramAppearancePreferencePage.initDefaults(store);
+ DiagramConnectionsPreferencePage.initDefaults(store);
+ DiagramPrintingPreferencePage.initDefaults(store);
+ DiagramRulersAndGridPreferencePage.initDefaults(store);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/ElementInitializers.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/ElementInitializers.java index 2a4c1cca168..3f2ba812048 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/ElementInitializers.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/ElementInitializers.java @@ -46,8 +46,7 @@ public class ElementInitializers { Object value_0 = name_StateMachine_2000(instance);
if (value_0 != null) {
instance.setName(
- (String) value_0
- );
+ (String) value_0);
}
Region newInstance_1_0 = UMLFactory.eINSTANCE.createRegion();
instance.getRegions()
@@ -55,8 +54,7 @@ public class ElementInitializers { Object value_1_0_0 = name_region_StateMachine_2000(newInstance_1_0);
if (value_1_0_0 != null) {
newInstance_1_0.setName(
- (String) value_1_0_0
- );
+ (String) value_1_0_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -71,8 +69,7 @@ public class ElementInitializers { Object value_0 = name_Region_3000(instance);
if (value_0 != null) {
instance.setName(
- (String) value_0
- );
+ (String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -87,8 +84,7 @@ public class ElementInitializers { Object value_0 = name_FinalState_5000(instance);
if (value_0 != null) {
instance.setName(
- (String) value_0
- );
+ (String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -103,8 +99,7 @@ public class ElementInitializers { Object value_0 = name_State_6000(instance);
if (value_0 != null) {
instance.setName(
- (String) value_0
- );
+ (String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -121,14 +116,12 @@ public class ElementInitializers { value_0 = UMLAbstractExpression.performCast(value_0, UMLPackage.eINSTANCE.getPseudostateKind());
instance.setKind(
- (PseudostateKind) value_0
- );
+ (PseudostateKind) value_0);
}
Object value_1 = name_Pseudostate_8000(instance);
if (value_1 != null) {
instance.setName(
- (String) value_1
- );
+ (String) value_1);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -145,14 +138,12 @@ public class ElementInitializers { value_0 = UMLAbstractExpression.performCast(value_0, UMLPackage.eINSTANCE.getPseudostateKind());
instance.setKind(
- (PseudostateKind) value_0
- );
+ (PseudostateKind) value_0);
}
Object value_1 = name_Pseudostate_9000(instance);
if (value_1 != null) {
instance.setName(
- (String) value_1
- );
+ (String) value_1);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -169,14 +160,12 @@ public class ElementInitializers { value_0 = UMLAbstractExpression.performCast(value_0, UMLPackage.eINSTANCE.getPseudostateKind());
instance.setKind(
- (PseudostateKind) value_0
- );
+ (PseudostateKind) value_0);
}
Object value_1 = name_Pseudostate_10000(instance);
if (value_1 != null) {
instance.setName(
- (String) value_1
- );
+ (String) value_1);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -193,14 +182,12 @@ public class ElementInitializers { value_0 = UMLAbstractExpression.performCast(value_0, UMLPackage.eINSTANCE.getPseudostateKind());
instance.setKind(
- (PseudostateKind) value_0
- );
+ (PseudostateKind) value_0);
}
Object value_1 = name_Pseudostate_11000(instance);
if (value_1 != null) {
instance.setName(
- (String) value_1
- );
+ (String) value_1);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -217,14 +204,12 @@ public class ElementInitializers { value_0 = UMLAbstractExpression.performCast(value_0, UMLPackage.eINSTANCE.getPseudostateKind());
instance.setKind(
- (PseudostateKind) value_0
- );
+ (PseudostateKind) value_0);
}
Object value_1 = name_Pseudostate_12000(instance);
if (value_1 != null) {
instance.setName(
- (String) value_1
- );
+ (String) value_1);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -241,14 +226,12 @@ public class ElementInitializers { value_0 = UMLAbstractExpression.performCast(value_0, UMLPackage.eINSTANCE.getPseudostateKind());
instance.setKind(
- (PseudostateKind) value_0
- );
+ (PseudostateKind) value_0);
}
Object value_1 = name_Pseudostate_13000(instance);
if (value_1 != null) {
instance.setName(
- (String) value_1
- );
+ (String) value_1);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -265,14 +248,12 @@ public class ElementInitializers { value_0 = UMLAbstractExpression.performCast(value_0, UMLPackage.eINSTANCE.getPseudostateKind());
instance.setKind(
- (PseudostateKind) value_0
- );
+ (PseudostateKind) value_0);
}
Object value_1 = name_Pseudostate_14000(instance);
if (value_1 != null) {
instance.setName(
- (String) value_1
- );
+ (String) value_1);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -289,14 +270,12 @@ public class ElementInitializers { value_0 = UMLAbstractExpression.performCast(value_0, UMLPackage.eINSTANCE.getPseudostateKind());
instance.setKind(
- (PseudostateKind) value_0
- );
+ (PseudostateKind) value_0);
}
Object value_1 = name_Pseudostate_15000(instance);
if (value_1 != null) {
instance.setName(
- (String) value_1
- );
+ (String) value_1);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -313,14 +292,12 @@ public class ElementInitializers { value_0 = UMLAbstractExpression.performCast(value_0, UMLPackage.eINSTANCE.getPseudostateKind());
instance.setKind(
- (PseudostateKind) value_0
- );
+ (PseudostateKind) value_0);
}
Object value_1 = name_Pseudostate_16000(instance);
if (value_1 != null) {
instance.setName(
- (String) value_1
- );
+ (String) value_1);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -337,14 +314,12 @@ public class ElementInitializers { value_0 = UMLAbstractExpression.performCast(value_0, UMLPackage.eINSTANCE.getPseudostateKind());
instance.setKind(
- (PseudostateKind) value_0
- );
+ (PseudostateKind) value_0);
}
Object value_1 = name_Pseudostate_17000(instance);
if (value_1 != null) {
instance.setName(
- (String) value_1
- );
+ (String) value_1);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -359,8 +334,7 @@ public class ElementInitializers { Object value_0 = name_ConnectionPointReference_18000(instance);
if (value_0 != null) {
instance.setName(
- (String) value_0
- );
+ (String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -375,8 +349,7 @@ public class ElementInitializers { Object value_0 = body_Comment_666(instance);
if (value_0 != null) {
instance.setBody(
- (String) value_0
- );
+ (String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -391,14 +364,12 @@ public class ElementInitializers { Object value_0 = name_Constraint_668(instance);
if (value_0 != null) {
instance.setName(
- (String) value_0
- );
+ (String) value_0);
}
Object value_1 = specification_Constraint_668(instance);
if (value_1 != null) {
instance.setSpecification(
- (ValueSpecification) value_1
- );
+ (ValueSpecification) value_1);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -413,8 +384,7 @@ public class ElementInitializers { Object value_0 = name_Transition_680(instance);
if (value_0 != null) {
instance.setName(
- (String) value_0
- );
+ (String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
@@ -429,8 +399,7 @@ public class ElementInitializers { Object value_0 = name_Transition_7000(instance);
if (value_0 != null) {
instance.setName(
- (String) value_0
- );
+ (String) value_0);
}
} catch (RuntimeException e) {
UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLMarkerNavigationProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLMarkerNavigationProvider.java index 35ebfe5258a..91a522c3d00 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLMarkerNavigationProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLMarkerNavigationProvider.java @@ -45,8 +45,7 @@ public class UMLMarkerNavigationProvider extends AbstractModelMarkerNavigationPr if (elementId == null || !(getEditor() instanceof DiagramEditor)) {
return;
}
- DiagramEditor editor =
- (DiagramEditor) getEditor();
+ DiagramEditor editor = (DiagramEditor) getEditor();
Map<?, ?> editPartRegistry = editor.getDiagramGraphicalViewer().getEditPartRegistry();
EObject targetView = editor.getDiagram().eResource().getEObject(elementId);
if (targetView == null) {
@@ -66,7 +65,8 @@ public class UMLMarkerNavigationProvider extends AbstractModelMarkerNavigationPr try {
resource.deleteMarkers(MARKER_TYPE, true, IResource.DEPTH_ZERO);
} catch (CoreException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Failed to delete validation markers", e); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Failed to delete validation markers", e); //$NON-NLS-1$
}
}
@@ -83,13 +83,13 @@ public class UMLMarkerNavigationProvider extends AbstractModelMarkerNavigationPr int markerSeverity = IMarker.SEVERITY_INFO;
if (statusSeverity == IStatus.WARNING) {
markerSeverity = IMarker.SEVERITY_WARNING;
- } else if (statusSeverity == IStatus.ERROR ||
- statusSeverity == IStatus.CANCEL) {
+ } else if (statusSeverity == IStatus.ERROR || statusSeverity == IStatus.CANCEL) {
markerSeverity = IMarker.SEVERITY_ERROR;
}
marker.setAttribute(IMarker.SEVERITY, markerSeverity);
} catch (CoreException e) {
- UMLDiagramEditorPlugin.getInstance().logError("Failed to create validation marker", e); //$NON-NLS-1$
+ UMLDiagramEditorPlugin.getInstance().logError(
+ "Failed to create validation marker", e); //$NON-NLS-1$
}
return marker;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLParserProvider.java index 572ec5137cf..d73be81dc39 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLParserProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLParserProvider.java @@ -90,8 +90,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getStateMachineName_2001Parser() {
if (stateMachineName_2001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
stateMachineName_2001Parser = parser;
}
@@ -109,8 +108,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getFinalStateName_5001Parser() {
if (finalStateName_5001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
finalStateName_5001Parser = parser;
}
@@ -143,8 +141,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getStateName_6001Parser() {
if (stateName_6001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
stateName_6001Parser = parser;
}
@@ -162,8 +159,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getStateName_19003Parser() {
if (stateName_19003Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
stateName_19003Parser = parser;
}
@@ -181,8 +177,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getPseudostateName_8001Parser() {
if (pseudostateName_8001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
pseudostateName_8001Parser = parser;
}
@@ -215,8 +210,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getPseudostateName_9001Parser() {
if (pseudostateName_9001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
pseudostateName_9001Parser = parser;
}
@@ -249,8 +243,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getPseudostateName_10001Parser() {
if (pseudostateName_10001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
pseudostateName_10001Parser = parser;
}
@@ -283,8 +276,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getPseudostateName_11001Parser() {
if (pseudostateName_11001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
pseudostateName_11001Parser = parser;
}
@@ -317,8 +309,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getPseudostateName_12001Parser() {
if (pseudostateName_12001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
pseudostateName_12001Parser = parser;
}
@@ -351,8 +342,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getPseudostateName_13001Parser() {
if (pseudostateName_13001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
pseudostateName_13001Parser = parser;
}
@@ -385,8 +375,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getPseudostateName_14001Parser() {
if (pseudostateName_14001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
pseudostateName_14001Parser = parser;
}
@@ -419,8 +408,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getPseudostateName_15001Parser() {
if (pseudostateName_15001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
pseudostateName_15001Parser = parser;
}
@@ -453,8 +441,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getPseudostateName_16001Parser() {
if (pseudostateName_16001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
pseudostateName_16001Parser = parser;
}
@@ -487,8 +474,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getPseudostateName_17001Parser() {
if (pseudostateName_17001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
pseudostateName_17001Parser = parser;
}
@@ -521,8 +507,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getConnectionPointReferenceName_18001Parser() {
if (connectionPointReferenceName_18001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
connectionPointReferenceName_18001Parser = parser;
}
@@ -570,8 +555,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getConstraintName_6668Parser() {
if (constraintName_6668Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
constraintName_6668Parser = parser;
}
@@ -664,8 +648,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getTransitionName_7001Parser() {
if (transitionName_7001Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
transitionName_7001Parser = parser;
}
@@ -713,8 +696,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getGeneralizationIsSubstitutable_19002Parser() {
if (generalizationIsSubstitutable_19002Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getGeneralization_IsSubstitutable()
- };
+ UMLPackage.eINSTANCE.getGeneralization_IsSubstitutable() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("<<{0}>>"); //$NON-NLS-1$
parser.setEditorPattern("<<{0}>>"); //$NON-NLS-1$
@@ -735,8 +717,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid private IParser getConstraintContextName_8501Parser() {
if (constraintContextName_8501Parser == null) {
EAttribute[] features = new EAttribute[] {
- UMLPackage.eINSTANCE.getNamedElement_Name()
- };
+ UMLPackage.eINSTANCE.getNamedElement_Name() };
MessageFormatParser parser = new MessageFormatParser(features);
parser.setViewPattern("<<{0}>>"); //$NON-NLS-1$
parser.setEditorPattern("<<{0}>>"); //$NON-NLS-1$
@@ -873,8 +854,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid if (vid != null) {
return getParser(UMLVisualIDRegistry.getVisualID(vid));
}
- View view =
- (View) hint.getAdapter(View.class);
+ View view = (View) hint.getAdapter(View.class);
if (view != null) {
return getParser(UMLVisualIDRegistry.getVisualID(view));
}
@@ -887,8 +867,7 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid @Override
public boolean provides(IOperation operation) {
if (operation instanceof GetParserOperation) {
- IAdaptable hint =
- ((GetParserOperation) operation).getHint();
+ IAdaptable hint = ((GetParserOperation) operation).getHint();
if (UMLElementTypes.getElement(hint) == null) {
return false;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLValidationDecoratorProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLValidationDecoratorProvider.java index e463502fbd0..1467c728ca0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLValidationDecoratorProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLValidationDecoratorProvider.java @@ -38,8 +38,7 @@ public class UMLValidationDecoratorProvider extends ValidationDecoratorProvider @Override
public void createDecorators(IDecoratorTarget decoratorTarget) {
EditPart editPart = (EditPart) decoratorTarget.getAdapter(EditPart.class);
- if (editPart instanceof GraphicalEditPart ||
- editPart instanceof AbstractConnectionEditPart) {
+ if (editPart instanceof GraphicalEditPart || editPart instanceof AbstractConnectionEditPart) {
Object model = editPart.getModel();
if ((model instanceof View)) {
View view = (View) model;
@@ -65,8 +64,7 @@ public class UMLValidationDecoratorProvider extends ValidationDecoratorProvider if (!(operation instanceof CreateDecoratorsOperation)) {
return false;
}
- IDecoratorTarget decoratorTarget =
- ((CreateDecoratorsOperation) operation).getDecoratorTarget();
+ IDecoratorTarget decoratorTarget = ((CreateDecoratorsOperation) operation).getDecoratorTarget();
View view = (View) decoratorTarget.getAdapter(
View.class);
return view != null && PackageEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLViewProvider.java index f115255b36b..c90a555eca7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLViewProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/providers/UMLViewProvider.java @@ -156,10 +156,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { protected boolean provides(CreateViewForKindOperation op) {
/*
if (op.getViewKind() == Node.class)
- return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ return getNodeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
if (op.getViewKind() == Edge.class)
- return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
- */
+ return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
+ */
// check Diagram Type should be the class diagram
String modelID = UMLVisualIDRegistry.getModelID(op.getContainerView());
@@ -180,13 +180,13 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { */
protected String getDiagramProvidedId() {
/*
- * Indicates for which diagram this provider works for.
- * <p>
- * This method can be overloaded when diagram editor inherits from another one, but should never be <code>null</code>
- * </p>
- *
- * @return the unique identifier of the diagram for which views are provided.
- */
+ * Indicates for which diagram this provider works for.
+ * <p>
+ * This method can be overloaded when diagram editor inherits from another one, but should never be <code>null</code>
+ * </p>
+ *
+ * @return the unique identifier of the diagram for which views are provided.
+ */
return PackageEditPart.MODEL_ID;
}
@@ -1102,8 +1102,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { String fontColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FONT);
FontStyle viewFontStyle = (FontStyle) view.getStyle(NotationPackage.Literals.FONT_STYLE);
- if (viewFontStyle != null)
- {
+ if (viewFontStyle != null) {
FontData fontData = PreferenceConverter.getFontData(store, fontConstant);
viewFontStyle.setFontName(fontData.getName());
viewFontStyle.setFontHeight(fontData.getHeight());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/sheet/UMLPropertySection.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/sheet/UMLPropertySection.java index 7def4ab498a..80acedd1f65 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/sheet/UMLPropertySection.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/sheet/UMLPropertySection.java @@ -26,7 +26,7 @@ public class UMLPropertySection extends DefaultPropertySection implements IPrope */
@Override
protected Object transformSelection(Object selected) {
- selected = /* super. */transformSelectionToDomain(selected);
+ selected = /*super.*/transformSelectionToDomain(selected);
return selected;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/sheet/UMLSheetLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/sheet/UMLSheetLabelProvider.java index e97be171b01..7668d62df43 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/sheet/UMLSheetLabelProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine/src/org/eclipse/papyrus/uml/diagram/statemachine/sheet/UMLSheetLabelProvider.java @@ -75,13 +75,11 @@ public class UMLSheetLabelProvider extends BaseLabelProvider implements ILabelPr // For intermediate views climb up the containment hierarchy to find the one associated with an element type.
while (view != null) {
int vid = UMLVisualIDRegistry.getVisualID(view);
- IElementType etype =
- UMLElementTypes.getElementType(vid);
+ IElementType etype = UMLElementTypes.getElementType(vid);
if (etype != null) {
return etype;
}
- view = view.eContainer() instanceof View ?
- (View) view.eContainer() : null;
+ view = view.eContainer() instanceof View ? (View) view.eContainer() : null;
}
return null;
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/Messages.java b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/Messages.java index 3e71938faf4..b001182a853 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/Messages.java +++ b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/Messages.java @@ -132,6 +132,10 @@ public class Messages extends NLS { public static String PapyrusSearchPage_49; public static String PapyrusSearchPage_5; + + public static String PapyrusSearchPage_50; + + public static String PapyrusSearchPage_51; public static String PapyrusSearchPage_6; diff --git a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/filters/TypesMatchFilter.java b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/filters/TypesMatchFilter.java index f5eddbde6e7..741333fafb3 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/filters/TypesMatchFilter.java +++ b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/filters/TypesMatchFilter.java @@ -1,88 +1,96 @@ -/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * 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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.search.ui.filters;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.papyrus.uml.search.ui.Messages;
-import org.eclipse.papyrus.views.search.results.AbstractResultEntry;
-import org.eclipse.search.ui.text.Match;
-import org.eclipse.search.ui.text.MatchFilter;
-import org.eclipse.uml2.uml.Element;
-
-/**
- *
- * A specific kind of filter that can filter UML based results
- *
- */
-public class TypesMatchFilter extends MatchFilter {
-
- private Object[] selectedTypes;
-
- /**
- *
- * Constructor.
- *
- * @param types
- * the collection of types whose instance are NOT filtered
- */
- public TypesMatchFilter(Object[] types) {
- this.selectedTypes = types;
- }
-
- @Override
- public String getName() {
- return Messages.TypesMatchFilter_0;
- }
-
- @Override
- public String getID() {
- return "TypesMatchFilter"; //$NON-NLS-1$
- }
-
- @Override
- public String getDescription() {
- return Messages.TypesMatchFilter_2;
- }
-
- @Override
- public String getActionLabel() {
- return Messages.TypesMatchFilter_3;
- }
-
- @Override
- public boolean filters(Match match) {
- if (match instanceof AbstractResultEntry) {
- List<Object> selectedTypesList = Arrays.asList(selectedTypes);
-
- Object elementToValidate = ((AbstractResultEntry) match).elementToCheckFilterFor();
-
- if (elementToValidate instanceof Element) {
-
- if (selectedTypesList.contains(((Element) elementToValidate).eClass())) {
- return false;
- }
- for (Object object : selectedTypesList) {
- if (((Element) elementToValidate).getAppliedStereotypes().contains(object)) {
- return false;
- }
- }
- return true;
- }
- }
-
- return false;
- }
-}
+/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.search.ui.filters; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.papyrus.uml.search.ui.Messages; +import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil; +import org.eclipse.papyrus.views.search.results.AbstractResultEntry; +import org.eclipse.search.ui.text.Match; +import org.eclipse.search.ui.text.MatchFilter; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.Stereotype; + +/** + * + * A specific kind of filter that can filter UML based results + * + */ +public class TypesMatchFilter extends MatchFilter { + + private Object[] selectedTypes; + + /** + * + * Constructor. + * + * @param types + * the collection of types whose instance are NOT filtered + */ + public TypesMatchFilter(Object[] types) { + this.selectedTypes = types; + } + + @Override + public String getName() { + return Messages.TypesMatchFilter_0; + } + + @Override + public String getID() { + return "TypesMatchFilter"; //$NON-NLS-1$ + } + + @Override + public String getDescription() { + return Messages.TypesMatchFilter_2; + } + + @Override + public String getActionLabel() { + return Messages.TypesMatchFilter_3; + } + + @Override + public boolean filters(Match match) { + if (match instanceof AbstractResultEntry) { + List<Object> selectedTypesList = Arrays.asList(selectedTypes); + + Object elementToValidate = ((AbstractResultEntry) match).elementToCheckFilterFor(); + + if (elementToValidate instanceof Element) { + if (selectedTypesList.contains(((Element) elementToValidate).eClass())) { + return false; + } + + for (Object selectedType : selectedTypesList) { + if (selectedType instanceof Stereotype) { + for (Stereotype appliedStereotype : ((Element) elementToValidate).getAppliedStereotypes()) { + if (EcoreUtil.getURI(appliedStereotype).equals(EcoreUtil.getURI((Stereotype) selectedType))) { + return false; + } + } + } + } + + return true; + } + } + + return false; + } +} diff --git a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/messages.properties b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/messages.properties index 4fefa1049a4..6aa3aaefabe 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/messages.properties +++ b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/messages.properties @@ -13,12 +13,12 @@ PapyrusQuery_5=Failed to start ViewerSearcherService to find viewers in\: PapyrusQuery_6=Papyrus Search PapyrusSearchPage_0=Query expression is ill-formed PapyrusSearchPage_1=Query issue -PapyrusSearchPage_10=Deselect All Elements +PapyrusSearchPage_10=Deselect all UML types PapyrusSearchPage_11=Simple search PapyrusSearchPage_12=Advanced search PapyrusSearchPage_13=Enforce all and only selected stereotypes are applied -PapyrusSearchPage_14=Select Subelements -PapyrusSearchPage_15=Refresh lists +PapyrusSearchPage_14=Select subtypes +PapyrusSearchPage_15=Refresh by scope PapyrusSearchPage_16=Search only in name attribute PapyrusSearchPage_17=Search in all string attributes PapyrusSearchPage_18=Select context @@ -50,17 +50,19 @@ PapyrusSearchPage_40=Error PapyrusSearchPage_41=You can replace only string attributes PapyrusSearchPage_42=Warning PapyrusSearchPage_43=Cannot perform replace action on OCL queries basis. -PapyrusSearchPage_44=UML Elements -PapyrusSearchPage_45=Stereotypes applied in model(s) -PapyrusSearchPage_46=Select All Stereotypes -PapyrusSearchPage_47=Deselect All Stereotypes +PapyrusSearchPage_44=UML types +PapyrusSearchPage_45=Stereotypes +PapyrusSearchPage_46=Select all stereotypes +PapyrusSearchPage_47=Deselect all stereotypes PapyrusSearchPage_48=String (leave empty in advanced search mode to search for element types only) PapyrusSearchPage_49=Enforce at least one stereotype is applied PapyrusSearchPage_5=Case sensitive +PapyrusSearchPage_50=Only applied stereotypes +PapyrusSearchPage_51=Profiles PapyrusSearchPage_6=Regular expression PapyrusSearchPage_7=Search kind: PapyrusSearchPage_8=Search for -PapyrusSearchPage_9=Select All Elements +PapyrusSearchPage_9=Select all UML types PapyrusSearchPage_btnCheckButton_text=Check Button PapyrusSearchPage_btnGg_text=gg PapyrusSearchPage_btnNewButton_text=New Button diff --git a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/pages/PapyrusSearchPage.java b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/pages/PapyrusSearchPage.java index 9faa42cbe16..04c0dcf192c 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/pages/PapyrusSearchPage.java +++ b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/pages/PapyrusSearchPage.java @@ -21,7 +21,11 @@ import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedList; import java.util.List; +import java.util.Map; +import java.util.Map.Entry; import java.util.Set; import java.util.regex.PatternSyntaxException; @@ -34,18 +38,25 @@ import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.impl.EClassImpl; import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.jface.dialogs.DialogPage; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.CheckStateChangedEvent; import org.eclipse.jface.viewers.CheckboxTreeViewer; +import org.eclipse.jface.viewers.ComboViewer; import org.eclipse.jface.viewers.ICheckStateListener; import org.eclipse.jface.viewers.ICheckStateProvider; import org.eclipse.jface.viewers.ICheckable; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.ViewerSorter; import org.eclipse.ocl.examples.xtext.console.xtfo.EmbeddedXtextEditor; import org.eclipse.ocl.pivot.ExpressionInOCL; @@ -121,6 +132,7 @@ import org.eclipse.uml2.uml.Class; import org.eclipse.uml2.uml.Element; import org.eclipse.uml2.uml.Enumeration; import org.eclipse.uml2.uml.NamedElement; +import org.eclipse.uml2.uml.Profile; import org.eclipse.uml2.uml.Property; import org.eclipse.uml2.uml.Stereotype; import org.eclipse.uml2.uml.UMLPackage; @@ -139,12 +151,26 @@ import com.google.inject.Injector; * */ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IReplacePage { + + private int currentScope = -1; - private HashMap<ParticipantTypeElement, List<ParticipantTypeAttribute>> participantsList = new HashMap<ParticipantTypeElement, List<ParticipantTypeAttribute>>(); + private HashMap<ParticipantTypeElement, List<ParticipantTypeAttribute>> umlTypeParticipantsList = new HashMap<ParticipantTypeElement, List<ParticipantTypeAttribute>>(); private HashMap<ParticipantTypeElement, List<ParticipantTypeAttribute>> stereotypeParticipantsList = new HashMap<ParticipantTypeElement, List<ParticipantTypeAttribute>>(); - + + private LinkedList<Object> profiles = new LinkedList<Object>(); + + private String allProfiles = "*"; + private Collection<Stereotype> availableStereotypes; + + private Collection<Stereotype> appliedStereotypes; + + private boolean profilesComputed = false; + + private boolean availableStereotypesComputed = false; + + private boolean appliedStereotypesComputed = false; private static final String REGULAR_EXPRESSION_ILLFORMED = Messages.PapyrusSearchPage_0; @@ -158,13 +184,15 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla private ISearchPageContainer container; - private CheckBoxFilteredTree participantTypesTree; + private CheckBoxFilteredTree participantUMLTypesTree; private CheckBoxFilteredTree participantStereotypesTree; - private CheckboxTreeViewer participantTypesTreeViewer; + private CheckboxTreeViewer participantUMLTypesTreeViewer; private CheckboxTreeViewer participantStereotypesTreeViewer; + + private ComboViewer participantProfilesComboViewer; private Label searchQueryExplanatoryLabel; @@ -172,7 +200,6 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla private Button btnCaseSensitive; - private Button btnSearchAllStringAttributes; private Button btnSearchInName; @@ -198,6 +225,12 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla private int currentSearchKind = SIMPLE_SEARCH; private int currentQueryKind = TEXT_QUERY_KIND; + + private boolean onlyAppliedStereotypes = false; + + private boolean onlyAppliedStereotypesStateChanged = true; + + private Profile selectedProfile = null; private ParserContext parserContext; @@ -208,26 +241,22 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla private Composite advancedSearchComposite; private Composite textQueryFieldsComposite; - + + private Button fBtnOnlyAppliedStereotypes; + private Button fBtnSearchForAllSelected; private Button fBtnSearchForAnySelected; - private Label elementsLabel; + private Label umlTypesLabel; private Label stereotypesLabel; - private Label emptyLabel; + private Label profilesLabel; - private Label emptyLabel2; - - private Label emptyLabel3; - - private Label emptyLabel4; - - - protected void createSimpleSearchQueryField() { + private Label emptyLabel; + protected void createTextSearch() { textQueryComposite = new Composite(queryComposite, SWT.NONE); textQueryComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); textQueryComposite.setLayout(new GridLayout(2, false)); @@ -272,8 +301,6 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla } }); - - Group grpSearchFor = new Group(textQueryComposite, SWT.NONE); grpSearchFor.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1)); grpSearchFor.setLayout(new GridLayout(1, false)); @@ -300,16 +327,7 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla childControl.dispose(); } - if (searchKind.getSelectionIndex() == ADVANCED_SEARCH) { - participantsList.clear(); - stereotypeParticipantsList.clear(); - createResultList(); - createAdvancedSearch(); - } else if (searchKind.getSelectionIndex() == SIMPLE_SEARCH) { - simpleSearch(); - }/* else { - Other search kinds in the future - }*/ + createSpecificTextSearch(); advancedSearchComposite.layout(); } @@ -323,19 +341,63 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla if (currentSearchKind == ADVANCED_SEARCH) { searchKind.select(ADVANCED_SEARCH); - participantsList.clear(); - stereotypeParticipantsList.clear(); - createResultList(); - createAdvancedSearch(); - } else if (currentSearchKind == SIMPLE_SEARCH) { + } else { searchKind.select(SIMPLE_SEARCH); - simpleSearch(); + } + createSpecificTextSearch(); + } + + protected void createSpecificTextSearch() { + if (searchKind.getSelectionIndex() == ADVANCED_SEARCH) { + + if (container.getSelectedScope() == currentScope || currentScope == -1) { // if scope not changed or first time + if (umlTypeParticipantsList.isEmpty()) { + createUMLTypesList(); + } + + createProfilesList(false); + createStereotypesList(false); + + createAdvancedSearch(); // Don't call any methods of UI entities before this! + participantProfilesComboViewer.refresh(); + participantUMLTypesTreeViewer.refresh(); + filterParticipantStereotypesByProfile(); // This refreshes the participantStereotypesTreeViewer + + currentScope = container.getSelectedScope(); + } else { // else: same code as refresh button except we need to recreate the UI + // Refresh UML types + if (umlTypeParticipantsList.isEmpty()) { + createUMLTypesList(); + } + + // Refresh profiles + selectedProfile = null; + profilesComputed = false; + createProfilesList(true); + + // Refresh stereotypes + availableStereotypesComputed = false; + appliedStereotypesComputed = false; + createStereotypesList(true); + + // Refresh UI + createAdvancedSearch(); // Don't call any methods of UI entities before this! + participantProfilesComboViewer.refresh(); + participantUMLTypesTreeViewer.refresh(); + filterParticipantStereotypesByProfile(); // This refreshes the participantStereotypesTreeViewer + + currentScope = container.getSelectedScope(); + } + + + } else { + createSimpleSearch(); }/* else { Other search kinds in the future }*/ } - protected void createResultList() { + protected void createUMLTypesList() { ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell()); IRunnableWithProgress computeAvailableTypes = new IRunnableWithProgress() { @@ -350,33 +412,108 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla for (EObject eAttribute : ((EClass) (parentElement).getElement()).getEAllAttributes()) { ParticipantTypeAttribute attribute = new ParticipantTypeAttribute(eAttribute, (parentElement)); attributeList.add(attribute); - - } - participantsList.put(parentElement, attributeList); + umlTypeParticipantsList.put(parentElement, attributeList); } } } + } + + }; + + try { + dialog.run(true, true, computeAvailableTypes); + } catch (InvocationTargetException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } catch (InterruptedException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + + } + + protected void createProfilesList(boolean forceRefresh) { + if (forceRefresh || !profilesComputed) { + profiles.clear(); + + ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell()); + IRunnableWithProgress computeAvailableTypes = new IRunnableWithProgress() { + public void run(IProgressMonitor thePM) throws InterruptedException { + Collection<Profile> appliedProfiles = StereotypeCollector.getInstance().computeAppliedProfiles(container); + profiles.add(allProfiles); + profiles.addAll(appliedProfiles); + profilesComputed = true; + } + }; + + try { + dialog.run(true, true, computeAvailableTypes); - // Find available stereotypes - availableStereotypes = StereotypeCollector.getInstance().computeAppliedStereotypes(container); - for (Stereotype stereotype : availableStereotypes) { - ParticipantTypeElement parentElement = new ParticipantTypeElement(stereotype); - List<ParticipantTypeAttribute> attributeList = new ArrayList<ParticipantTypeAttribute>(); - for (Property property : ((Stereotype) parentElement.getElement()).getAllAttributes()) { - if (!property.getName().startsWith("base_")) { //$NON-NLS-1$ - if (property.getType() instanceof Element) { - ParticipantTypeAttribute attribute = new ParticipantTypeAttribute(property, parentElement); - attributeList.add(attribute); + } catch (InvocationTargetException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } catch (InterruptedException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } + } + + protected void createStereotypesList(final boolean forceRefresh) { + ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell()); + IRunnableWithProgress computeAvailableTypes = new IRunnableWithProgress() { + + public void run(IProgressMonitor thePM) throws InterruptedException { + if (forceRefresh || onlyAppliedStereotypesStateChanged) { + stereotypeParticipantsList.clear(); + + Collection<Stereotype> computedStereotypes; + + // Find available stereotypes + if (onlyAppliedStereotypes) { + if (forceRefresh || !appliedStereotypesComputed) { + if (appliedStereotypes != null) { + appliedStereotypes.clear(); + } + + appliedStereotypes = StereotypeCollector.getInstance().computeAppliedStereotypes(container); + appliedStereotypesComputed = true; + } + + computedStereotypes = appliedStereotypes; + } else { // Find applied stereotypes + if (forceRefresh || !availableStereotypesComputed) { + if (availableStereotypes != null) { + availableStereotypes.clear(); } + + availableStereotypes = StereotypeCollector.getInstance().computeAvailableStereotypes(container); + availableStereotypesComputed = true; } + computedStereotypes = availableStereotypes; } - stereotypeParticipantsList.put(parentElement, attributeList); + // Fill the hash map for the treeviewer + for (Stereotype stereotype : computedStereotypes) { + ParticipantTypeElement parentElement = new ParticipantTypeElement(stereotype); + List<ParticipantTypeAttribute> attributeList = new ArrayList<ParticipantTypeAttribute>(); + for (Property property : ((Stereotype) parentElement.getElement()).getAllAttributes()) { + if (!property.getName().startsWith("base_")) { //$NON-NLS-1$ + if (property.getType() instanceof Element) { + ParticipantTypeAttribute attribute = new ParticipantTypeAttribute(property, parentElement); + attributeList.add(attribute); + } + } + } + + stereotypeParticipantsList.put(parentElement, attributeList); + } + + onlyAppliedStereotypesStateChanged = false; } } - }; try { @@ -388,28 +525,169 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla // TODO Auto-generated catch block e1.printStackTrace(); } - + } + + protected void filterParticipantStereotypesByProfile() { + if (selectedProfile == null) { + participantStereotypesTreeViewer.setInput(stereotypeParticipantsList); + participantStereotypesTreeViewer.refresh(); + return; + } + + HashMap<ParticipantTypeElement, List<ParticipantTypeAttribute>> filteredStereotypeParticipantsList = new HashMap<ParticipantTypeElement, List<ParticipantTypeAttribute>>(); + + Iterator<Entry<ParticipantTypeElement, List<ParticipantTypeAttribute>>> it = stereotypeParticipantsList.entrySet().iterator(); + while (it.hasNext()) { + Map.Entry<ParticipantTypeElement, List<ParticipantTypeAttribute>> pair = (Map.Entry<ParticipantTypeElement, List<ParticipantTypeAttribute>>)it.next(); + Stereotype stereotype = (Stereotype) ((ParticipantTypeElement) pair.getKey()).getElement(); + if (EcoreUtil.getURI(stereotype.getProfile()).equals(EcoreUtil.getURI(selectedProfile))) { + filteredStereotypeParticipantsList.put(pair.getKey(), pair.getValue()); + } + } + + participantStereotypesTreeViewer.setInput(filteredStereotypeParticipantsList); + participantStereotypesTreeViewer.refresh(); } - protected void createAdvancedSearch() { - elementsLabel = new Label(advancedSearchComposite, SWT.NONE); - elementsLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1)); - elementsLabel.setText(Messages.PapyrusSearchPage_44); + protected void createAdvancedSearch() { + profilesLabel = new Label(advancedSearchComposite, SWT.NONE); + profilesLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1)); + profilesLabel.setText(Messages.PapyrusSearchPage_51); + + //TODO Better solution than this empty label + emptyLabel = new Label(advancedSearchComposite, SWT.NONE); + emptyLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1)); + emptyLabel.setText(""); + + //TODO Better solution than this empty label + emptyLabel = new Label(advancedSearchComposite, SWT.NONE); + emptyLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1)); + emptyLabel.setText(""); + + // Newline + + participantProfilesComboViewer = new ComboViewer(advancedSearchComposite, SWT.READ_ONLY); + participantProfilesComboViewer.setContentProvider(ArrayContentProvider.getInstance()); + participantProfilesComboViewer.setLabelProvider(new LabelProvider() { + @Override + public String getText(Object element) { + if (element instanceof Profile) { + return ((Profile) element).getName(); + } + return super.getText(element); + } + }); + participantProfilesComboViewer.setSorter(new ViewerSorter()); + participantProfilesComboViewer.setInput(profiles); + if (selectedProfile == null) { + participantProfilesComboViewer.setSelection(new StructuredSelection(allProfiles)); + } else { + participantProfilesComboViewer.setSelection(new StructuredSelection(selectedProfile)); + } + participantProfilesComboViewer.addSelectionChangedListener(new ISelectionChangedListener() { + public void selectionChanged(SelectionChangedEvent event) { + if (event.getSelection().isEmpty()) { + return; + } + + if (participantProfilesComboViewer.getStructuredSelection().getFirstElement() instanceof Profile) { + selectedProfile = (Profile) participantProfilesComboViewer.getStructuredSelection().getFirstElement(); + } else { + selectedProfile = null; + } + + filterParticipantStereotypesByProfile(); + } + }); + + fBtnOnlyAppliedStereotypes = new Button(advancedSearchComposite, SWT.CHECK); + fBtnOnlyAppliedStereotypes.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1)); + fBtnOnlyAppliedStereotypes.setText(Messages.PapyrusSearchPage_50); + fBtnOnlyAppliedStereotypes.setSelection(onlyAppliedStereotypes); + fBtnOnlyAppliedStereotypes.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + onlyAppliedStereotypes = fBtnOnlyAppliedStereotypes.getSelection(); + + // Memorize previous stereotypes attributes that have been checked + HashMap<ParticipantTypeElement, List<ParticipantTypeAttribute>> oldStereotypeParticipantsList = new HashMap<ParticipantTypeElement, List<ParticipantTypeAttribute>>(); + Iterator<Entry<ParticipantTypeElement, List<ParticipantTypeAttribute>>> it = stereotypeParticipantsList.entrySet().iterator(); + while (it.hasNext()) { + Map.Entry<ParticipantTypeElement, List<ParticipantTypeAttribute>> pair = (Map.Entry<ParticipantTypeElement, List<ParticipantTypeAttribute>>)it.next(); + boolean toAdd = false; + if (pair.getKey().isChecked()) { + toAdd = true; + } + + if (!toAdd) { + for (ParticipantTypeAttribute attribute : pair.getValue()) { + if (attribute.isChecked()) { + toAdd = true; + break; + } + } + } + + if (toAdd) { + oldStereotypeParticipantsList.put(pair.getKey(), pair.getValue()); + } + } + + onlyAppliedStereotypesStateChanged = true; + createStereotypesList(false); + + Iterator<Entry<ParticipantTypeElement, List<ParticipantTypeAttribute>>> it2 = oldStereotypeParticipantsList.entrySet().iterator(); + while (it2.hasNext()) { + Map.Entry<ParticipantTypeElement, List<ParticipantTypeAttribute>> oldPair = (Map.Entry<ParticipantTypeElement, List<ParticipantTypeAttribute>>)it2.next(); + Stereotype oldStereotype = (Stereotype) oldPair.getKey().getElement(); + + Iterator<Entry<ParticipantTypeElement, List<ParticipantTypeAttribute>>> it3 = stereotypeParticipantsList.entrySet().iterator(); + while (it3.hasNext()) { + Map.Entry<ParticipantTypeElement, List<ParticipantTypeAttribute>> newPair = (Map.Entry<ParticipantTypeElement, List<ParticipantTypeAttribute>>)it3.next(); + Stereotype newStereotype = (Stereotype) newPair.getKey().getElement(); + + // Lazy second condition because otherwise performance is impacted too much + if (EcoreUtil.getURI(newStereotype).equals(EcoreUtil.getURI(oldStereotype)) + && newPair.getValue().size() == oldPair.getValue().size()) { + newPair.getKey().setChecked(oldPair.getKey().isChecked()); + for (int i = 0; i < oldPair.getValue().size(); i++) { + newPair.getValue().get(i).setChecked(oldPair.getValue().get(i).isChecked()); + } + } + } + } + + filterParticipantStereotypesByProfile(); // This refreshes the list too + } + }); + + //TODO Better solution than this empty label + emptyLabel = new Label(advancedSearchComposite, SWT.NONE); + emptyLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1)); + emptyLabel.setText(""); + + // Newline + + umlTypesLabel = new Label(advancedSearchComposite, SWT.NONE); + umlTypesLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1)); + umlTypesLabel.setText(Messages.PapyrusSearchPage_44); stereotypesLabel = new Label(advancedSearchComposite, SWT.NONE); stereotypesLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1)); stereotypesLabel.setText(Messages.PapyrusSearchPage_45); - //TODO Better solution than this empty label to fill last row 1, col 3 with empty space + //TODO Better solution than this empty label emptyLabel = new Label(advancedSearchComposite, SWT.NONE); emptyLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1)); emptyLabel.setText(""); - participantTypesTree = new CheckBoxFilteredTree(advancedSearchComposite, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.SINGLE, new PatternFilter(), true); - participantTypesTree.setLayout(new GridLayout()); + // New line + + participantUMLTypesTree = new CheckBoxFilteredTree(advancedSearchComposite, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.SINGLE, new PatternFilter(), true); + participantUMLTypesTree.setLayout(new GridLayout()); GridData typesChechboxTreeViewerGridData = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1); typesChechboxTreeViewerGridData.heightHint = 150; - participantTypesTree.setLayoutData(typesChechboxTreeViewerGridData); + participantUMLTypesTree.setLayoutData(typesChechboxTreeViewerGridData); participantStereotypesTree = new CheckBoxFilteredTree(advancedSearchComposite, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.SINGLE, new PatternFilter(), true); participantStereotypesTree.setLayout(new GridLayout()); @@ -417,11 +695,11 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla stereotypesChechboxTreeViewerGridData.heightHint = 150; participantStereotypesTree.setLayoutData(stereotypesChechboxTreeViewerGridData); - participantTypesTreeViewer = (CheckboxTreeViewer) participantTypesTree.getViewer(); - participantTypesTreeViewer.setContentProvider(new ParticipantTypeContentProvider()); - participantTypesTreeViewer.setLabelProvider(new ParticipantTypeLabelProvider()); - participantTypesTreeViewer.setSorter(new ViewerSorter()); - participantTypesTreeViewer.setCheckStateProvider(new ICheckStateProvider() { + participantUMLTypesTreeViewer = (CheckboxTreeViewer) participantUMLTypesTree.getViewer(); + participantUMLTypesTreeViewer.setContentProvider(new ParticipantTypeContentProvider()); + participantUMLTypesTreeViewer.setLabelProvider(new ParticipantTypeLabelProvider()); + participantUMLTypesTreeViewer.setSorter(new ViewerSorter()); + participantUMLTypesTreeViewer.setCheckStateProvider(new ICheckStateProvider() { public boolean isGrayed(Object element) { return false; @@ -471,14 +749,14 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla @Override public void mouseUp(MouseEvent e) { - ISelection selection = participantTypesTreeViewer.getSelection(); + ISelection selection = participantUMLTypesTreeViewer.getSelection(); if (selection instanceof IStructuredSelection) { Object selectedElement = ((IStructuredSelection) selection).getFirstElement(); if (selectedElement instanceof ParticipantTypeElement) { List<ParticipantTypeAttribute> attributeParentList = new ArrayList<ParticipantTypeAttribute>(); - for (Object attribute : participantsList.get(selectedElement)) { + for (Object attribute : umlTypeParticipantsList.get(selectedElement)) { if (attribute instanceof ParticipantTypeAttribute) { if (((ParticipantTypeAttribute) attribute).isChecked()) { attributeParentList.add(((ParticipantTypeAttribute) attribute)); @@ -498,7 +776,7 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla } } - participantTypesTreeViewer.refresh(); + participantUMLTypesTreeViewer.refresh(); } }); @@ -510,17 +788,17 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla @Override public void mouseUp(MouseEvent e) { - for (ParticipantTypeElement element : participantsList.keySet()) { + for (ParticipantTypeElement element : umlTypeParticipantsList.keySet()) { if (!element.isChecked()) { element.setChecked(true); - for (ParticipantTypeAttribute attribute : participantsList.get(element)) { + for (ParticipantTypeAttribute attribute : umlTypeParticipantsList.get(element)) { attribute.setChecked(true); } } } - participantTypesTreeViewer.refresh(); + participantUMLTypesTreeViewer.refresh(); } }); @@ -532,18 +810,18 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla @Override public void mouseUp(MouseEvent e) { - for (ParticipantTypeElement element : participantsList.keySet()) { + for (ParticipantTypeElement element : umlTypeParticipantsList.keySet()) { if (element.isChecked()) { element.setChecked(false); - for (ParticipantTypeAttribute attribute : participantsList.get(element)) { + for (ParticipantTypeAttribute attribute : umlTypeParticipantsList.get(element)) { attribute.setChecked(false); } } } - participantTypesTreeViewer.refresh(); + participantUMLTypesTreeViewer.refresh(); } }); @@ -597,41 +875,38 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla @Override public void mouseUp(MouseEvent e) { - participantsList.clear(); - stereotypeParticipantsList.clear(); - createResultList(); - - //createAdvancedSearch(); - - participantTypesTreeViewer.refresh(); - participantStereotypesTreeViewer.refresh(); + refreshByScope(); } }); - - participantTypesTreeViewer.setInput(participantsList); - ((ICheckable) participantTypesTreeViewer).addCheckStateListener(new ParticipantTypesTreeViewerCheckStateListener(participantTypesTreeViewer, participantsList)); + + participantUMLTypesTreeViewer.setInput(umlTypeParticipantsList); + ((ICheckable) participantUMLTypesTreeViewer).addCheckStateListener(new ParticipantTypesTreeViewerCheckStateListener(participantUMLTypesTreeViewer, umlTypeParticipantsList)); participantStereotypesTreeViewer.setInput(stereotypeParticipantsList); ((ICheckable) participantStereotypesTreeViewer).addCheckStateListener(new ParticipantTypesTreeViewerCheckStateListener(participantStereotypesTreeViewer, stereotypeParticipantsList)); - //TODO Better solution than this empty label to fill last row 1, col 3 with empty space - emptyLabel2 = new Label(advancedSearchComposite, SWT.NONE); - emptyLabel2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1)); - emptyLabel2.setText(""); + // New line + + //TODO Better solution than this empty label + emptyLabel = new Label(advancedSearchComposite, SWT.NONE); + emptyLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1)); + emptyLabel.setText(""); fBtnSearchForAllSelected = new Button(advancedSearchComposite, SWT.CHECK); fBtnSearchForAllSelected.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1)); fBtnSearchForAllSelected.setText(Messages.PapyrusSearchPage_13); - //TODO Better solution than this empty label to fill last row 1, col 3 with empty space - emptyLabel3 = new Label(advancedSearchComposite, SWT.NONE); - emptyLabel3.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1)); - emptyLabel3.setText(""); + //TODO Better solution than this empty label + emptyLabel = new Label(advancedSearchComposite, SWT.NONE); + emptyLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1)); + emptyLabel.setText(""); - //TODO Better solution than this empty label to fill last row 1, col 3 with empty space - emptyLabel4 = new Label(advancedSearchComposite, SWT.NONE); - emptyLabel4.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1)); - emptyLabel4.setText(""); + // New line + + //TODO Better solution than this empty label + emptyLabel = new Label(advancedSearchComposite, SWT.NONE); + emptyLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1)); + emptyLabel.setText(""); fBtnSearchForAnySelected = new Button(advancedSearchComposite, SWT.CHECK); fBtnSearchForAnySelected.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1)); @@ -640,6 +915,30 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla currentSearchKind = ADVANCED_SEARCH; currentQueryKind = TEXT_QUERY_KIND; } + + protected void refreshByScope() { + // Refresh UML types + if (umlTypeParticipantsList.isEmpty()) { + createUMLTypesList(); + } + + // Refresh profiles + selectedProfile = null; + profilesComputed = false; + createProfilesList(true); + + // Refresh stereotypes + availableStereotypesComputed = false; + appliedStereotypesComputed = false; + createStereotypesList(true); + + + // Refresh UI + participantProfilesComboViewer.setSelection(new StructuredSelection(allProfiles)); + participantProfilesComboViewer.refresh(); + participantUMLTypesTreeViewer.refresh(); + filterParticipantStereotypesByProfile(); // This refreshes the participantStereotypesTreeViewer + } protected void selectAllSubSter(final ParticipantTypeElement elementParent, final List<ParticipantTypeAttribute> attributeParentList) { @@ -647,7 +946,7 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla IRunnableWithProgress computeAvailableTypes = new IRunnableWithProgress() { public void run(IProgressMonitor thePM) throws InterruptedException { - for (Object element : participantsList.keySet()) { + for (Object element : umlTypeParticipantsList.keySet()) { if (element instanceof ParticipantTypeElement) { checkAllSubSter((ParticipantTypeElement) element, elementParent, attributeParentList); @@ -681,7 +980,7 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla // Proceed with attributes for (ParticipantTypeAttribute attributeParent : attributeParentList) { - for (ParticipantTypeAttribute attributeToEvaluate : participantsList.get(element)) { + for (ParticipantTypeAttribute attributeToEvaluate : umlTypeParticipantsList.get(element)) { if (attributeParent.getElement() == attributeToEvaluate.getElement()) { attributeToEvaluate.setChecked(true); @@ -701,7 +1000,7 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla IRunnableWithProgress computeAvailableTypes = new IRunnableWithProgress() { public void run(IProgressMonitor thePM) throws InterruptedException { - for (Object element : participantsList.keySet()) { + for (Object element : umlTypeParticipantsList.keySet()) { if (element instanceof ParticipantTypeElement) { checkAllSubUML((ParticipantTypeElement) element, elementParent, attributeParentList); @@ -735,25 +1034,18 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla // Proceed with attributes for (ParticipantTypeAttribute attributeParent : attributeParentList) { - for (ParticipantTypeAttribute attributeToEvaluate : participantsList.get(element)) { + for (ParticipantTypeAttribute attributeToEvaluate : umlTypeParticipantsList.get(element)) { if (attributeParent.getElement() == attributeToEvaluate.getElement()) { - attributeToEvaluate.setChecked(true); - - } - } } } } - } - protected void simpleSearch() { - - + protected void createSimpleSearch() { Composite participantManipualtionComposite = new Composite(advancedSearchComposite, SWT.NONE); participantManipualtionComposite.setLayout(new GridLayout(1, false)); participantManipualtionComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, true, 1, 1)); @@ -787,7 +1079,7 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla } - protected void createOCLSearchQueryField(EObject root) { + protected void createOCLSearch(EObject root) { Composite client = queryComposite; @@ -917,7 +1209,7 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla } if (queryKind.getSelectionIndex() == TEXT_QUERY_KIND) { - createSimpleSearchQueryField(); + createTextSearch(); } else { if (container.getSelectedScope() == ISearchPageContainer.SELECTION_SCOPE) { @@ -927,7 +1219,7 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla try { EObject root = ((UmlModel) currentScope.getModelSet().getModel(UmlModel.MODEL_ID)).lookupRoot(); - createOCLSearchQueryField(root); + createOCLSearch(root); if (contextObject instanceof NamedElement) { oclContext.setText(((NamedElement) contextObject).getQualifiedName()); @@ -942,17 +1234,17 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla } } else { MessageDialog.openWarning(Display.getCurrent().getActiveShell(), Messages.PapyrusSearchPage_23, Messages.PapyrusSearchPage_24); - createSimpleSearchQueryField(); + createTextSearch(); queryKind.select(TEXT_QUERY_KIND); } } else { MessageDialog.openWarning(Display.getCurrent().getActiveShell(), Messages.PapyrusSearchPage_25, Messages.PapyrusSearchPage_26); - createSimpleSearchQueryField(); + createTextSearch(); queryKind.select(TEXT_QUERY_KIND); } } else { MessageDialog.openWarning(Display.getCurrent().getActiveShell(), Messages.PapyrusSearchPage_27, Messages.PapyrusSearchPage_28); - createSimpleSearchQueryField(); + createTextSearch(); queryKind.select(TEXT_QUERY_KIND); } } @@ -966,7 +1258,7 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla queryComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1)); queryComposite.setLayout(new GridLayout(1, false)); - createSimpleSearchQueryField(); + createTextSearch(); setControl(parent); } @@ -1112,12 +1404,12 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla List<ParticipantTypeElement> participantsToEvaluate = new ArrayList<ParticipantTypeElement>(); - for (ParticipantTypeElement element : this.participantsList.keySet()) { + for (ParticipantTypeElement element : this.umlTypeParticipantsList.keySet()) { if (element.isChecked()) { participantsToEvaluate.add(element); if (searchQueryText.getText().length() > 0) { - for (ParticipantTypeAttribute attributesToEvaluate : participantsList.get(element)) { + for (ParticipantTypeAttribute attributesToEvaluate : umlTypeParticipantsList.get(element)) { if (attributesToEvaluate.isChecked()) { participantsToEvaluate.add(attributesToEvaluate); } @@ -1222,15 +1514,15 @@ public class PapyrusSearchPage extends DialogPage implements ISearchPage, IRepla query = CompositePapyrusQueryProvider.getInstance().createSimpleSearchQuery(info); } else { List<ParticipantTypeElement> participantsToEvaluate = new ArrayList<ParticipantTypeElement>(); - for (ParticipantTypeElement element : this.participantsList.keySet()) { + for (ParticipantTypeElement element : this.umlTypeParticipantsList.keySet()) { if (element.isChecked()) { participantsToEvaluate.add(element); - if (participantsList.get(element).size() == 0) { + if (umlTypeParticipantsList.get(element).size() == 0) { MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.PapyrusSearchPage_38, Messages.PapyrusSearchPage_39); return false; } else { - for (ParticipantTypeAttribute attributesToEvaluate : participantsList.get(element)) { + for (ParticipantTypeAttribute attributesToEvaluate : umlTypeParticipantsList.get(element)) { if (attributesToEvaluate.isChecked()) { participantsToEvaluate.add(attributesToEvaluate); boolean canDoReplace = false; diff --git a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/providers/FilterTypeContentProvider.java b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/providers/FilterTypeContentProvider.java index 7d351c6fd12..cecef37f898 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/providers/FilterTypeContentProvider.java +++ b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/providers/FilterTypeContentProvider.java @@ -1,76 +1,94 @@ -/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * 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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.search.ui.providers;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.papyrus.views.search.results.AbstractResultEntry;
-import org.eclipse.papyrus.views.search.utils.MatchUtils;
-import org.eclipse.search.ui.text.AbstractTextSearchResult;
-import org.eclipse.uml2.uml.Element;
-
-/**
- *
- * Content provider used by the filter dialog to list available types in a search result
- *
- */
-public class FilterTypeContentProvider implements ITreeContentProvider {
-
- public void dispose() {
-
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-
- }
-
- public Object[] getElements(Object inputElement) {
- Set<Object> results = new HashSet<Object>();
-
- if (inputElement instanceof AbstractTextSearchResult) {
-
- Collection<AbstractResultEntry> matches = MatchUtils.getMatches((AbstractTextSearchResult) inputElement, Element.class, false);
-
- for (AbstractResultEntry match : matches) {
-
- results.add(((EObject) match.elementToCheckFilterFor()).eClass());
- results.addAll(((Element) match.elementToCheckFilterFor()).getAppliedStereotypes());
-
- }
- }
-
- return results.toArray();
- }
-
- public Object[] getChildren(Object parentElement) {
- Set<Object> results = new HashSet<Object>();
-
- return results.toArray();
- }
-
- public Object getParent(Object element) {
- return null;
- }
-
- public boolean hasChildren(Object element) {
-
- return false;
- }
-
-}
+/***************************************************************************** + * Copyright (c) 2013 CEA LIST. + * + * + * 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: + * CEA LIST - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.uml.search.ui.providers; + +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.papyrus.views.search.results.AbstractResultEntry; +import org.eclipse.papyrus.views.search.utils.MatchUtils; +import org.eclipse.search.ui.text.AbstractTextSearchResult; +import org.eclipse.uml2.uml.Element; +import org.eclipse.uml2.uml.Stereotype; + +/** + * + * Content provider used by the filter dialog to list available types in a search result + * + */ +public class FilterTypeContentProvider implements ITreeContentProvider { + + public void dispose() { + + } + + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + + } + + public Object[] getElements(Object inputElement) { + Set<Object> results = new HashSet<Object>(); + + if (inputElement instanceof AbstractTextSearchResult) { + Collection<AbstractResultEntry> matches = MatchUtils.getMatches((AbstractTextSearchResult) inputElement, Element.class, false); + Set<Stereotype> stereotypesToAdd = new HashSet<Stereotype>(); + + for (AbstractResultEntry match : matches) { + // Add meta-classes + results.add(((EObject) match.elementToCheckFilterFor()).eClass()); + + // Add stereotypes + for (Stereotype appliedStereotype : ((Element) match.elementToCheckFilterFor()).getAppliedStereotypes()) { + boolean exists = false; + + for (Stereotype existingStereotype : stereotypesToAdd) { + if (EcoreUtil.getURI(existingStereotype).equals(EcoreUtil.getURI(appliedStereotype))) { + exists = true; + break; + } + } + + if (!exists) { + stereotypesToAdd.add(appliedStereotype); + } + } + } + + results.addAll(stereotypesToAdd); + } + + return results.toArray(); + } + + public Object[] getChildren(Object parentElement) { + Set<Object> results = new HashSet<Object>(); + + return results.toArray(); + } + + public Object getParent(Object element) { + return null; + } + + public boolean hasChildren(Object element) { + + return false; + } + +} diff --git a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/providers/ParticipantTypeLabelProvider.java b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/providers/ParticipantTypeLabelProvider.java index 7c9ccfc2887..33ee50e46e0 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/providers/ParticipantTypeLabelProvider.java +++ b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/providers/ParticipantTypeLabelProvider.java @@ -24,7 +24,10 @@ import org.eclipse.papyrus.uml.search.ui.Activator; import org.eclipse.papyrus.uml.search.ui.Messages; import org.eclipse.papyrus.uml.tools.utils.ImageUtil; import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; import org.eclipse.uml2.uml.Stereotype; import com.swtdesigner.ResourceManager; @@ -61,6 +64,10 @@ public class ParticipantTypeLabelProvider extends LabelProvider { image = ImageUtil.getImageFromLocation(icon); } + if (image.getBounds().width != 16 || image.getBounds().height != 16) { + return resize(image, 16, 16); + } + return image; } else { LabelProviderService service = new LabelProviderServiceImpl(); @@ -88,5 +95,24 @@ public class ParticipantTypeLabelProvider extends LabelProvider { return ""; //$NON-NLS-1$ // } - + + private Image resize(Image image, int width, int height) { + double dpi = Display.getDefault().getDPI().x; + double scale = dpi/96; + int scaledWidth = (int) (width * scale); + int scaledHeight = (int) (height * scale); + + Image scaled = new Image(Display.getDefault(), scaledWidth, scaledHeight); + GC gc = new GC(scaled); + gc.setAntialias(SWT.ON); + gc.setInterpolation(SWT.HIGH); + gc.drawImage(image, 0, 0, + image.getBounds().width, image.getBounds().height, + 0, 0, scaledWidth, scaledHeight); + gc.dispose(); + + image.dispose(); + + return scaled; + } } diff --git a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/WorkspaceQueryProvider.java b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/WorkspaceQueryProvider.java index f9b70a3c475..33be6d704d0 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/WorkspaceQueryProvider.java +++ b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/search/ui/query/WorkspaceQueryProvider.java @@ -21,14 +21,9 @@ import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.EObject; -import org.eclipse.papyrus.infra.core.resource.ModelMultiException; -import org.eclipse.papyrus.infra.core.resource.ModelSet; -import org.eclipse.papyrus.infra.core.services.ServiceMultiException; -import org.eclipse.papyrus.infra.core.services.ServiceNotFoundException; import org.eclipse.papyrus.views.search.scope.ScopeEntry; import org.eclipse.papyrus.views.search.utils.DefaultServiceRegistryTracker; import org.eclipse.papyrus.views.search.utils.IServiceRegistryTracker; -import org.eclipse.papyrus.views.search.utils.ModelUtils; import org.eclipse.uml2.uml.UMLPackage; diff --git a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/stereotypecollector/StereotypeCollector.java b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/stereotypecollector/StereotypeCollector.java index 75993baf24f..5412282fee9 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/stereotypecollector/StereotypeCollector.java +++ b/plugins/uml/org.eclipse.papyrus.uml.search.ui/src/org/eclipse/papyrus/uml/stereotypecollector/StereotypeCollector.java @@ -61,7 +61,91 @@ public class StereotypeCollector implements IStereotypeCollector { return StereotypeCollector.instance; } + /** + * Computes the list of applied profiles in the model(s) + * + * @param container + * @return + */ + public Collection<Profile> computeAppliedProfiles(ISearchPageContainer container) { + Set<Profile> profiles = new HashSet<Profile>(); + Set<URI> umlResources = new HashSet<URI>(); + + if (container == null) { + umlResources.addAll(createWorkspaceScope()); + } else { + switch (container.getSelectedScope()) { + case ISearchPageContainer.WORKSPACE_SCOPE: { + umlResources.addAll(createWorkspaceScope()); + break; + } + case ISearchPageContainer.SELECTION_SCOPE: { + ISelection selection = container.getSelection(); + + if (!selection.isEmpty()) { + if (selection instanceof IStructuredSelection) { + umlResources.addAll(createSelectionScope((IStructuredSelection) selection)); + } else { + // Do a workspace search instead + umlResources.addAll(createWorkspaceScope()); + } + } else { + // Do a workspace search instead + umlResources.addAll(createWorkspaceScope()); + } + break; + } + case ISearchPageContainer.SELECTED_PROJECTS_SCOPE: { + String[] projects = container.getSelectedProjectNames(); + umlResources.addAll(createProjectsScope(projects)); + break; + } + case ISearchPageContainer.WORKING_SET_SCOPE: { + IWorkingSet[] workingSets = container.getSelectedWorkingSets(); + umlResources.addAll(createWorkingSetsScope(workingSets)); + break; + } + default: { + break; + } + } + } + + for (URI uri : umlResources) { + ModelSet resourceSet = new ModelSet(); + Resource resource = resourceSet.getResource(uri, true); + + TreeIterator<EObject> UMLResourceContentIterator = resource.getAllContents(); + while (UMLResourceContentIterator.hasNext()) { + EObject umlElement = UMLResourceContentIterator.next(); + + if (umlElement instanceof ProfileApplication) { + boolean found = false; + Profile profileToProcess = ((ProfileApplication) umlElement).getAppliedProfile(); + for (Profile alreadyAddedProfile : profiles) { + if (EcoreUtil.getURI(alreadyAddedProfile).equals(EcoreUtil.getURI(profileToProcess))) { + found = true; + } + } + + if (!found) { + profiles.add(profileToProcess); + } + } + } + } + + return profiles; + + } + /** + * Computes the list of available stereotypes in profiles applied to the model(s) + * @see org.eclipse.papyrus.uml.stereotypecollector.IStereotypeCollector#computeAvailableStereotypes(org.eclipse.search.ui.ISearchPageContainer) + * + * @param container + * @return + */ public Collection<Stereotype> computeAvailableStereotypes(ISearchPageContainer container) { Set<Stereotype> preResult = new HashSet<Stereotype>(); @@ -122,8 +206,10 @@ public class StereotypeCollector implements IStereotypeCollector { boolean found = false; Profile profileToProcess = ((ProfileApplication) umlElement).getAppliedProfile(); for (Profile alreadyAddedProfile : profiles) { - - if (EcoreUtil.equals(alreadyAddedProfile, profileToProcess)) { + + //if (EcoreUtil.equals(alreadyAddedProfile, profileToProcess)) { + if (EcoreUtil.getURI(alreadyAddedProfile).equals(EcoreUtil.getURI(profileToProcess))) { + found = true; } } @@ -144,8 +230,7 @@ public class StereotypeCollector implements IStereotypeCollector { boolean found = false; Stereotype stereotypeToProcess = (Stereotype) profileContent; for (Stereotype alreadyAddedStereotype : preResult) { - - if (EcoreUtil.equals(alreadyAddedStereotype, stereotypeToProcess)) { + if (EcoreUtil.getURI(alreadyAddedStereotype).equals(EcoreUtil.getURI(stereotypeToProcess))) { found = true; } } @@ -168,8 +253,7 @@ public class StereotypeCollector implements IStereotypeCollector { boolean found = false; Stereotype stereotypeToProcess = (Stereotype) parent; for (Stereotype alreadyAddedStereotype : result) { - - if (EcoreUtil.equals(alreadyAddedStereotype, stereotypeToProcess)) { + if (EcoreUtil.getURI(alreadyAddedStereotype).equals(EcoreUtil.getURI(stereotypeToProcess))) { found = true; } } @@ -186,6 +270,64 @@ public class StereotypeCollector implements IStereotypeCollector { return result; } + + /** + * Computes the list of available stereotypes in the given collection of profiles + * + * @param container + * @param profiles + * @return + */ + public Collection<Stereotype> computeAvailableStereotypes(ISearchPageContainer container, Collection<Profile> profiles) { + Set<Stereotype> preResult = new HashSet<Stereotype>(); + + for (Profile profile : profiles) { + TreeIterator<EObject> profileContentIterator = profile.eAllContents(); + + while (profileContentIterator.hasNext()) { + EObject profileContent = profileContentIterator.next(); + if (profileContent instanceof Stereotype) { + boolean found = false; + Stereotype stereotypeToProcess = (Stereotype) profileContent; + for (Stereotype alreadyAddedStereotype : preResult) { + if (EcoreUtil.getURI(alreadyAddedStereotype).equals(EcoreUtil.getURI(stereotypeToProcess))) { + found = true; + } + } + + if (!found) { + preResult.add(stereotypeToProcess); + } + } + } + } + + Set<Stereotype> result = new HashSet<Stereotype>(); + for (Stereotype stereo : preResult) { + result.add(stereo); + for (Classifier parent : stereo.getGenerals()) { + if (parent instanceof Stereotype) { + result.add((Stereotype) parent); + + boolean found = false; + Stereotype stereotypeToProcess = (Stereotype) parent; + for (Stereotype alreadyAddedStereotype : result) { + if (EcoreUtil.getURI(alreadyAddedStereotype).equals(EcoreUtil.getURI(stereotypeToProcess))) { + found = true; + } + } + + if (!found) { + result.add(stereotypeToProcess); + } + + } + } + + } + + return result; + } public Collection<Stereotype> computeAppliedStereotypes(ISearchPageContainer container) { Set<URI> umlResources = new HashSet<URI>(); @@ -247,7 +389,8 @@ public class StereotypeCollector implements IStereotypeCollector { boolean exists = false; for (Stereotype existingStereotype : stereotypes) { - if (EcoreUtil.equals(existingStereotype, stereotype)) { + //if (EcoreUtil.equals(existingStereotype, stereotype)) { + if (EcoreUtil.getURI(existingStereotype).equals(EcoreUtil.getURI(stereotype))) { exists = true; break; } @@ -296,6 +439,128 @@ public class StereotypeCollector implements IStereotypeCollector { } /** + * Computes applied stereotypes in the given profile + * + * @param container + * @param profile + * @return stereotypes + */ + + public Collection<Stereotype> computeAppliedStereotypes(ISearchPageContainer container, Profile profile) { + if (profile == null) { + return computeAppliedStereotypes(container); + } + + Set<URI> umlResources = new HashSet<URI>(); + Set<Stereotype> stereotypes = new HashSet<Stereotype>(); + + if (container == null) { + umlResources.addAll(createWorkspaceScope()); + + } else { + switch (container.getSelectedScope()) { + case ISearchPageContainer.WORKSPACE_SCOPE: { + umlResources.addAll(createWorkspaceScope()); + break; + } + case ISearchPageContainer.SELECTION_SCOPE: { + ISelection selection = container.getSelection(); + + if (!selection.isEmpty()) { + if (selection instanceof IStructuredSelection) { + umlResources.addAll(createSelectionScope((IStructuredSelection) selection)); + } else { + // Do a workspace search instead + umlResources.addAll(createWorkspaceScope()); + } + } else { + // Do a workspace search instead + umlResources.addAll(createWorkspaceScope()); + } + break; + } + case ISearchPageContainer.SELECTED_PROJECTS_SCOPE: { + String[] projects = container.getSelectedProjectNames(); + umlResources.addAll(createProjectsScope(projects)); + break; + } + case ISearchPageContainer.WORKING_SET_SCOPE: { + IWorkingSet[] workingSets = container.getSelectedWorkingSets(); + umlResources.addAll(createWorkingSetsScope(workingSets)); + break; + } + default: { + break; + } + } + } + + for (URI uri : umlResources) { + ModelSet resourceSet = new ModelSet(); + Resource resource = resourceSet.getResource(uri, true); + EList<EObject> contents = resource.getContents(); + + for (EObject content : contents) { + if (!(content instanceof Model)) { + Element umlElement = UMLUtil.getBaseElement(content); + + if (umlElement instanceof Element) { + for (Stereotype stereotype : umlElement.getAppliedStereotypes()) { + if (EcoreUtil.getURI(stereotype.getProfile()).equals(EcoreUtil.getURI(profile))) { + boolean exists = false; + + for (Stereotype existingStereotype : stereotypes) { + //if (EcoreUtil.equals(existingStereotype, stereotype)) { + if (EcoreUtil.getURI(existingStereotype).equals(EcoreUtil.getURI(stereotype))) { + exists = true; + break; + } + } + + if (!exists) { + stereotypes.add(stereotype); + } + } + } + } + } + + /** + * Keep old version for performance comparison + */ + /*while (UMLResourceContentIterator.hasNext()) { + EObject umlElement = UMLResourceContentIterator.next(); + + if (umlElement instanceof Model) { + Model umlModel = (Model) umlElement; + EList<Element> elements = umlModel.allOwnedElements(); + + for (Element element : elements) { + if (element.getAppliedStereotypes() != null && !element.getAppliedStereotypes().isEmpty()) { + for (Stereotype stereotype : element.getAppliedStereotypes()) { + boolean exists = false; + + for (Stereotype existingStereotype : stereotypes) { + if (EcoreUtil.equals(existingStereotype, stereotype)) { + exists = true; + break; + } + } + + if (!exists) { + stereotypes.add(stereotype); + } + } + } + } + }*/ + } + } + + return stereotypes; + } + + /** * Create a scope when the container is ISearchPageContainer.SELECTION_SCOPE * * @param selection diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations b/plugins/uml/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations index 5435ee3730b..9d2536249fd 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations +++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/model/uml.elementtypesconfigurations @@ -3846,4 +3846,12 @@ editHelperAdviceClassName="org.eclipse.papyrus.uml.service.types.helper.advice.ActivityGroupEditHelperAdvice"
inheritance="all"
target="_ScTgI1YCEeS0WsAAtVmToA"/>
+ <adviceBindingsConfigurations
+ xmi:id="_yHsHwOg-EeSqZs7o0maBIQ"
+ name="Stereotype Applications Advice"
+ description="Advice for stereotype applications, primarily supplying them as dependents in the destruction of their base element."
+ identifier="org.eclipse.papyrus.uml.advice.StereotypeApplication"
+ editHelperAdviceClassName="org.eclipse.papyrus.uml.service.types.helper.advice.StereotypeApplicationAdvice"
+ inheritance="all"
+ target="_ScgUUFYCEeS0WsAAtVmToA"/>
</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/UnapplyAllStereotypesCommand.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/UnapplyAllStereotypesCommand.java index 577ce39896e..c1dbc5a3442 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/UnapplyAllStereotypesCommand.java +++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/command/UnapplyAllStereotypesCommand.java @@ -1,39 +1,30 @@ /*******************************************************************************
- * Copyright (c) 2008 Conselleria de Infraestructuras y Transporte,
- * Generalitat de la Comunitat Valenciana .
+ * Copyright (c) 2008, 2015 Conselleria de Infraestructuras y Transporte, Generalitat de la Comunitat Valenciana, Christian W. Damus, 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: Francisco Javier Cano Muñoz (Prodevelop) - initial API implementation
- * Mathieu Velten (Atos Origin) - re-written using transactional command
+ * Contributors:
+ * Francisco Javier Cano Muñoz (Prodevelop) - initial API implementation
+ * Mathieu Velten (Atos Origin) - re-written using transactional command
+ * Christian W. Damus - bug 458685
*
******************************************************************************/
package org.eclipse.papyrus.uml.service.types.command;
-import java.util.List;
-import java.util.ListIterator;
-
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.papyrus.commands.DestroyElementPapyrusCommand;
import org.eclipse.uml2.uml.Element;
/**
* Unapplies all stereotypes from an Element.
+ *
+ * @deprecated Proper delegation to the Edit Service ensures deletion of stereotype applications when UML elements are deleted.
*/
-public class UnapplyAllStereotypesCommand extends CompositeCommand {
+@Deprecated
+public class UnapplyAllStereotypesCommand extends org.eclipse.papyrus.uml.diagram.common.commands.UnapplyAllStereotypesCommand {
public UnapplyAllStereotypesCommand(TransactionalEditingDomain domain, String label, Element element) {
- super(label);
- List<EObject> stereotypeApplications = element.getStereotypeApplications();
- for (ListIterator<EObject> it = stereotypeApplications.listIterator(stereotypeApplications.size()); it.hasPrevious(); ) {
- EObject stereotypeApplication = it.previous();
- DestroyElementRequest stereoReq = new DestroyElementRequest(domain, stereotypeApplication, false);
- add(new DestroyElementPapyrusCommand(stereoReq));
- }
+ super(domain, label, element);
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ElementEditHelper.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ElementEditHelper.java index 24e4bd993ec..aab70c3862e 100644 --- a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ElementEditHelper.java +++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/ElementEditHelper.java @@ -1,6 +1,5 @@ /*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
- *
+ * Copyright (c) 2011, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,8 +7,8 @@ * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- *
* Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 458685
*
*****************************************************************************/
package org.eclipse.papyrus.uml.service.types.helper;
@@ -17,15 +16,11 @@ package org.eclipse.papyrus.uml.service.types.helper; import java.util.Map;
import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.papyrus.infra.gmfdiag.common.helper.DefaultEditHelper;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
-import org.eclipse.papyrus.uml.service.types.command.UnapplyAllStereotypesCommand;
import org.eclipse.uml2.uml.Element;
/**
@@ -60,33 +55,7 @@ public class ElementEditHelper extends DefaultEditHelper { @SuppressWarnings("unchecked")
@Override
protected Map<EClass, EReference> getDefaultContainmentFeatures() {
- return (Map<EClass, EReference>) super.getDefaultContainmentFeatures();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected ICommand getDestroyElementCommand(DestroyElementRequest req) {
-
- // Default destroy command
- ICommand destroyCommand = super.getDestroyElementCommand(req);
- // Stereotype application remove command
- ICommand removeStereotypeCommand = null;
-
- // Prepare stereotype application remove command
- EObject elementToDestroy = req.getElementToDestroy();
- if (elementToDestroy instanceof Element) {
- removeStereotypeCommand = new UnapplyAllStereotypesCommand(req.getEditingDomain(), req.getLabel(), (Element) elementToDestroy);
- }
-
- // Compose both commands
- destroyCommand = CompositeCommand.compose(removeStereotypeCommand, destroyCommand);
- if (destroyCommand != null) {
- destroyCommand = destroyCommand.reduce();
- }
-
- return destroyCommand;
+ return super.getDefaultContainmentFeatures();
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/StereotypeApplicationAdvice.java b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/StereotypeApplicationAdvice.java new file mode 100644 index 00000000000..712bbdeb337 --- /dev/null +++ b/plugins/uml/org.eclipse.papyrus.uml.service.types/src/org/eclipse/papyrus/uml/service/types/helper/advice/StereotypeApplicationAdvice.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015 Christian W. Damus 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: + * Christian W. Damus - Initial API and implementation + * + */ +package org.eclipse.papyrus.uml.service.types.helper.advice; + +import java.util.Collection; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; +import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest; +import org.eclipse.papyrus.infra.tools.util.TypeUtils; +import org.eclipse.uml2.uml.Element; + +/** + * An advisor of element destruction that ensure destruction of the stereotype applications attached to the element. + */ +public class StereotypeApplicationAdvice extends AbstractEditHelperAdvice { + + public StereotypeApplicationAdvice() { + super(); + } + + @Override + protected ICommand getBeforeDestroyDependentsCommand(DestroyDependentsRequest request) { + ICommand result = super.getBeforeDestroyDependentsCommand(request); + + Element destructee = TypeUtils.as(request.getElementToDestroy(), Element.class); + if (destructee != null) { + Collection<? extends EObject> stereotypeApplications = destructee.getStereotypeApplications(); + if (stereotypeApplications != null) { + // Destroy them + DestroyDependentsRequest dependents = new DestroyDependentsRequest(request.getEditingDomain(), destructee, false); + dependents.setClientContext(request.getClientContext()); + dependents.addParameters(request.getParameters()); + ICommand dependentsCommand = dependents.getDestroyDependentsCommand(stereotypeApplications); + + if (dependentsCommand != null) { + result = (result == null) ? dependentsCommand : result.compose(dependentsCommand); + } + } + } + + return result; + } +} diff --git a/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/scope/ScopeCollector.java b/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/scope/ScopeCollector.java index f683e4d8b93..c26d890b076 100644 --- a/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/scope/ScopeCollector.java +++ b/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/scope/ScopeCollector.java @@ -24,8 +24,8 @@ import java.util.List; import java.util.Set; import java.util.SortedSet; -import org.eclipse.core.internal.resources.Project; import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspaceRoot; @@ -145,16 +145,16 @@ public class ScopeCollector implements IScopeCollector { while (it.hasNext()) { Object next = it.next(); - if (!(next instanceof IPapyrusFile) && !(next instanceof IPapyrusFile)) { - if (next instanceof Project) { - Project project = (Project) next; + if (!(next instanceof IPapyrusFile)) { + if (next instanceof IContainer) { // Folder, project, etc... + IContainer project = (IContainer) next; ArrayList<URI> diFiles = new ArrayList<URI>(); IPath path = project.getLocation(); IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); - + recursiveFindDiFiles(diFiles, path, workspaceRoot); results.addAll(diFiles); - } else { + } else { // Not a container, so it is some other kind of resource (e.g. file, graphical element) Object element = BusinessModelResolver.getInstance().getBusinessModel(next); if (element instanceof EObject) { // CDO resource *are* EObjects @@ -202,18 +202,21 @@ public class ScopeCollector implements IScopeCollector { } protected void recursiveFindDiFiles(ArrayList<URI> diFiles, IPath path, IWorkspaceRoot workspaceRoot) { - IContainer container = workspaceRoot.getContainerForLocation(path); + IContainer container = workspaceRoot.getContainerForLocation(path); try { IResource[] iResources; iResources = container.members(); - for (IResource iResource : iResources){ - // for c files - if ("di".equalsIgnoreCase(iResource.getFileExtension())) { - //diFiles.add(iResource.getLocationURI()); - URI theURI = URI.createPlatformResourceURI(iResource.getFullPath().toString(), true); - diFiles.add(theURI); - } else if (iResource.getType() == IResource.FOLDER) { + + for (IResource iResource : iResources) { + IFile iFile = (IFile) iResource.getAdapter(IFile.class); + + if (iFile != null) { + if ("di".equalsIgnoreCase(iResource.getFileExtension())) { + URI theURI = URI.createPlatformResourceURI(iResource.getFullPath().toString(), true); + diFiles.add(theURI); + } + } else { IPath tmpPath = iResource.getLocation(); recursiveFindDiFiles(diFiles, tmpPath, workspaceRoot); } diff --git a/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14CompositeStructureDiagramElementTypesTest.java b/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14CompositeStructureDiagramElementTypesTest.java index 9aa46f82493..08b23258490 100644 --- a/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14CompositeStructureDiagramElementTypesTest.java +++ b/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14CompositeStructureDiagramElementTypesTest.java @@ -35,346 +35,309 @@ public class SysML14CompositeStructureDiagramElementTypesTest { Assert.assertNotNull("The SysML 1.4 Composite Structure Diagram element type set definition is missing", elementTypeSetConfiguration); } - - @Test - public void testRegistryContentForValueType_3080() { - Assert.assertTrue("ValueType (3080) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ValueType_3080")); - } - - @Test - public void testRegistryContentForValueType_2068() { - Assert.assertTrue("ValueType (2068) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ValueType_2068")); - } - - @Test - public void testRegistryContentForDistributedProperty_3070() { - Assert.assertTrue("DistributedProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.DistributedProperty_3070")); - } - - @Test - public void testRegistryContentForDistributedProperty_3101() { - Assert.assertTrue("DistributedProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.DistributedProperty_3101")); - } - - @Test - public void testRegistryContentForConnectorProperty_3070() { - Assert.assertTrue("ConnectorProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConnectorProperty_3070")); - } - - @Test - public void testRegistryContentForConnectorProperty_3101() { - Assert.assertTrue("ConnectorProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConnectorProperty_3101")); - } - - @Test - public void testRegistryContentForParticipantProperty_3070() { - Assert.assertTrue("ParticipantProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ParticipantProperty_3070")); - } - - @Test - public void testRegistryContentForParticipantProperty_3101() { - Assert.assertTrue("ParticipantProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ParticipantProperty_3101")); - } - - @Test - public void testRegistryContentForBindingConnector() { - Assert.assertTrue("BindingConnector element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.BindingConnector_4013")); - } - - @Test - public void testRegistryContentForBlock_3085() { - Assert.assertTrue("Block (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Block_3085")); - } - - @Test - public void testRegistryContentForBlock_2073() { - Assert.assertTrue("Block (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Block_2073")); - } - - @Test - public void testRegistryContentForEndPathMultiplicity_3070() { - Assert.assertTrue("EndPathMultiplicity (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.EndPathMultiplicity_3070")); - } - - @Test - public void testRegistryContentForEndPathMultiplicity_3101() { - Assert.assertTrue("EndPathMultiplicity (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.EndPathMultiplicity_3101")); - } - - @Test - public void testRegistryContentForBoundReference_3070() { - Assert.assertTrue("BoundReference (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.BoundReference_3070")); - } - - @Test - public void testRegistryContentForBoundReference_3101() { - Assert.assertTrue("BoundReference (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.BoundReference_3101")); - } - - @Test - public void testRegistryContentForAdjunctProperty_3070() { - Assert.assertTrue("AdjunctProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.AdjunctProperty_3070")); - } - - @Test - public void testRegistryContentForAdjunctProperty_3101() { - Assert.assertTrue("AdjunctProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.AdjunctProperty_3101")); - } - - @Test - public void testRegistryContentForClassifierBehaviorProperty_3070() { - Assert.assertTrue("ClassifierBehaviorProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3070")); - } - - @Test - public void testRegistryContentForClassifierBehaviorProperty_3101() { - Assert.assertTrue("ClassifierBehaviorProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3101")); - } - - @Test - public void testRegistryContentForItemFlow() { - Assert.assertTrue("ItemFlow element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ItemFlow_4021")); - } - - @Test - public void testRegistryContentForFlowProperty_3070() { - Assert.assertTrue("FlowProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowProperty_3070")); - } - - @Test - public void testRegistryContentForFlowProperty_3101() { - Assert.assertTrue("FlowProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowProperty_3101")); - } - - @Test - public void testRegistryContentForFullPort() { - Assert.assertTrue("FullPort element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FullPort_3069")); - } - - @Test - public void testRegistryContentForInterfaceBlock_3085() { - Assert.assertTrue("InterfaceBlock (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.InterfaceBlock_3085")); - } - - @Test - public void testRegistryContentForInterfaceBlock_2073() { - Assert.assertTrue("InterfaceBlock (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.InterfaceBlock_2073")); - } - - @Test - public void testRegistryContentForProxyPort() { - Assert.assertTrue("ProxyPort element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ProxyPort_3069")); - } - - @Test - public void testRegistryContentForChangeStructuralFeatureEvent() { - Assert.assertTrue("ChangeStructuralFeatureEvent element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent_2088")); - } - - @Test - public void testRegistryContentForControlOperator_Operation() { - Assert.assertTrue("ControlOperator Operation element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ControlOperator_Operation_3102")); - } - - @Test - public void testRegistryContentForRate_Parameter() { - Assert.assertTrue("Rate Parameter element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Rate_Parameter_3088")); - } - - @Test - public void testRegistryContentForDiscrete_Parameter() { - Assert.assertTrue("Discrete Parameter element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Discrete_Parameter_3088")); - } - - @Test - public void testRegistryContentForContinuous_Parameter() { - Assert.assertTrue("Continuous Parameter element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Continuous_Parameter_3088")); - } - - @Test - public void testRegistryContentForOptional() { - Assert.assertTrue("Optional element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Optional_3088")); - } - - @Test - public void testRegistryContentForRationale_3097() { - Assert.assertTrue("Rationale (3097) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Rationale_3097")); - } - - @Test - public void testRegistryContentForRationale_2109() { - Assert.assertTrue("Rationale (2109) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Rationale_2109")); - } - - @Test - public void testRegistryContentForView_Package() { - Assert.assertTrue("View Package element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.View_Package_CompositeStructure")); - } - - @Test - public void testRegistryContentForView_3085() { - Assert.assertTrue("View (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.View_Class_3085")); - } - - @Test - public void testRegistryContentForView_2073() { - Assert.assertTrue("View (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.View_Class_2073")); - } - - @Test - public void testRegistryContentForConform_Dependency() { - Assert.assertTrue("Conform Dependency element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Conform_Dependency_4010")); - } - - @Test - public void testRegistryContentForConform_Generalization() { - Assert.assertTrue("Conform Generalization element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Conform_Generalization_4015")); - } - - @Test - public void testRegistryContentForProblem_3097() { - Assert.assertTrue("Problem (3097) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Problem_3097")); - } - - @Test - public void testRegistryContentForProblem_2109() { - Assert.assertTrue("Problem (2109) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Problem_2109")); - } - - @Test - public void testRegistryContentForViewPoint_3085() { - Assert.assertTrue("ViewPoint (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ViewPoint_3085")); - } - - @Test - public void testRegistryContentForViewPoint_2073() { - Assert.assertTrue("ViewPoint (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ViewPoint_2073")); - } - - @Test - public void testRegistryContentForExpose() { - Assert.assertTrue("Expose element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Expose_4010")); - } - - @Test - public void testRegistryContentForElementGroup_3097() { - Assert.assertTrue("ElementGroup (3097) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ElementGroup_3097")); - } - - @Test - public void testRegistryContentForElementGroup_2109() { - Assert.assertTrue("ElementGroup (2109) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ElementGroup_2109")); - } - - @Test - public void testRegistryContentForConstraintBlock_3085() { - Assert.assertTrue("ConstraintBlock (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConstraintBlock_3085")); - } - - @Test - public void testRegistryContentForConstraintBlock_2073() { - Assert.assertTrue("ConstraintBlock (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConstraintBlock_2073")); - } - - @Test - public void testRegistryContentForAllocate_Abstraction() { - Assert.assertTrue("Allocate Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Allocate_Abstraction_4007")); - } - - @Test - public void testRegistryContentForDeriveReqt_Abstraction() { - Assert.assertTrue("DeriveReqt Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction_4007")); - } - - @Test - public void testRegistryContentForCopy_Abstraction() { - Assert.assertTrue("Copy Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Copy_Abstraction_4007")); - } - - @Test - public void testRegistryContentForSatisfy_Abstraction() { - Assert.assertTrue("Satisfy Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Satisfy_Abstraction_4007")); - } - - @Test - public void testRegistryContentForTestCase_Operation() { - Assert.assertTrue("TestCase Operation element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.TestCase_Operation_3102")); - } - - @Test - public void testRegistryContentForRequirement_3085() { - Assert.assertTrue("Requirement (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Requirement_3085")); - } - - @Test - public void testRegistryContentForRequirement_2073() { - Assert.assertTrue("Requirement (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Requirement_2073")); - } - - @Test - public void testRegistryContentForVerify_Abstraction() { - Assert.assertTrue("Verify Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Verify_Abstraction_4007")); - } - - @Test - public void testRegistryContentForTrace_Abstraction() { - Assert.assertTrue("Trace Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Trace_Abstraction_4007")); - } - - @Test - public void testRegistryContentForRefine_Abstraction() { - Assert.assertTrue("Refine Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Refine_Abstraction_4007")); - } - - @Test - public void testRegistryContentForFlowPort() { - Assert.assertTrue("FlowPort element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowPort_3069")); - } - - @Test - public void testRegistryContentForFlowSpecification_3087() { - Assert.assertTrue("FlowSpecification (3087) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowSpecification_3087")); - } - - @Test - public void testRegistryContentForFlowSpecification_2076() { - Assert.assertTrue("FlowSpecification (2076) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowSpecification_2076")); - } - - @Test - public void testRegistryContentForDeprecated_3070() { - Assert.assertTrue("Deprecated (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Property_3070")); - } - - @Test - public void testRegistryContentForDeprecated_3101() { - Assert.assertTrue("Deprecated (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Property_3101")); - } - - @Test - public void testRegistryContentForDeprecated_3085() { - Assert.assertTrue("Deprecated (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Class_3085")); - } - - @Test - public void testRegistryContentForDeprecated_2073() { - Assert.assertTrue("Deprecated (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Class_2073")); - } - - @Test - public void testRegistryContentForDeprecated_Generalization() { - Assert.assertTrue("Deprecated Generalization element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Generalization_4015")); - } - - @Test - public void testRegistryContentForDeprecated_3080() { - Assert.assertTrue("Deprecated (3080) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_DataType_3080")); - } - - @Test - public void testRegistryContentForDeprecated_2068() { - Assert.assertTrue("Deprecated (2068) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_DataType_2068")); - } - + @Test + public void testRegistryContentForValueType_3080() { + Assert.assertTrue("ValueType (3080) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ValueType_3080")); + } + + @Test + public void testRegistryContentForValueType_2068() { + Assert.assertTrue("ValueType (2068) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ValueType_2068")); + } + + @Test + public void testRegistryContentForDistributedProperty_3070() { + Assert.assertTrue("DistributedProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.DistributedProperty_3070")); + } + + @Test + public void testRegistryContentForDistributedProperty_3101() { + Assert.assertTrue("DistributedProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.DistributedProperty_3101")); + } + + @Test + public void testRegistryContentForConnectorProperty_3070() { + Assert.assertTrue("ConnectorProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConnectorProperty_3070")); + } + + @Test + public void testRegistryContentForConnectorProperty_3101() { + Assert.assertTrue("ConnectorProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConnectorProperty_3101")); + } + + @Test + public void testRegistryContentForParticipantProperty_3070() { + Assert.assertTrue("ParticipantProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ParticipantProperty_3070")); + } + + @Test + public void testRegistryContentForParticipantProperty_3101() { + Assert.assertTrue("ParticipantProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ParticipantProperty_3101")); + } + + @Test + public void testRegistryContentForBindingConnector() { + Assert.assertTrue("BindingConnector element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.BindingConnector_4013")); + } + + @Test + public void testRegistryContentForBlock_3085() { + Assert.assertTrue("Block (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Block_3085")); + } + + @Test + public void testRegistryContentForBlock_2073() { + Assert.assertTrue("Block (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Block_2073")); + } + + @Test + public void testRegistryContentForEndPathMultiplicity_3070() { + Assert.assertTrue("EndPathMultiplicity (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.EndPathMultiplicity_3070")); + } + + @Test + public void testRegistryContentForEndPathMultiplicity_3101() { + Assert.assertTrue("EndPathMultiplicity (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.EndPathMultiplicity_3101")); + } + + @Test + public void testRegistryContentForBoundReference_3070() { + Assert.assertTrue("BoundReference (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.BoundReference_3070")); + } + + @Test + public void testRegistryContentForBoundReference_3101() { + Assert.assertTrue("BoundReference (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.BoundReference_3101")); + } + + @Test + public void testRegistryContentForAdjunctProperty_3070() { + Assert.assertTrue("AdjunctProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.AdjunctProperty_3070")); + } + + @Test + public void testRegistryContentForAdjunctProperty_3101() { + Assert.assertTrue("AdjunctProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.AdjunctProperty_3101")); + } + + @Test + public void testRegistryContentForClassifierBehaviorProperty_3070() { + Assert.assertTrue("ClassifierBehaviorProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3070")); + } + + @Test + public void testRegistryContentForClassifierBehaviorProperty_3101() { + Assert.assertTrue("ClassifierBehaviorProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3101")); + } + + @Test + public void testRegistryContentForItemFlow() { + Assert.assertTrue("ItemFlow element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ItemFlow_4021")); + } + + @Test + public void testRegistryContentForFlowProperty_3070() { + Assert.assertTrue("FlowProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowProperty_3070")); + } + + @Test + public void testRegistryContentForFlowProperty_3101() { + Assert.assertTrue("FlowProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowProperty_3101")); + } + + @Test + public void testRegistryContentForFullPort() { + Assert.assertTrue("FullPort element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FullPort_3069")); + } + + @Test + public void testRegistryContentForInterfaceBlock_3085() { + Assert.assertTrue("InterfaceBlock (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.InterfaceBlock_3085")); + } + + @Test + public void testRegistryContentForInterfaceBlock_2073() { + Assert.assertTrue("InterfaceBlock (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.InterfaceBlock_2073")); + } + + @Test + public void testRegistryContentForProxyPort() { + Assert.assertTrue("ProxyPort element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ProxyPort_3069")); + } + + @Test + public void testRegistryContentForChangeStructuralFeatureEvent() { + Assert.assertTrue("ChangeStructuralFeatureEvent element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent_2088")); + } + + @Test + public void testRegistryContentForControlOperator_Operation() { + Assert.assertTrue("ControlOperator Operation element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ControlOperator_Operation_3102")); + } + + @Test + public void testRegistryContentForRate_Parameter() { + Assert.assertTrue("Rate Parameter element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Rate_Parameter_3088")); + } + + @Test + public void testRegistryContentForDiscrete_Parameter() { + Assert.assertTrue("Discrete Parameter element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Discrete_Parameter_3088")); + } + + @Test + public void testRegistryContentForContinuous_Parameter() { + Assert.assertTrue("Continuous Parameter element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Continuous_Parameter_3088")); + } + + @Test + public void testRegistryContentForOptional() { + Assert.assertTrue("Optional element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Optional_3088")); + } + + @Test + public void testRegistryContentForRationale_3097() { + Assert.assertTrue("Rationale (3097) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Rationale_3097")); + } + + @Test + public void testRegistryContentForRationale_2109() { + Assert.assertTrue("Rationale (2109) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Rationale_2109")); + } + + @Test + public void testRegistryContentForView_Package() { + Assert.assertTrue("View Package element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.View_Package_CompositeStructure")); + } + + @Test + public void testRegistryContentForView_3085() { + Assert.assertTrue("View (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.View_Class_3085")); + } + + @Test + public void testRegistryContentForView_2073() { + Assert.assertTrue("View (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.View_Class_2073")); + } + + @Test + public void testRegistryContentForConform_Dependency() { + Assert.assertTrue("Conform Dependency element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Conform_Dependency_4010")); + } + + @Test + public void testRegistryContentForConform_Generalization() { + Assert.assertTrue("Conform Generalization element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Conform_Generalization_4015")); + } + + @Test + public void testRegistryContentForProblem_3097() { + Assert.assertTrue("Problem (3097) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Problem_3097")); + } + + @Test + public void testRegistryContentForProblem_2109() { + Assert.assertTrue("Problem (2109) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Problem_2109")); + } + + @Test + public void testRegistryContentForViewPoint_3085() { + Assert.assertTrue("ViewPoint (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ViewPoint_3085")); + } + + @Test + public void testRegistryContentForViewPoint_2073() { + Assert.assertTrue("ViewPoint (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ViewPoint_2073")); + } + + @Test + public void testRegistryContentForExpose() { + Assert.assertTrue("Expose element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Expose_4010")); + } + + @Test + public void testRegistryContentForElementGroup_3097() { + Assert.assertTrue("ElementGroup (3097) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ElementGroup_3097")); + } + + @Test + public void testRegistryContentForElementGroup_2109() { + Assert.assertTrue("ElementGroup (2109) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ElementGroup_2109")); + } + + @Test + public void testRegistryContentForConstraintBlock_3085() { + Assert.assertTrue("ConstraintBlock (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConstraintBlock_3085")); + } + + @Test + public void testRegistryContentForConstraintBlock_2073() { + Assert.assertTrue("ConstraintBlock (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConstraintBlock_2073")); + } + + @Test + public void testRegistryContentForAllocate_Abstraction() { + Assert.assertTrue("Allocate Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Allocate_Abstraction_4007")); + } + + @Test + public void testRegistryContentForDeriveReqt_Abstraction() { + Assert.assertTrue("DeriveReqt Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction_4007")); + } + + @Test + public void testRegistryContentForCopy_Abstraction() { + Assert.assertTrue("Copy Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Copy_Abstraction_4007")); + } + + @Test + public void testRegistryContentForSatisfy_Abstraction() { + Assert.assertTrue("Satisfy Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Satisfy_Abstraction_4007")); + } + + @Test + public void testRegistryContentForTestCase_Operation() { + Assert.assertTrue("TestCase Operation element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.TestCase_Operation_3102")); + } + + @Test + public void testRegistryContentForRequirement_3085() { + Assert.assertTrue("Requirement (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Requirement_3085")); + } + + @Test + public void testRegistryContentForRequirement_2073() { + Assert.assertTrue("Requirement (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Requirement_2073")); + } + + @Test + public void testRegistryContentForVerify_Abstraction() { + Assert.assertTrue("Verify Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Verify_Abstraction_4007")); + } + + @Test + public void testRegistryContentForTrace_Abstraction() { + Assert.assertTrue("Trace Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Trace_Abstraction_4007")); + } + + @Test + public void testRegistryContentForRefine_Abstraction() { + Assert.assertTrue("Refine Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Refine_Abstraction_4007")); + } + + @Test + public void testRegistryContentForFlowPort() { + Assert.assertTrue("FlowPort element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowPort_3069")); + } + + @Test + public void testRegistryContentForFlowSpecification_3087() { + Assert.assertTrue("FlowSpecification (3087) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowSpecification_3087")); + } + + @Test + public void testRegistryContentForFlowSpecification_2076() { + Assert.assertTrue("FlowSpecification (2076) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowSpecification_2076")); + } } diff --git a/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14UMLClassDiagramElementTypesTest.java b/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14UMLClassDiagramElementTypesTest.java index 6fadf2fbb44..6db4105cd36 100644 --- a/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14UMLClassDiagramElementTypesTest.java +++ b/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14UMLClassDiagramElementTypesTest.java @@ -155,6 +155,11 @@ public class SysML14UMLClassDiagramElementTypesTest { } @Test + public void testRegistryContentForBlock_NestedBlock_Classifier() { + Assert.assertTrue("Block (NestedBlock_Classifier) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Block_NestedBlock_Classifier")); + } + + @Test public void testRegistryContentForBlock_3004() { Assert.assertTrue("Block (3004) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Block_3004")); } @@ -655,119 +660,88 @@ public class SysML14UMLClassDiagramElementTypesTest { } @Test - public void testRegistryContentForDeprecated_3002() { - Assert.assertTrue("Deprecated (3002) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Property_3002")); - } - - @Test - public void testRegistryContentForDeprecated_3005() { - Assert.assertTrue("Deprecated (3005) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Property_3005")); - } - - @Test - public void testRegistryContentForDeprecated_3006() { - Assert.assertTrue("Deprecated (3006) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Property_3006")); - } - - @Test - public void testRegistryContentForDeprecated_3012() { - Assert.assertTrue("Deprecated (3012) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Property_3012")); - } - - @Test - public void testRegistryContentForDeprecated_3018() { - Assert.assertTrue("Deprecated (3018) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Property_3018")); + public void testRegistryContentForFlowPort_FlowPort_Label() { + Assert.assertTrue("FlowPort (FlowPort_Label) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.FlowPort_Label")); } @Test - public void testRegistryContentForDeprecated_3041() { - Assert.assertTrue("Deprecated (3041) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Property_3041")); + public void testRegistryContentForFlowPort_3005() { + Assert.assertTrue("FlowPort (3005) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.FlowPort_3005")); } @Test - public void testRegistryContentForDeprecated_4021() { - Assert.assertTrue("Deprecated (4021) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_4021")); + public void testRegistryContentForFlowPort_3006() { + Assert.assertTrue("FlowPort (3006) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.FlowPort_3006")); } @Test - public void testRegistryContentForDeprecated_2001() { - Assert.assertTrue("Deprecated (2001) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_2001")); + public void testRegistryContentForFlowPort_3012() { + Assert.assertTrue("FlowPort (3012) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.FlowPort_3012")); } @Test - public void testRegistryContentForDeprecated_3020() { - Assert.assertTrue("Deprecated (3020) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_3020")); + public void testRegistryContentForFlowPort_3018() { + Assert.assertTrue("FlowPort (3018) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.FlowPort_3018")); } @Test - public void testRegistryContentForDeprecated_2008() { - Assert.assertTrue("Deprecated (2008) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Class_2008")); + public void testRegistryContentForFlowPort_3041() { + Assert.assertTrue("FlowPort (3041) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.FlowPort_3041")); } @Test - public void testRegistryContentForDeprecated_3004() { - Assert.assertTrue("Deprecated (3004) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Class_3004")); + public void testRegistryContentForControlOperator_Operation_BorderItem() { + Assert.assertTrue("ControlOperator (Operation_BorderItem) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.ControlOperator_Operation_Operation_BorderItem")); } @Test - public void testRegistryContentForDeprecated_3008() { - Assert.assertTrue("Deprecated (3008) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Class_3008")); + public void testRegistryContentForVerify_Link() { + Assert.assertTrue("Verify_Link element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Verify_Abstraction_Verify_Link")); } @Test - public void testRegistryContentForDeprecated_3010() { - Assert.assertTrue("Deprecated (3010) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Class_3010")); + public void testRegistryContentForConstraint_Constraint_Label() { + Assert.assertTrue("Constraint (Constraint_Label) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Constraint_Label")); } @Test - public void testRegistryContentForDeprecated_3014() { - Assert.assertTrue("Deprecated (3014) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Class_3014")); + public void testRegistryContentForActor() { + Assert.assertTrue("Actor element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Actor_2008")); } @Test - public void testRegistryContentForDeprecated_2015() { - Assert.assertTrue("Deprecated (2015) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Association_2015")); + public void testRegistryContentForUnit_2001() { + Assert.assertTrue("Unit_2001 element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Unit_2001")); } @Test - public void testRegistryContentForDeprecated_4001() { - Assert.assertTrue("Deprecated (4001) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Association_4001")); + public void testRegistryContentForUnit_3020() { + Assert.assertTrue("Unit_3020 element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Unit_3020")); } @Test - public void testRegistryContentForDeprecated_4019() { - Assert.assertTrue("Deprecated (4019) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Association_4019")); + public void testRegistryContentForQuantityKind_2001() { + Assert.assertTrue("QuantityKind_2001 element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.QuantityKind_2001")); } @Test - public void testRegistryContentForDeprecated_Generalization() { - Assert.assertTrue("Deprecated Generalization element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Generalization_4002")); + public void testRegistryContentForQuantityKind_3020() { + Assert.assertTrue("QuantityKind_3020 element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.QuantityKind_3020")); } @Test - public void testRegistryContentForDeprecated_2010() { - Assert.assertTrue("Deprecated (2010) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_DataType_2010")); + public void testRegistryContentForPartAssociation_2015() { + Assert.assertTrue("PartAssociation_2015 element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.PartAssociation_2015")); } @Test - public void testRegistryContentForDeprecated_3027() { - Assert.assertTrue("Deprecated (3027) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_DataType_3027")); + public void testRegistryContentForPartAssociation_4001() { + Assert.assertTrue("PartAssociation_4001 element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.PartAssociation_4001")); } @Test - public void testRegistryContentForDeprecated_3043() { - Assert.assertTrue("Deprecated (3043) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_DataType_3043")); + public void testRegistryContentForPartAssociation_4019() { + Assert.assertTrue("PartAssociation_4019 element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.PartAssociation_4019")); } - @Test - public void testRegistryContentForDeprecated_3044() { - Assert.assertTrue("Deprecated (3044) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_DataType_3044")); - } - - @Test - public void testRegistryContentForDeprecated_3045() { - Assert.assertTrue("Deprecated (3045) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_DataType_3045")); - } - - } diff --git a/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.service.types.tests/src/org/eclipse/papyrus/sysml14/service/types/tests/SysML14ElementTypesTest.java b/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.service.types.tests/src/org/eclipse/papyrus/sysml14/service/types/tests/SysML14ElementTypesTest.java index c9e6afa0939..e5f80889a4d 100644 --- a/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.service.types.tests/src/org/eclipse/papyrus/sysml14/service/types/tests/SysML14ElementTypesTest.java +++ b/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.service.types.tests/src/org/eclipse/papyrus/sysml14/service/types/tests/SysML14ElementTypesTest.java @@ -35,6 +35,7 @@ public class SysML14ElementTypesTest { Assert.assertNotNull("The SysML 1.4 element type set definition is missing", elementTypeSetConfiguration); } + @Test public void testRegistryContentForValueType() { Assert.assertTrue("ValueType element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ValueType")); @@ -401,39 +402,20 @@ public class SysML14ElementTypesTest { } @Test - public void testRegistryContentForDeprecated_ValueSpecification() { - Assert.assertTrue("Deprecated ValueSpecification element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_ValueSpecification")); - } - - @Test - public void testRegistryContentForDeprecated_Property() { - Assert.assertTrue("Deprecated Property element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Property")); - } - - @Test - public void testRegistryContentForDeprecated_InstanceSpecification() { - Assert.assertTrue("Deprecated InstanceSpecification element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_InstanceSpecification")); - } - - @Test - public void testRegistryContentForDeprecated_Class() { - Assert.assertTrue("Deprecated Class element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Class")); + public void testRegistryContentForUnit() { + Assert.assertTrue("Unit element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Unit")); } @Test - public void testRegistryContentForDeprecated_Association() { - Assert.assertTrue("Deprecated Association element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Association")); + public void testRegistryContentForQuantityKind() { + Assert.assertTrue("QuantityKind element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.QuantityKind")); } @Test - public void testRegistryContentForDeprecated_Generalization() { - Assert.assertTrue("Deprecated Generalization element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Generalization")); + public void testRegistryContentForPartAssociation() { + Assert.assertTrue("PartAssociation element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.PartAssociation")); } - @Test - public void testRegistryContentForDeprecated_DataType() { - Assert.assertTrue("Deprecated DataType element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_DataType")); - } } diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java index dceec239ec7..d09562b2c38 100644 --- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java +++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java @@ -10,10 +10,13 @@ * Christian W. Damus (CEA) - Initial API and implementation * Christian W. Damus - bug 399859 * Christian W. Damus - bug 451230 + * Christian W. Damus - bug 458685 * */ package org.eclipse.papyrus.junit.utils.rules; +import static org.hamcrest.CoreMatchers.instanceOf; +import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.fail; @@ -33,8 +36,14 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.commands.operations.IUndoableOperation; +import org.eclipse.core.runtime.IAdaptable; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; +import org.eclipse.emf.common.command.Command; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; @@ -45,6 +54,7 @@ import org.eclipse.emf.ecore.xmi.XMLResource; import org.eclipse.emf.ecore.xml.type.AnyType; import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.transaction.TransactionalEditingDomain; +import org.eclipse.emf.workspace.IWorkspaceCommandStack; import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel; import org.eclipse.papyrus.infra.emf.utils.EMFHelper; @@ -128,6 +138,48 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test return domain; } + public void execute(Command command) { + assertThat("Command not executable", command.canExecute(), is(true)); + getEditingDomain().getCommandStack().execute(command); + } + + public IStatus execute(IUndoableOperation operation, IProgressMonitor monitor, IAdaptable info) { + assertThat("Operation not executable", operation.canExecute(), is(true)); + assertThat("No operation history available", getEditingDomain().getCommandStack(), instanceOf(IWorkspaceCommandStack.class)); + + try { + IWorkspaceCommandStack stack = (IWorkspaceCommandStack) getEditingDomain().getCommandStack(); + operation.addContext(stack.getDefaultUndoContext()); + return stack.getOperationHistory().execute(operation, monitor, info); + } catch (ExecutionException e) { + e.printStackTrace(); + fail("Command execution failed: " + e.getLocalizedMessage()); + return null; // Unreachable + } + } + + public IStatus execute(IUndoableOperation operation) { + return execute(operation, null, null); + } + + public boolean canUndo() { + return getEditingDomain().getCommandStack().canUndo(); + } + + public void undo() { + assertThat("Cannot undo", canUndo(), is(true)); + getEditingDomain().getCommandStack().undo(); + } + + public boolean canRedo() { + return getEditingDomain().getCommandStack().canRedo(); + } + + public void redo() { + assertThat("Cannot redo", canRedo(), is(true)); + getEditingDomain().getCommandStack().redo(); + } + public ResourceSet getResourceSet() { EditingDomain domain = getEditingDomain(); return (domain == null) ? null : domain.getResourceSet(); diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/org.eclipse.papyrus.uml.diagram.sequence.tests.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/org.eclipse.papyrus.uml.diagram.sequence.tests.launch index b95c58e8aa1..bab5742ef15 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/org.eclipse.papyrus.uml.diagram.sequence.tests.launch +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/org.eclipse.papyrus.uml.diagram.sequence.tests.launch @@ -1,42 +1,43 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bad_container_name" value="\org.eclipse.papyrus.uml.diagram.sequence.tests\junit.launcher"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-sequence-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/AllTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.uml.diagram.sequence.tests.AllTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.diagram.sequence.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx2048m -XX:MaxPermSize=2048m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<booleanAttribute key="run_in_ui_thread" value="true"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig"> +<booleanAttribute key="append.args" value="true"/> +<booleanAttribute key="askclear" value="false"/> +<booleanAttribute key="automaticAdd" value="true"/> +<booleanAttribute key="automaticValidate" value="false"/> +<stringAttribute key="bad_container_name" value="\org.eclipse.papyrus.uml.diagram.sequence.tests\junit.launcher"/> +<stringAttribute key="bootstrap" value=""/> +<stringAttribute key="checked" value="[NONE]"/> +<booleanAttribute key="clearConfig" value="true"/> +<booleanAttribute key="clearws" value="true"/> +<booleanAttribute key="clearwslog" value="false"/> +<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/> +<booleanAttribute key="default" value="true"/> +<booleanAttribute key="includeOptional" value="true"/> +<stringAttribute key="location" value="${workspace_loc}/../junit-sequence-workspace"/> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/AllTests.java"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="1"/> +</listAttribute> +<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> +<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> +<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> +<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> +<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> +<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> +<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.uml.diagram.sequence.tests.AllTests"/> +<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.diagram.sequence.tests"/> +<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/> +<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx2048m -XX:MaxPermSize=2048m -Doomph.setup.skip=true"/> +<stringAttribute key="pde.version" value="3.3"/> +<stringAttribute key="product" value="org.eclipse.sdk.ide"/> +<booleanAttribute key="run_in_ui_thread" value="true"/> +<booleanAttribute key="show_selected_only" value="false"/> +<booleanAttribute key="tracing" value="false"/> +<booleanAttribute key="useCustomFeatures" value="false"/> +<booleanAttribute key="useDefaultConfig" value="true"/> +<booleanAttribute key="useDefaultConfigArea" value="false"/> +<booleanAttribute key="useProduct" value="true"/> +</launchConfiguration> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/model.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/model.di new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/model.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/model.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/model.notation new file mode 100644 index 00000000000..a6c12a797f7 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/model.notation @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_pGWtUOhCEeSqZs7o0maBIQ" type="PapyrusUMLClassDiagram" name="classes" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_qBhVEOhCEeSqZs7o0maBIQ" type="2008"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_0w3zsOhCEeSqZs7o0maBIQ" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_0w3zsehCEeSqZs7o0maBIQ" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_0w3zsuhCEeSqZs7o0maBIQ" key="StereotypeList" value="test::Bean"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_0w3zs-hCEeSqZs7o0maBIQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_0w3ztOhCEeSqZs7o0maBIQ" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_0w3ztehCEeSqZs7o0maBIQ" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_qBhVEuhCEeSqZs7o0maBIQ" type="5029"/> + <children xmi:type="notation:DecorationNode" xmi:id="_qBh8IOhCEeSqZs7o0maBIQ" type="8510"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_qBh8IehCEeSqZs7o0maBIQ" y="5"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_qBh8IuhCEeSqZs7o0maBIQ" type="7017"> + <styles xmi:type="notation:TitleStyle" xmi:id="_qBh8I-hCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_qBh8JOhCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_qBh8JehCEeSqZs7o0maBIQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qBh8JuhCEeSqZs7o0maBIQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_qBh8J-hCEeSqZs7o0maBIQ" type="7018"> + <styles xmi:type="notation:TitleStyle" xmi:id="_qBh8KOhCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_qBh8KehCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_qBh8KuhCEeSqZs7o0maBIQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qBh8K-hCEeSqZs7o0maBIQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_qBh8LOhCEeSqZs7o0maBIQ" type="7019"> + <styles xmi:type="notation:TitleStyle" xmi:id="_qBh8LehCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_qBh8LuhCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_qBh8L-hCEeSqZs7o0maBIQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qBh8MOhCEeSqZs7o0maBIQ"/> + </children> + <element xmi:type="uml:Class" href="model.uml#_qBaAUOhCEeSqZs7o0maBIQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qBhVEehCEeSqZs7o0maBIQ" x="127" y="172"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_sel0cOhCEeSqZs7o0maBIQ" type="2008"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1lg8sOhCEeSqZs7o0maBIQ" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1lhjwOhCEeSqZs7o0maBIQ" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1lhjwehCEeSqZs7o0maBIQ" key="StereotypeList" value="test::Bean"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1lhjwuhCEeSqZs7o0maBIQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1lhjw-hCEeSqZs7o0maBIQ" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1lhjxOhCEeSqZs7o0maBIQ" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_sembgOhCEeSqZs7o0maBIQ" type="5029"/> + <children xmi:type="notation:DecorationNode" xmi:id="_sembgehCEeSqZs7o0maBIQ" type="8510"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_sembguhCEeSqZs7o0maBIQ" y="5"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_sembg-hCEeSqZs7o0maBIQ" type="7017"> + <styles xmi:type="notation:TitleStyle" xmi:id="_sembhOhCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_sembhehCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_sembhuhCEeSqZs7o0maBIQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sembh-hCEeSqZs7o0maBIQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_sembiOhCEeSqZs7o0maBIQ" type="7018"> + <styles xmi:type="notation:TitleStyle" xmi:id="_sembiehCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_sembiuhCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_sembi-hCEeSqZs7o0maBIQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sembjOhCEeSqZs7o0maBIQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_sembjehCEeSqZs7o0maBIQ" type="7019"> + <styles xmi:type="notation:TitleStyle" xmi:id="_sembjuhCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_sembj-hCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_sembkOhCEeSqZs7o0maBIQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sembkehCEeSqZs7o0maBIQ"/> + </children> + <element xmi:type="uml:Class" href="model.uml#_sekmUOhCEeSqZs7o0maBIQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sel0cehCEeSqZs7o0maBIQ" x="395" y="181"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_pGWtUehCEeSqZs7o0maBIQ" name="diagram_compatibility_version" stringValue="1.0.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_pGWtUuhCEeSqZs7o0maBIQ"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="_pGWtU-hCEeSqZs7o0maBIQ"> + <owner xmi:type="uml:Model" href="model.uml#_pF72kOhCEeSqZs7o0maBIQ"/> + </styles> + <element xmi:type="uml:Model" href="model.uml#_pF72kOhCEeSqZs7o0maBIQ"/> + <edges xmi:type="notation:Connector" xmi:id="_taol8OhCEeSqZs7o0maBIQ" type="4008" source="_qBhVEOhCEeSqZs7o0maBIQ" target="_sel0cOhCEeSqZs7o0maBIQ"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2doQcOhCEeSqZs7o0maBIQ" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2do3gOhCEeSqZs7o0maBIQ" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2do3gehCEeSqZs7o0maBIQ" key="StereotypeList" value="test::Proxy"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2do3guhCEeSqZs7o0maBIQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2do3g-hCEeSqZs7o0maBIQ" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2do3hOhCEeSqZs7o0maBIQ" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_taol8-hCEeSqZs7o0maBIQ" type="6026"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_taol9OhCEeSqZs7o0maBIQ" y="40"/> + </children> + <children xmi:type="notation:DecorationNode" xmi:id="_taol9ehCEeSqZs7o0maBIQ" type="6027"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_taol9uhCEeSqZs7o0maBIQ" x="-4" y="-12"/> + </children> + <styles xmi:type="notation:FontStyle" xmi:id="_taol8ehCEeSqZs7o0maBIQ"/> + <element xmi:type="uml:Dependency" href="model.uml#_tak7kOhCEeSqZs7o0maBIQ"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_taol8uhCEeSqZs7o0maBIQ" points="[50, -1, -218, -10]$[218, -13, -50, -22]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_tbIVMOhCEeSqZs7o0maBIQ" id="(1.0,0.39)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_tbI8QOhCEeSqZs7o0maBIQ" id="(0.0,0.38)"/> + </edges> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/model.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/model.uml new file mode 100644 index 00000000000..5165666a90a --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/model.uml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:test="http:///schemas/test/_kpp4gOhCEeSqZs7o0maBIQ/0" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/test/_kpp4gOhCEeSqZs7o0maBIQ/0 test.profile.uml#_kpqfkOhCEeSqZs7o0maBIQ"> + <uml:Model xmi:id="_pF72kOhCEeSqZs7o0maBIQ" name="Model"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_pF72kehCEeSqZs7o0maBIQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_qBaAUOhCEeSqZs7o0maBIQ" name="Bean1"/> + <packagedElement xmi:type="uml:Class" xmi:id="_sekmUOhCEeSqZs7o0maBIQ" name="Bean2"/> + <packagedElement xmi:type="uml:Dependency" xmi:id="_tak7kOhCEeSqZs7o0maBIQ" client="_qBaAUOhCEeSqZs7o0maBIQ" supplier="_sekmUOhCEeSqZs7o0maBIQ"/> + <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_yzzDAOhCEeSqZs7o0maBIQ"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_yz0RIOhCEeSqZs7o0maBIQ" source="PapyrusVersion"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yz0RIehCEeSqZs7o0maBIQ" key="Version" value="0.0.1"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yz0RIuhCEeSqZs7o0maBIQ" key="Comment" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yz0RI-hCEeSqZs7o0maBIQ" key="Copyright" value="Copyright (c) 2015 Christian W. Damus 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:
 Christian W. Damus - Initial API and implementation"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yz0RJOhCEeSqZs7o0maBIQ" key="Date" value="2015-04-21"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yz0RJehCEeSqZs7o0maBIQ" key="Author" value="Christian W. Damus"/> + </eAnnotations> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_yzzqEOhCEeSqZs7o0maBIQ" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <references xmi:type="ecore:EPackage" href="test.profile.uml#_kpqfkOhCEeSqZs7o0maBIQ"/> + </eAnnotations> + <appliedProfile xmi:type="uml:Profile" href="test.profile.uml#_0wU2kOhBEeSqZs7o0maBIQ"/> + </profileApplication> + </uml:Model> + <test:Bean xmi:id="_0wwe8OhCEeSqZs7o0maBIQ" base_Classifier="_qBaAUOhCEeSqZs7o0maBIQ"/> + <test:Bean xmi:id="_1laPAOhCEeSqZs7o0maBIQ" base_Classifier="_sekmUOhCEeSqZs7o0maBIQ"/> + <test:Proxy xmi:id="_2diJ0OhCEeSqZs7o0maBIQ" base_Dependency="_tak7kOhCEeSqZs7o0maBIQ"/> +</xmi:XMI> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/test.profile.di b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/test.profile.di new file mode 100644 index 00000000000..bf9abab340f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/test.profile.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/test.profile.notation b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/test.profile.notation new file mode 100644 index 00000000000..4541e353916 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/test.profile.notation @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_0y1_EOhBEeSqZs7o0maBIQ" type="PapyrusUMLProfileDiagram" name="stereotypes" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_BiEqwOhCEeSqZs7o0maBIQ" type="1031"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_BiN0sOhCEeSqZs7o0maBIQ" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BiN0sehCEeSqZs7o0maBIQ" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BiN0suhCEeSqZs7o0maBIQ" key="StereotypeList" value="StandardProfile::Metaclass"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BiN0s-hCEeSqZs7o0maBIQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BiN0tOhCEeSqZs7o0maBIQ" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BiN0tehCEeSqZs7o0maBIQ" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_BiJjQOhCEeSqZs7o0maBIQ" type="1084"/> + <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BiJjQehCEeSqZs7o0maBIQ" x="335" y="100"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_BiObwOhCEeSqZs7o0maBIQ" type="1031"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_BiPC0OhCEeSqZs7o0maBIQ" source="Stereotype_Annotation"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BiPC0ehCEeSqZs7o0maBIQ" key="StereotypeWithQualifiedNameList" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BiPC0uhCEeSqZs7o0maBIQ" key="StereotypeList" value="StandardProfile::Metaclass"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BiPC0-hCEeSqZs7o0maBIQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BiPC1OhCEeSqZs7o0maBIQ" key="PropStereoDisplay" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BiPC1ehCEeSqZs7o0maBIQ" key="StereotypePropertyLocation" value="Compartment"/> + </eAnnotations> + <children xmi:type="notation:DecorationNode" xmi:id="_BiObwuhCEeSqZs7o0maBIQ" type="1084"/> + <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Classifier"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BiObw-hCEeSqZs7o0maBIQ" x="181" y="102"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_DFxSIOhCEeSqZs7o0maBIQ" type="1026"> + <children xmi:type="notation:DecorationNode" xmi:id="_DFx5MOhCEeSqZs7o0maBIQ" type="1034"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_DF0VcOhCEeSqZs7o0maBIQ" type="1071"> + <styles xmi:type="notation:TitleStyle" xmi:id="_DF0VcehCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_DF0VcuhCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_DF0Vc-hCEeSqZs7o0maBIQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DF0VdOhCEeSqZs7o0maBIQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_DF0VdehCEeSqZs7o0maBIQ" type="1019"> + <styles xmi:type="notation:TitleStyle" xmi:id="_DF0VduhCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_DF0Vd-hCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_DF0VeOhCEeSqZs7o0maBIQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DF0VeehCEeSqZs7o0maBIQ"/> + </children> + <element xmi:type="uml:Stereotype" href="test.profile.uml#_DFm6EOhCEeSqZs7o0maBIQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DFxSIehCEeSqZs7o0maBIQ" x="182" y="292"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_K4x7cOhCEeSqZs7o0maBIQ" type="1026"> + <children xmi:type="notation:DecorationNode" xmi:id="_K4x7cuhCEeSqZs7o0maBIQ" type="1034"/> + <children xmi:type="notation:BasicCompartment" xmi:id="_K4x7c-hCEeSqZs7o0maBIQ" type="1071"> + <styles xmi:type="notation:TitleStyle" xmi:id="_K4x7dOhCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_K4yigOhCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_K4yigehCEeSqZs7o0maBIQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_K4yiguhCEeSqZs7o0maBIQ"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_K4yig-hCEeSqZs7o0maBIQ" type="1019"> + <styles xmi:type="notation:TitleStyle" xmi:id="_K4yihOhCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:SortingStyle" xmi:id="_K4yihehCEeSqZs7o0maBIQ"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_K4yihuhCEeSqZs7o0maBIQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_K4yih-hCEeSqZs7o0maBIQ"/> + </children> + <element xmi:type="uml:Stereotype" href="test.profile.uml#_K4tC8OhCEeSqZs7o0maBIQ"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_K4x7cehCEeSqZs7o0maBIQ" x="345" y="288"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_0y1_EehBEeSqZs7o0maBIQ" name="diagram_compatibility_version" stringValue="1.0.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_0y1_EuhBEeSqZs7o0maBIQ"/> + <styles xmi:type="style:PapyrusViewStyle" xmi:id="_0y1_E-hBEeSqZs7o0maBIQ"> + <owner xmi:type="uml:Profile" href="test.profile.uml#_0wU2kOhBEeSqZs7o0maBIQ"/> + </styles> + <element xmi:type="uml:Profile" href="test.profile.uml#_0wU2kOhBEeSqZs7o0maBIQ"/> + <edges xmi:type="notation:Connector" xmi:id="_aMxp8OhCEeSqZs7o0maBIQ" type="1013" source="_DFxSIOhCEeSqZs7o0maBIQ" target="_BiObwOhCEeSqZs7o0maBIQ"> + <styles xmi:type="notation:FontStyle" xmi:id="_aMxp8ehCEeSqZs7o0maBIQ"/> + <element xmi:type="uml:Extension" href="test.profile.uml#_aMhyUOhCEeSqZs7o0maBIQ"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_aMxp8uhCEeSqZs7o0maBIQ" points="[0, -10, 1, 165]$[0, -150, 1, 25]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_aNbxQOhCEeSqZs7o0maBIQ" id="(0.5,0.1)"/> + </edges> + <edges xmi:type="notation:Connector" xmi:id="_a177sOhCEeSqZs7o0maBIQ" type="1013" source="_K4x7cOhCEeSqZs7o0maBIQ" target="_BiEqwOhCEeSqZs7o0maBIQ"> + <styles xmi:type="notation:FontStyle" xmi:id="_a177sehCEeSqZs7o0maBIQ"/> + <element xmi:type="uml:Extension" href="test.profile.uml#_a1z_4ehCEeSqZs7o0maBIQ"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_a177suhCEeSqZs7o0maBIQ" points="[-6, -12, 8, 163]$[-6, -200, 8, -25]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_a2LzUOhCEeSqZs7o0maBIQ" id="(0.54,0.12)"/> + </edges> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/test.profile.uml b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/test.profile.uml new file mode 100644 index 00000000000..8047e71114f --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/resource/bug458685/test.profile.uml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_0wU2kOhBEeSqZs7o0maBIQ" name="test" metaclassReference="_Bh4dgOhCEeSqZs7o0maBIQ _Bh5EkOhCEeSqZs7o0maBIQ" metamodelReference="_0wU2kehBEeSqZs7o0maBIQ"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dzhuMOhCEeSqZs7o0maBIQ" source="http://www.eclipse.org/uml2/2.0.0/UML"> + <contents xmi:type="ecore:EPackage" xmi:id="_kpqfkOhCEeSqZs7o0maBIQ" name="test" nsURI="http:///schemas/test/_kpp4gOhCEeSqZs7o0maBIQ/0" nsPrefix="test"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_kpsUwehCEeSqZs7o0maBIQ" source="PapyrusVersion"> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kpsUwuhCEeSqZs7o0maBIQ" key="Version" value="0.0.1"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kpsUw-hCEeSqZs7o0maBIQ" key="Comment" value=""/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kpsUxOhCEeSqZs7o0maBIQ" key="Copyright" value="Copyright (c) 2015 Christian W. Damus 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:
 Christian W. Damus - Initial API and implementation"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kpsUxehCEeSqZs7o0maBIQ" key="Date" value="2015-04-21"/> + <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kpsUxuhCEeSqZs7o0maBIQ" key="Author" value="Christian W. Damus"/> + </eAnnotations> + <eClassifiers xmi:type="ecore:EClass" xmi:id="_kpqfkehCEeSqZs7o0maBIQ" name="Bean"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_kpqfkuhCEeSqZs7o0maBIQ" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_DFm6EOhCEeSqZs7o0maBIQ"/> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_kpqfk-hCEeSqZs7o0maBIQ" name="base_Classifier" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier"/> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xmi:type="ecore:EClass" xmi:id="_kpqflehCEeSqZs7o0maBIQ" name="Proxy"> + <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_kpqfluhCEeSqZs7o0maBIQ" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_K4tC8OhCEeSqZs7o0maBIQ"/> + <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_kpqfl-hCEeSqZs7o0maBIQ" name="base_Dependency" ordered="false" lowerBound="1"> + <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Dependency"/> + </eStructuralFeatures> + </eClassifiers> + </contents> + </eAnnotations> + <elementImport xmi:type="uml:ElementImport" xmi:id="_Bh4dgOhCEeSqZs7o0maBIQ" alias="Dependency"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/> + </elementImport> + <elementImport xmi:type="uml:ElementImport" xmi:id="_Bh5EkOhCEeSqZs7o0maBIQ" alias="Classifier"> + <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Classifier"/> + </elementImport> + <packageImport xmi:type="uml:PackageImport" xmi:id="_0wU2kehBEeSqZs7o0maBIQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/> + </packageImport> + <packageImport xmi:type="uml:PackageImport" xmi:id="_0wU2kuhBEeSqZs7o0maBIQ"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_DFm6EOhCEeSqZs7o0maBIQ" name="Bean"> + <ownedAttribute xmi:type="uml:Property" xmi:id="_aMhLQOhCEeSqZs7o0maBIQ" name="base_Classifier" association="_aMhyUOhCEeSqZs7o0maBIQ"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Classifier"/> + </ownedAttribute> + </packagedElement> + <packagedElement xmi:type="uml:Stereotype" xmi:id="_K4tC8OhCEeSqZs7o0maBIQ" name="Proxy"> + <ownedAttribute xmi:type="uml:Property" xmi:id="_a1z_4OhCEeSqZs7o0maBIQ" name="base_Dependency" association="_a1z_4ehCEeSqZs7o0maBIQ"> + <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/> + </ownedAttribute> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_aMhyUOhCEeSqZs7o0maBIQ" name="E_Bean_Classifier1" memberEnd="_aMhyUehCEeSqZs7o0maBIQ _aMhLQOhCEeSqZs7o0maBIQ"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_aMhyUehCEeSqZs7o0maBIQ" name="extension_Bean" type="_DFm6EOhCEeSqZs7o0maBIQ" aggregation="composite" association="_aMhyUOhCEeSqZs7o0maBIQ"/> + </packagedElement> + <packagedElement xmi:type="uml:Extension" xmi:id="_a1z_4ehCEeSqZs7o0maBIQ" name="E_Proxy_Dependency1" memberEnd="_a1z_4uhCEeSqZs7o0maBIQ _a1z_4OhCEeSqZs7o0maBIQ"> + <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_a1z_4uhCEeSqZs7o0maBIQ" name="extension_Proxy" type="_K4tC8OhCEeSqZs7o0maBIQ" aggregation="composite" association="_a1z_4ehCEeSqZs7o0maBIQ"/> + </packagedElement> +</uml:Profile> diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/src/org/eclipse/papyrus/uml/service/types/tests/deletion/DeleteDependentWithStereotypeApplications458685.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/src/org/eclipse/papyrus/uml/service/types/tests/deletion/DeleteDependentWithStereotypeApplications458685.java new file mode 100644 index 00000000000..1cf34fbbf62 --- /dev/null +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/src/org/eclipse/papyrus/uml/service/types/tests/deletion/DeleteDependentWithStereotypeApplications458685.java @@ -0,0 +1,97 @@ +/***************************************************************************** + * Copyright (c) 2015 Christian W. Damus 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: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.service.types.tests.deletion; + +import static org.eclipse.papyrus.junit.framework.runner.ScenarioRunner.verificationPoint; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.MatcherAssert.assertThat; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest; +import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; +import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; +import org.eclipse.papyrus.junit.framework.runner.Scenario; +import org.eclipse.papyrus.junit.framework.runner.ScenarioRunner; +import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.uml2.uml.Dependency; +import org.eclipse.uml2.uml.Type; +import org.eclipse.uml2.uml.util.UMLUtil; +import org.junit.Rule; +import org.junit.runner.RunWith; + +/** + * Regression test for deletion of stereotype applications of elements being deleted. + * + * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=458685 + */ +@RunWith(ScenarioRunner.class) +public class DeleteDependentWithStereotypeApplications458685 { + + @Rule + public final ModelSetFixture model = new ModelSetFixture(); + + public DeleteDependentWithStereotypeApplications458685() { + super(); + } + + @Scenario({ "command", "elements", "stereotypes", "undo", "redo" }) + @PluginResource("resource/bug458685/model.di") + public void stereotypeApplicationsDeleted() { + final Type bean1 = model.getModel().getOwnedType("Bean1"); + final Type bean2 = model.getModel().getOwnedType("Bean2"); + final Dependency proxy = bean1.getClientDependencies().get(0); + final EObject beanStereotype = bean2.getStereotypeApplications().get(0); + final EObject proxyStereotype = proxy.getStereotypeApplications().get(0); + + IElementEditService elementEditService = ElementEditServiceUtils.getCommandProvider(bean2); + ICommand command = elementEditService.getEditCommand(new DestroyElementRequest(bean2, false)); + + if (verificationPoint()) { + assertThat("No deletion command provided", command, notNullValue()); + assertThat("Deletion command is not executable", command.canExecute(), is(true)); + } + + model.execute(command); + + if (verificationPoint()) { + assertThat("Element not deleted", bean2.eResource(), nullValue()); + assertThat("Dependent not deleted", proxy.eResource(), nullValue()); + } + + if (verificationPoint()) { + assertThat("Deleted element's stereotype not deleted", beanStereotype.eResource(), nullValue()); + assertThat("Dependent element's stereotype not deleted", proxyStereotype.eResource(), nullValue()); + } + + model.undo(); + + if (verificationPoint()) { + assertThat("Deleted element's stereotype is still deleted", beanStereotype.eResource(), notNullValue()); + assertThat("Deleted element's stereotype not restored to it", UMLUtil.getBaseElement(beanStereotype), is((EObject) bean2)); + assertThat("Dependent element's stereotype is still deleted", proxyStereotype.eResource(), notNullValue()); + assertThat("Dependent element's stereotype not restored to it", UMLUtil.getBaseElement(proxyStereotype), is((EObject) proxy)); + } + + model.redo(); + + if (verificationPoint()) { + assertThat("Deleted element's stereotype not re-deleted", beanStereotype.eResource(), nullValue()); + assertThat("Dependent element's stereotype not re-deleted", proxyStereotype.eResource(), nullValue()); + } + } +} diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/src/org/eclipse/papyrus/uml/service/types/tests/suites/AllTests.java b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/src/org/eclipse/papyrus/uml/service/types/tests/suites/AllTests.java index af9d62c1776..77ebb1fbf62 100644 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/src/org/eclipse/papyrus/uml/service/types/tests/suites/AllTests.java +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests/src/org/eclipse/papyrus/uml/service/types/tests/suites/AllTests.java @@ -1,9 +1,24 @@ +/*****************************************************************************
+ * Copyright (c) 2012, 2015 CEA LIST, Christian W. Damus, 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:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 458685
+ *
+ *****************************************************************************/
+
package org.eclipse.papyrus.uml.service.types.tests.suites;
import org.eclipse.papyrus.uml.service.types.tests.creation.CreateElementTest;
import org.eclipse.papyrus.uml.service.types.tests.creation.CreatePureUMLElementTest;
import org.eclipse.papyrus.uml.service.types.tests.creation.CreateRelationshipTest;
import org.eclipse.papyrus.uml.service.types.tests.deletion.DeleteAssociationTest;
+import org.eclipse.papyrus.uml.service.types.tests.deletion.DeleteDependentWithStereotypeApplications458685;
import org.eclipse.papyrus.uml.service.types.tests.deletion.DeletePureUMLElementTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -20,7 +35,7 @@ import org.junit.runners.Suite.SuiteClasses; CreateRelationshipTest.class,
DeletePureUMLElementTest.class,
DeleteAssociationTest.class,
-})
+ DeleteDependentWithStereotypeApplications458685.class })
public class AllTests {
// JUnit 4 Test Suite
}
|