org.electrocodeogram.cpc.core.api.provider.notification
Enum IEvaluationResult.Action

java.lang.Object
  extended by java.lang.Enum<IEvaluationResult.Action>
      extended by org.electrocodeogram.cpc.core.api.provider.notification.IEvaluationResult.Action
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<IEvaluationResult.Action>
Enclosing interface:
IEvaluationResult

public static enum IEvaluationResult.Action
extends java.lang.Enum<IEvaluationResult.Action>

The type of action which should be taken as a result of an evaluation.


Enum Constant Summary
IGNORE
          Completely ignore this modification event.
INSTANT_NOTIFY
          Similar to NOTIFY.
But indicates to the client of the INotificationEvaluationProvider that this notification should be made visible to the user instantly.
INSTANT_WARN
          Similar to WARN.
INSYNC
          The clone is in sync with all its clone group members.
INSYNC_CUSTOMISED
          The clone is in sync with all its clone group members, if one considers all modifications made shortly after the creation of each group member to be of no consequence.
LEAVE_GROUP
          The clone modification has changed the clone to an extend which makes it very likely that the clone does no longer belong to its original clone group.
MODIFIED
          The clone modification is minor but does represent a possible change in semantics which might be of interest to the user.
NOTIFY
          The user should be notified about this modification.
WARN
          The user should be warned about this modification.
 
Method Summary
static IEvaluationResult.Action valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static IEvaluationResult.Action[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

IGNORE

public static final IEvaluationResult.Action IGNORE
Completely ignore this modification event.
The state of the clone and its clone group members will not be modified.

This action is typically chosen, if the nature of the change guarantees that an evaluation of the modification of this clone and its group members would not yield any different results than before the change.
I.e. a white space only change or a change which only affected a comment.


INSYNC

public static final IEvaluationResult.Action INSYNC
The clone is in sync with all its clone group members. This means that they are all semantically equivalent.

Notifications and modified states for the clone and all its clone group members should be cleared.
The new state for all of them would be IClone.State#DEFAULT.


INSYNC_CUSTOMISED

public static final IEvaluationResult.Action INSYNC_CUSTOMISED
The clone is in sync with all its clone group members, if one considers all modifications made shortly after the creation of each group member to be of no consequence.

This state therefore describes parametrised clones which have not been modified in any significant way since their initial parametrisation.

Notifications and modified states for the clone and all its clone group members should be cleared.
The new state for all of them would be IClone.State#CUSTOMISED.


MODIFIED

public static final IEvaluationResult.Action MODIFIED
The clone modification is minor but does represent a possible change in semantics which might be of interest to the user.
At the same time the modification is not deemed important enough to warrant an action of type NOTIFY or WARN.

This clone and all other members of this clone group should be set to IClone.State#MODIFIED. Other group members are not updated to this state if they already have a higher state set (IClone.State#NOTIFY or IClone.State#WARN).


NOTIFY

public static final IEvaluationResult.Action NOTIFY
The user should be notified about this modification. It might have introduced some update anomalies.
Notifications are typically displayed in some non intrusive manner.

Indicates that this clone's state should be set to IClone.State#NOTIFY and the state of all its group members to IClone.State#MODIFIED, unless they already have a higher state set.


WARN

public static final IEvaluationResult.Action WARN
The user should be warned about this modification. There is a very high likelihood that it has introduced some update anomalies.
Warnings are typically displayed in a more prominent manner. They might be displayed in the same way as java warnings or errors.
This action type should be used very sparingly.

Indicates that this clone's state should be set to IClone.State#WARN and the state of all its group members to IClone.State#MODIFIED, unless they already have a higher state set.


INSTANT_NOTIFY

public static final IEvaluationResult.Action INSTANT_NOTIFY
Similar to NOTIFY.
But indicates to the client of the INotificationEvaluationProvider that this notification should be made visible to the user instantly.
This should be used only in cases were it is obvious that user should be notified right away. The default behaviour of NOTIFY is to allow the client to delay the notification until the user has finished modifying the clone and its surroundings. The client will then typically delegate the clone back to the INotificationEvaluationProvider for reevaluation once the "delay" has passed.

See Also:
NOTIFY

INSTANT_WARN

public static final IEvaluationResult.Action INSTANT_WARN
Similar to WARN.

See Also:
WARN, INSTANT_NOTIFY

LEAVE_GROUP

public static final IEvaluationResult.Action LEAVE_GROUP
The clone modification has changed the clone to an extend which makes it very likely that the clone does no longer belong to its original clone group. It should therefore be removed from the group and be treated as a stand alone instance.

Method Detail

values

public static IEvaluationResult.Action[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (IEvaluationResult.Action c : IEvaluationResult.Action.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static IEvaluationResult.Action valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null