public final class DecisionUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
EDITABLE
Editable detail provider.
|
static int |
OPTION_LENGTH
Length of option label.
|
static String |
SEPERATOR
Separator symbol for detail provider.
|
static String |
WIDGET_MULTILINE
Multiline widget detail provider.
|
static String |
WIDGET_MULTILINE_EDITABLE
Multiline editable widget detail provider.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
cutString(String str,
int length,
boolean addPoints)
Cuts a text to certain length and adds "..." at the end if needed.
|
static boolean |
detailsNeeded(VisualConflict conflict)
Checks whether a conflict needs details.
|
static String |
getClassAndName(org.eclipse.emf.ecore.EObject modelElement)
Returns Class and Name of
EObject. |
static ConflictOption |
getConflictOptionByType(List<ConflictOption> options,
ConflictOption.OptionType type)
Get Option by is type.
|
static String |
getDescription(String key,
boolean isBranchMerge)
Returns conflict descriptions on basis of the
DescriptionProvider . |
static String |
getLabel(Object obj,
String unset)
Uses the object's toString method or returns unset string.
|
static String |
getModelElementName(org.eclipse.emf.ecore.EObject modelElement)
Returns name for an element by using
MergeLabelProvider. |
static String |
stripNewLine(String text)
Strips line breaking characters from text.
|
public static final int OPTION_LENGTH
public static final String SEPERATOR
public static final String EDITABLE
public static final String WIDGET_MULTILINE
public static final String WIDGET_MULTILINE_EDITABLE
public static String cutString(String str, int length, boolean addPoints)
str - textlength - lengthaddPoints - true, if ending dotspublic static String stripNewLine(String text)
text - textpublic static ConflictOption getConflictOptionByType(List<ConflictOption> options, ConflictOption.OptionType type)
options - list of optionstype - typepublic static boolean detailsNeeded(VisualConflict conflict)
conflict - conflictpublic static String getDescription(String key, boolean isBranchMerge)
DescriptionProvider .key - keyisBranchMerge - if true, a prefix will be added to the key in order to get
branch wordingpublic static String getLabel(Object obj, String unset)
obj - obj to stringunset - unset stringpublic static String getClassAndName(org.eclipse.emf.ecore.EObject modelElement)
EObject.modelElement - modelelementpublic static String getModelElementName(org.eclipse.emf.ecore.EObject modelElement)
MergeLabelProvider.modelElement - specified elementCopyright © 2017. All rights reserved.