Skip to content
Snippets Groups Projects
Commit a5530323 authored by Simon Barner's avatar Simon Barner
Browse files

YELLOW

Minor cleanup
parent 120356df
No related branches found
No related tags found
No related merge requests found
/*--------------------------------------------------------------------------+
$Id$
| |
| Copyright 2011 fortiss GmbH |
| Copyright 2011 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -52,7 +52,7 @@ import org.fortiss.tooling.kernel.utils.CompositionUtils.PasteContext;
* @author hummel
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: E78CEDA377694643C535E897AC120EB9
* @ConQAT.Rating YELLOW Hash: F038B29D264713E10278885EBBAA6685
*/
public class CopyPasteUtils {
......@@ -228,13 +228,13 @@ public class CopyPasteUtils {
}
}
String PREFIX = "Copy of ";
String prefix = "Copy of ";
String newName = copyName;
if(iterator == 1) {
newName = PREFIX + copyName;
newName = prefix + copyName;
} else if(iterator > 1) {
String realName = copyName.startsWith(PREFIX) ? copyName.split(" ")[2] : copyName;
newName = PREFIX + realName + " (" + iterator + ")";
String realName = copyName.startsWith(prefix) ? copyName.split(" ")[2] : copyName;
newName = prefix + realName + " (" + iterator + ")";
}
((INamedElement)copy).setName(newName);
}
......@@ -245,7 +245,6 @@ public class CopyPasteUtils {
* eConents of its container.
*/
private static EList<EObject> getContentsAtTwoLevels(EObject target) {
EList<EObject> containtsOfContainer = target.eContainer().eContents();
EList<EObject> contents = target.eContents();
EList<EObject> allContents = new BasicEList<EObject>();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment