blob: d2e2a835620e057513f4c650c7c4e47d0f20230a [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2004-2010 Abel Hegedus and Daniel Varro
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Abel Hegedus - initial API and implementation
*******************************************************************************/
package org.eclipse.viatra2.core.notification;
/**
* Type enum for notifications
*
* @author Abel Hegedus
*
*/
public enum NotificationType {
/**
* Signals that a "user mark" (checkpoint) has been added to the undo stack.
* This is only used by the undo manager.
*/
USER_MARK ( "user mark"),
/**
* Means that one atomic step is finished. This defines a consistent point,
* where undo can be stopped.
*/
ACTION_ATOMIC_STEP_READY ( "atomic step ready"),
/**
* Means that an entity was created. Parameters: IModelElement container
* entity (may be null, then containment add will come in an other
* notification) IModelElement of newly created entity String name of newly
* created entity String value of newly created entity
*/
ACTION_CREATE_ENTITY ( "create entity"),
/**
* Means that an entity was deleted Parameters: String ID of deleted entity
* String name of deleted entity String value of deleted entity String ID of
* parent
*/
ACTION_DELETE_ENTITY ( "delete entity"),
/**
* Means that a function was created Parameters: String ID of container
* entity (may be null, then containment add will come in an other
* notification) String ID of from entity String ID of to entity String ID
* of newly created function String name of newly created function
*/
ACTION_CREATE_RELATION ( "create relation"),
/**
* Means that an entity was deleted Parameters: String ID of deleted entity
* String name of deleted entity String value of deleted entity String ID of
* parent
*/
ACTION_DELETE_RELATION ( "delete relation"),
/**
* Means that a relation's source model element was changed.
*/
ACTION_SET_RELATION_FROM ( "set relation from"),
/**
* Means that a relation's target model element was changed.
*/
ACTION_SET_RELATION_TO ( "set relation to"),
/**
* Means that an instanceOf implicit relation was created.
*/
ACTION_CREATE_INSTANCEOF ( "create instanceof"),
/**
* Means that an instanceOf implicit relation was deleted.
*/
ACTION_DELETE_INSTANCEOF ( "delete instanceof"),
/**
* Means that an supertypeOf implicit relation was created.
*/
ACTION_CREATE_SUPERTYPEOF ( "create supertypeof"),
/**
* Means that an supertypeOf implicit relation was deleted.
*/
ACTION_DELETE_SUPERTYPEOF ( "delete supertypeof"),
/**
* Means that a containment relation was deleted. Note: the state of the
* modelspace is not consistent!
*/
ACTION_DELETE_CONTAINMENT ( "delete containment"),
/**
* Means that the value of an entity was changed.
*/
ACTION_SET_VALUE ( "set value"),
/**
* Means that the view info of an element was changed.
*/
ACTION_SET_VIEW_INFO ( "set view info"),
/**
* Means that the name of an element was changed.
*/
ACTION_SET_NAME ( "set name"),
/**
* Means that the isFinalType attribute of an element was changed.
*/
ACTION_SET_ISFINALTYPE ( "set isfinaltype"),
/**
* Means that the isAny attribute of an element was changed.
*/
ACTION_SET_ISANY ( "set isany"),
/**
* Means that an element was moved to an entity, with removing from all
* others.
*/
ACTION_MOVE_ELEMENT_TO ( "move element to"),
/**
* Means that an undoable transaction has begun.
*/
TA_UNDOABLE_TRANSACTION_BEGIN ( "begin undoable transaction"),
/**
* Means that a non-undoable transaction has begun.
*/
TA_TRANSACTION_BEGIN ( "begin transaction"),
/**
* Means that a sub-transaction has begun.
*/
TA_SUBTRANSACTION_BEGIN ( "begin subtransaction"),
/**
* Signals the end of a sub-transaction.
*/
TA_SUBTRANSACTION_END ( "end subtransaction"),
/**
* Signals the end of a transaction.
*/
TA_TRANSACTION_END ( "end transaction"),
/**
* Signals that an undo operation has begun.
*/
TA_UNDO_BEGIN ( "begin undo"),
/**
* Signals that an undo operation has ended.
*/
TA_UNDO_END ( "end undo"),
/**
* Signals that a relation's inverse has been set.
*/
ACTION_SET_RELATION_INVERSE ( "set inverse"),
/**
* The relation's isAggregation flag has been set.
*/
ACTION_SET_RELATION_ISAGGREGATION ( "set isAggregation"),
/**
* The relation's multiplicity has been set.
*/
ACTION_SET_RELATION_MULTIPLICITY ( "set multiplicity"),
/**
* Signals that the transaction has been aborted.
*/
TA_TRANSACTION_ABORT ( "transaction abort"),
/**
* Signals that the subtransaction has been aborted.
*/
TA_SUBTRANSACTION_ABORT ( "subtransaction abort"),
ACTION_MORE_ATOMICS_TO_ONE_ATOM_START ( "1000"),
ACTION_MORE_ATOMICS_TO_ONE_ATOM_END ("1001"),
ACTION_SKIP_NOTIFICATIONS_START ("1002"),
ACTION_SKIP_NOTIFICATIONS_END ( "1003");
private final String text;
private NotificationType(String text){
this.text = text;
}
@Override
public String toString() {
// TODO Auto-generated method stub
return text;
}
}