|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.emfstore.internal.client.model.changeTracking.merging.util.DecisionUtil
public final class DecisionUtil
Class offering common methods for the merge dialog.
Field Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Method Detail |
---|
public static String cutString(String str, int length, boolean addPoints)
str
- textlength
- lengthaddPoints
- true, if ending dots
public static String stripNewLine(String text)
text
- text
public static ConflictOption getConflictOptionByType(List<ConflictOption> options, ConflictOption.OptionType type)
options
- list of optionstype
- type
public static boolean detailsNeeded(VisualConflict conflict)
conflict
- conflict
public 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 wording
public static String getLabel(Object obj, String unset)
obj
- obj to stringunset
- unset string
public static String getClassAndName(org.eclipse.emf.ecore.EObject modelElement)
EObject
.
modelElement
- modelelement
public static String getModelElementName(org.eclipse.emf.ecore.EObject modelElement)
MergeLabelProvider
.
modelElement
- specified element
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |