Runtime

org.eclipse.gmf.runtime.emf.commands.core.command
Class EditingDomainUndoContext

java.lang.Object
  extended by org.eclipse.gmf.runtime.emf.commands.core.command.EditingDomainUndoContext
All Implemented Interfaces:
IUndoContext

public final class EditingDomainUndoContext
extends java.lang.Object
implements IUndoContext

An IUndoContext that tags an EMF operation with the editing domain that it affects. Two editing domain contexts match if and only if they reference the same EditingDomain instance.


Constructor Summary
EditingDomainUndoContext(org.eclipse.emf.edit.domain.EditingDomain domain)
          Initializes me with the editing domain that I represent.
EditingDomainUndoContext(org.eclipse.emf.edit.domain.EditingDomain domain, java.lang.String label)
          Initializes me with the editing domain that I represent.
 
Method Summary
 boolean equals(java.lang.Object o)
          I am equal to other EditingDomainUndoContext on the same editing domain as mine.
 org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()
          Obtains the editing domain.
 java.lang.String getLabel()
           
 int hashCode()
           
 boolean matches(IUndoContext context)
          I match another context if it is a EditingDomainUndoContext representing the same editing domain as I.
 java.lang.String toString()
          The string representation of this operation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EditingDomainUndoContext

public EditingDomainUndoContext(org.eclipse.emf.edit.domain.EditingDomain domain)
Initializes me with the editing domain that I represent.

Parameters:
domain - the editing domain

EditingDomainUndoContext

public EditingDomainUndoContext(org.eclipse.emf.edit.domain.EditingDomain domain,
                                java.lang.String label)
Initializes me with the editing domain that I represent.

Parameters:
domain - the editing domain
label - the label for the context
Since:
1.4
Method Detail

getLabel

public java.lang.String getLabel()
Specified by:
getLabel in interface IUndoContext

matches

public boolean matches(IUndoContext context)
I match another context if it is a EditingDomainUndoContext representing the same editing domain as I.

Specified by:
matches in interface IUndoContext

equals

public boolean equals(java.lang.Object o)
I am equal to other EditingDomainUndoContext on the same editing domain as mine.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getEditingDomain

public final org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()
Obtains the editing domain.

Returns:
my editing domain

toString

public java.lang.String toString()
The string representation of this operation. Used for debugging purposes only. This string should not be shown to an end user.

Overrides:
toString in class java.lang.Object
Returns:
The string representation.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.