org.eclipse.emf.emfstore.internal.client.model.changeTracking.merging.conflict
Class ConflictOption

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.model.changeTracking.merging.conflict.ConflictOption
Direct Known Subclasses:
CustomConflictOption, MergeTextOption

public class ConflictOption
extends Object

This class represents an option/solution for a conflict. A conflict may have several options.

Author:
wesendon

Nested Class Summary
static class ConflictOption.OptionType
          Type of options.
 
Constructor Summary
ConflictOption(Object obj, ConflictOption.OptionType type)
          Alternative contstrutor which will toString the input object.
ConflictOption(String option, ConflictOption.OptionType type)
          Default constructor.
 
Method Summary
 void addOperations(Set<AbstractOperation> ops)
          Adds the change operations, which will be applied in case, that this option is selected as solution.
 String getDetailProvider()
          Returns detailprovider string.
 String getFullOptionLabel()
          Returns the complete option label.
 Set<AbstractOperation> getOperations()
          Returns the operations, stored in this option.
 String getOptionLabel()
          Returns the option's label.
 String getStrippedOptionLabel()
          Returns the Option's label with new line characters removed.
 ConflictOption.OptionType getType()
          Returns the type.
 boolean hasExtraOptionAction()
          Returns whether option should be called (optionChosen()), if selected.
 boolean isDetailsProvider()
          Tells whehter option provides details.
 boolean optionChosen()
          Called if Option is chosen in the UI.
 void setDetailProvider(String detailProvider)
          Sets a detailprovider.
 void setOptionLabel(String option)
          Sets the option's label.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConflictOption

public ConflictOption(String option,
                      ConflictOption.OptionType type)
Default constructor.

Parameters:
option - name of option
type - type

ConflictOption

public ConflictOption(Object obj,
                      ConflictOption.OptionType type)
Alternative contstrutor which will toString the input object.

Parameters:
obj - object
type - option type
Method Detail

getOptionLabel

public String getOptionLabel()
Returns the option's label.

Returns:
text

setOptionLabel

public void setOptionLabel(String option)
Sets the option's label.

Parameters:
option - text

getStrippedOptionLabel

public String getStrippedOptionLabel()
Returns the Option's label with new line characters removed.

Returns:
text

getFullOptionLabel

public String getFullOptionLabel()
Returns the complete option label.

Returns:
text

getType

public ConflictOption.OptionType getType()
Returns the type.

Returns:
type

addOperations

public void addOperations(Set<AbstractOperation> ops)
Adds the change operations, which will be applied in case, that this option is selected as solution.

Parameters:
ops - operations

getOperations

public Set<AbstractOperation> getOperations()
Returns the operations, stored in this option.

Returns:
list of operations

isDetailsProvider

public boolean isDetailsProvider()
Tells whehter option provides details.

Returns:
true, if so

setDetailProvider

public void setDetailProvider(String detailProvider)
Sets a detailprovider.

Parameters:
detailProvider - identifying string

getDetailProvider

public String getDetailProvider()
Returns detailprovider string.

Returns:
detail provider identifier

hasExtraOptionAction

public boolean hasExtraOptionAction()
Returns whether option should be called (optionChosen()), if selected.

Returns:
true or false

optionChosen

public boolean optionChosen()
Called if Option is chosen in the UI.

Returns:
if true, Option will be updated


Copyright © 2015. All Rights Reserved.