Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CollaborationUseUtil.java')
-rw-r--r--sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CollaborationUseUtil.java85
1 files changed, 0 insertions, 85 deletions
diff --git a/sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CollaborationUseUtil.java b/sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CollaborationUseUtil.java
deleted file mode 100644
index 3f256a7d23c..00000000000
--- a/sandbox/pasteInNewTable/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CollaborationUseUtil.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 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:
- * Yann TANGUY (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.uml.tools.utils;
-
-import org.eclipse.uml2.uml.CollaborationUse;
-
-/**
- * Utility class for <code>org.eclipse.uml2.uml.CollaborationUse</code><BR>
- */
-public class CollaborationUseUtil {
-
- public final static String UNDEFINED_TYPE_NAME = "<Undefined>";
-
- /**
- * return the full label of the CollaborationUse, given UML2 specification.
- *
- * @return the string corresponding to the label of the CollaborationUse
- */
- public static String getLabel(CollaborationUse collaborationUse) {
- StringBuffer buffer = new StringBuffer();
- // visibility
- buffer.append(" ");
- buffer.append(NamedElementUtil.getVisibilityAsSign(collaborationUse));
-
- // name
- buffer.append(" ");
- buffer.append(collaborationUse.getName());
-
- // type
- if(collaborationUse.getType() != null) {
- buffer.append(": " + collaborationUse.getType().getName());
- } else {
- buffer.append(": " + UNDEFINED_TYPE_NAME);
- }
-
- return buffer.toString();
- }
-
- /**
- * return the custom label of the CollaborationUse, given UML2 specification and a custom style.
- *
- * @param style
- * the integer representing the style of the label
- *
- * @return the string corresponding to the label of the CollaborationUse
- */
- public static String getCustomLabel(CollaborationUse collaborationUse, int style) {
- StringBuffer buffer = new StringBuffer();
- // visibility
-
- buffer.append(" ");
- if((style & ICustomAppearence.DISP_VISIBILITY) != 0) {
- buffer.append(NamedElementUtil.getVisibilityAsSign(collaborationUse));
- }
-
- // name
- if((style & ICustomAppearence.DISP_NAME) != 0) {
- buffer.append(" ");
- buffer.append(collaborationUse.getName());
- }
-
- if((style & ICustomAppearence.DISP_TYPE) != 0) {
- // type
- if(collaborationUse.getType() != null) {
- buffer.append(": " + collaborationUse.getType().getName());
- } else {
- buffer.append(": " + UNDEFINED_TYPE_NAME);
- }
- }
-
- return buffer.toString();
- }
-}

Back to the top