Index: /trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/GUIElementTree.java
===================================================================
--- /trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/GUIElementTree.java	(revision 1067)
+++ /trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/GUIElementTree.java	(revision 1068)
@@ -125,8 +125,8 @@
      *            id of the parent GUI element 
      * @param guiElementSpec
-     * 			  the GUI element specification
+     *            the GUI element specification
      */
     public void add(T guiElementID,
-    				T parentID,
+                    T parentID,
                     IGUIElementSpec guiElementSpec)
     {
@@ -134,5 +134,5 @@
         
         if (guiElement == null) {
-        	IGUIElementSpec parent = guiElementSpecs.get(parentID);
+            IGUIElementSpec parent = guiElementSpecs.get(parentID);
             if (parent != null) {
                 List<T> otherChildren = childRelations.get(parentID);
@@ -184,4 +184,24 @@
     /**
      * <p>
+     * Returns the id of the provided {@link IGUIElement}. The comparison is performed using the
+     * equals method of the GUI element.
+     * </p>
+     * 
+     * @param guiElement
+     *            guiElement that is looked for
+     * @return the id of the GUI element, null if the GUI element can not be found
+     */
+    public T find(IGUIElement guiElement) {
+        for (Map.Entry<T, IGUIElement> entry : guiElements.entrySet()) {
+            if (guiElement.equals(entry.getValue())) {
+                return entry.getKey();
+            }
+        }
+        
+        return null;
+    }
+
+    /**
+     * <p>
      * Removes a GUI element (defined by its id) from the tree. All children of the GUI element will be
      * removed recursively.
@@ -197,5 +217,5 @@
 
         if (node != null) {
-        	removedCounter++;
+            removedCounter++;
             List<T> nodesToBeRemoved = childRelations.remove(id);
 
