Revision: 4045
          http://dpp.svn.sourceforge.net/dpp/?rev=4045&view=rev
Author:   kargor
Date:     2012-04-24 16:12:59 +0000 (Tue, 24 Apr 2012)
Log Message:
-----------
[NOP] removed unused classes
[NOP] moved additional classes from package project to package project.internal

Modified Paths:
--------------
    branches/dpp_light/src/de/fu_berlin/inf/dpp/feedback/FileSubmitter.java
    
branches/dpp_light/src/de/fu_berlin/inf/dpp/net/internal/XStreamExtensionProvider.java
    
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/internal/SharedResourcesManager.java
    branches/dpp_light/src/de/fu_berlin/inf/dpp/util/FileUtils.java
    branches/dpp_light/src/de/fu_berlin/inf/dpp/util/FileZipper.java
    branches/dpp_light/src/de/fu_berlin/inf/dpp/util/Utils.java
    branches/dpp_light/test/junit/de/fu_berlin/inf/dpp/util/UtilTestSuite.java

Added Paths:
-----------
    
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/internal/ProjectDeltaVisitor.java
    
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/internal/ResourceActivityFilter.java

Removed Paths:
-------------
    branches/dpp_light/src/de/fu_berlin/inf/dpp/project/ProjectDeltaVisitor.java
    
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/ResourceActivityFilter.java
    branches/dpp_light/src/de/fu_berlin/inf/dpp/util/CausedIOException.java
    branches/dpp_light/src/de/fu_berlin/inf/dpp/util/StopWatch.java
    branches/dpp_light/src/de/fu_berlin/inf/dpp/util/ThreadAccessRecorder.java
    
branches/dpp_light/test/junit/de/fu_berlin/inf/dpp/util/ThreadAccessRecorderTest.java

Modified: 
branches/dpp_light/src/de/fu_berlin/inf/dpp/feedback/FileSubmitter.java
===================================================================
--- branches/dpp_light/src/de/fu_berlin/inf/dpp/feedback/FileSubmitter.java     
2012-04-24 16:02:13 UTC (rev 4044)
+++ branches/dpp_light/src/de/fu_berlin/inf/dpp/feedback/FileSubmitter.java     
2012-04-24 16:12:59 UTC (rev 4045)
@@ -19,7 +19,6 @@
 import org.eclipse.core.runtime.SubMonitor;
 
 import de.fu_berlin.inf.dpp.exceptions.SarosCancellationException;
-import de.fu_berlin.inf.dpp.util.CausedIOException;
 import de.fu_berlin.inf.dpp.util.FileZipper;
 
 /**
@@ -130,7 +129,7 @@
         throws IOException {
         try {
             if (file == null || !file.exists()) {
-                throw new CausedIOException("Upload not possible",
+                throw new IOException("Upload not possible",
                     new IllegalArgumentException(
                         "The file that should be uploaded was"
                             + " either null or nonexistent"));
@@ -193,17 +192,16 @@
 
             } catch (ConnectTimeoutException e) {
                 // couldn't connect within the timeout
-                throw new CausedIOException("Couldn't connect to host "
-                    + server, e);
+                throw new IOException("Couldn't connect to host " + server, e);
             } catch (Exception e) {
-                throw new CausedIOException(
+                throw new IOException(
                     "An internal error occurred while trying to upload file "
                         + file.getName(), e);
             } finally {
                 post.releaseConnection();
             }
             // upload failed
-            throw new CausedIOException("Upload failed", new RuntimeException(
+            throw new IOException("Upload failed", new RuntimeException(
                 "Server response: " + status + " "
                     + HttpStatus.getStatusText(status)));
         } finally {

Modified: 
branches/dpp_light/src/de/fu_berlin/inf/dpp/net/internal/XStreamExtensionProvider.java
===================================================================
--- 
branches/dpp_light/src/de/fu_berlin/inf/dpp/net/internal/XStreamExtensionProvider.java
      2012-04-24 16:02:13 UTC (rev 4044)
+++ 
branches/dpp_light/src/de/fu_berlin/inf/dpp/net/internal/XStreamExtensionProvider.java
      2012-04-24 16:12:59 UTC (rev 4045)
@@ -38,7 +38,6 @@
 import com.thoughtworks.xstream.annotations.XStreamOmitField;
 
 import 
de.fu_berlin.inf.dpp.net.internal.extensions.DropSilentlyPacketExtension;
-import de.fu_berlin.inf.dpp.util.CausedIOException;
 import de.fu_berlin.inf.dpp.util.xstream.IPathConverter;
 import de.fu_berlin.inf.dpp.util.xstream.XppReader;
 
@@ -159,8 +158,7 @@
 
     /**
      * PacketFilter for Packets which contain an PacketExtension matching the
-     * {@link XStreamExtensionProvider#elementName} and
-     * {@link PacketExtensionUtils#NAMESPACE}.
+     * {@link XStreamExtensionProvider#elementName}.
      */
     public PacketFilter getPacketFilter() {
         return new PacketExtensionFilter(getElementName(), getNamespace());
@@ -248,7 +246,7 @@
             return ((XStreamPacketExtension<T>) xstream.fromXML(string))
                 .getPayload();
         } catch (Exception e) {
-            throw new CausedIOException(e);
+            throw new IOException(e);
         }
     }
 

Deleted: 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/ProjectDeltaVisitor.java
===================================================================
--- 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/ProjectDeltaVisitor.java    
    2012-04-24 16:02:13 UTC (rev 4044)
+++ 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/ProjectDeltaVisitor.java    
    2012-04-24 16:12:59 UTC (rev 4045)
@@ -1,310 +0,0 @@
-package de.fu_berlin.inf.dpp.project;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-
-import de.fu_berlin.inf.dpp.User;
-import de.fu_berlin.inf.dpp.activities.SPath;
-import de.fu_berlin.inf.dpp.activities.business.FileActivity;
-import de.fu_berlin.inf.dpp.activities.business.FileActivity.Purpose;
-import de.fu_berlin.inf.dpp.activities.business.FolderActivity;
-import de.fu_berlin.inf.dpp.activities.business.IResourceActivity;
-import de.fu_berlin.inf.dpp.editor.EditorManager;
-import de.fu_berlin.inf.dpp.project.internal.SharedResourcesManager;
-
-/**
- * Visits the resource changes in a shared project.<br>
- * The visitor is not supposed to be reused for different resourceChanged
- * events.
- */
-public class ProjectDeltaVisitor implements IResourceDeltaVisitor {
-    private static final Logger log = Logger
-        .getLogger(ProjectDeltaVisitor.class);
-    protected final EditorManager editorManager;
-
-    protected final User user;
-
-    protected final ISarosSession sarosSession;
-
-    /** The project visited. */
-    protected final SharedProject sharedProject;
-
-    public ProjectDeltaVisitor(EditorManager editorManager,
-        ISarosSession sarosSession, SharedProject sharedProject) {
-        this.sarosSession = sarosSession;
-        this.editorManager = editorManager;
-        this.sharedProject = sharedProject;
-        this.user = sarosSession.getLocalUser();
-    }
-
-    /** Stores activities to be sent due to one change event. */
-    protected List<IResourceActivity> pendingActivities = new 
ArrayList<IResourceActivity>();
-    /**
-     * Don't generate activities for a resource if
-     * <code>ignoredPath.isPrefixOf(resource.getFullPath())</code>.
-     */
-    private IPath ignoredPath = null;
-
-    /**
-     * Don't send activities yet.
-     */
-    private boolean postponeSending = false;
-
-    public boolean visit(IResourceDelta delta) {
-        IResource resource = delta.getResource();
-        if (resource.isDerived()) {
-            return false;
-        }
-
-        /*
-         * TODO Refactor this, we don't need to make a distinction here.
-         * Resource is resource. It's just Saros that insists on having 
separate
-         * activities for files and folders.
-         */
-        if (resource instanceof IFile) {
-            handleFileDelta(delta);
-            return true;
-        } else if (resource instanceof IFolder) {
-            // Note: IProject is not visited.
-            return handleFolderDelta(delta);
-        }
-
-        return true;
-    }
-
-    protected boolean handleFolderDelta(IResourceDelta delta) {
-        IResource resource = delta.getResource();
-
-        int kind = delta.getKind();
-        switch (kind) {
-        case IResourceDelta.ADDED:
-            add(resource);
-            return true;
-        case IResourceDelta.REMOVED:
-            remove(resource);
-            // We don't want to visit the children if this folder was removed.
-            // The only interesting case is that a file was moved out of this 
or
-            // a child folder, but we're still going to visit the move target.
-            setIgnoreChildren(resource);
-            return true;
-        default:
-            final boolean change = kind != IResourceDelta.NO_CHANGE;
-            return change;
-        }
-    }
-
-    protected void handleFileDelta(IResourceDelta delta) {
-        IResource resource = delta.getResource();
-        int kind = delta.getKind();
-
-        IProject project = resource.getProject();
-        boolean contentChange = isContentChange(delta);
-        switch (kind) {
-        case IResourceDelta.CHANGED:
-            if (contentChange) {
-                contentChanged(resource);
-            }
-            return;
-
-        case IResourceDelta.ADDED:
-
-            // Was this file moved or renamed?
-            if (isMovedFrom(delta)) {
-
-                // Adds have getMovedFrom set:
-                IPath oldFullPath = delta.getMovedFromPath();
-                IProject oldProject = ProjectDeltaVisitor
-                    .getProject(oldFullPath);
-
-                if (project.equals(oldProject)) {
-                    // Moving inside this project
-                    try {
-                        move(resource, oldFullPath, oldProject, contentChange);
-                        return;
-                    } catch (IOException e) {
-                        SharedResourcesManager.log
-                            .warn("Resource could not be read for"
-                                + " sending to peers:" + 
resource.getLocation());
-                    }
-                } else {
-                    // Moving a file into the shared project
-                    // -> Treat like an add!
-
-                    // Fall-through
-                }
-            }
-
-            // usual files adding procedure
-
-            add(resource);
-
-            return;
-
-        case IResourceDelta.REMOVED:
-            if (isMoved(delta)) {
-
-                // REMOVED deltas have MovedTo set
-                IPath newPath = delta.getMovedToPath();
-                IProject newProject = ProjectDeltaVisitor.getProject(newPath);
-                if (project.equals(newProject)) {
-                    // Ignore "REMOVED" while moving into shared project
-                    return;
-                }
-                // else moving file away from shared project, need to tell
-                // others to delete! Fall-through...
-            }
-
-            remove(resource);
-            return;
-
-        default:
-            return;
-        }
-    }
-
-    /** Indicates not to generate activities for children of the resource. */
-    protected void setIgnoreChildren(IResource resource) {
-        if (!ignoreChildren(resource))
-            ignoredPath = resource.getFullPath();
-    }
-
-    /**
-     * Returns true if we're not supposed to generate activities for children 
of
-     * the resource.
-     */
-    protected boolean ignoreChildren(IResource resource) {
-        IPath fullPath = resource.getFullPath();
-        return ignoreChildren(fullPath);
-    }
-
-    /**
-     * {@link #ignoreChildren(IResource)}
-     */
-    protected boolean ignoreChildren(IPath fullPath) {
-        if (ignoredPath == null || !ignoredPath.isPrefixOf(fullPath)) {
-            ignoredPath = null;
-            return false;
-        }
-        return true;
-    }
-
-    protected void add(IResource resource) {
-        sharedProject.add(resource);
-        final SPath spath = new SPath(resource);
-
-        if (resource instanceof IFile) {
-            try {
-                addActivity(FileActivity.created(user, spath, 
Purpose.ACTIVITY));
-            } catch (IOException e) {
-                log.error("Couldn't access file " + spath);
-            }
-        } else {
-            addActivity(new FolderActivity(user, FolderActivity.Type.Created,
-                spath));
-        }
-    }
-
-    protected void move(IResource resource, IPath oldFullPath,
-        IProject oldProject, boolean contentChange) throws IOException {
-        sharedProject.move(resource, oldFullPath);
-        addActivity(FileActivity.moved(user, new SPath(resource), new SPath(
-            oldProject, oldFullPath.removeFirstSegments(1)), contentChange));
-    }
-
-    protected void remove(IResource resource) {
-        sharedProject.remove(resource);
-        if (resource instanceof IFile) {
-            addActivity(FileActivity.removed(user, new SPath(resource),
-                Purpose.ACTIVITY));
-        } else {
-            addActivity(new FolderActivity(user, FolderActivity.Type.Removed,
-                new SPath(resource)));
-        }
-    }
-
-    protected static IProject getProject(IPath newPath) {
-        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-        IProject newProject = root.getProject(newPath.segment(0));
-        return newProject;
-    }
-
-    /**
-     * Adds an activity to {@link ProjectDeltaVisitor#pendingActivities}.
-     */
-    protected void addActivity(IResourceActivity activity) {
-        pendingActivities.add(activity);
-    }
-
-    /**
-     * Adds a FileActivity.created if the file is not currently in any open
-     * editor. We ignore opened files because otherwise we might send CHANGED
-     * events for files that are also handled by the editor manager.
-     * 
-     * @param resource
-     */
-    private void contentChanged(IResource resource) {
-        SPath spath = new SPath(resource);
-        if (editorManager.isOpened(spath)) {
-            return;
-        }
-
-        SharedResourcesManager.log.debug("Resource " + resource.getName()
-            + " changed");
-        try {
-            addActivity(FileActivity.created(user, spath, Purpose.ACTIVITY));
-        } catch (IOException e) {
-            SharedResourcesManager.log.warn(
-                "Resource could not be read for sending to peers:"
-                    + resource.getLocation(), e);
-            return;
-        }
-    }
-
-    /**
-     * Returns true if the "Moved"-flags are set.
-     */
-    protected boolean isMoved(IResourceDelta delta) {
-        return (isMovedFrom(delta) || isMovedTo(delta));
-    }
-
-    protected boolean isMovedFrom(IResourceDelta delta) {
-        return ((delta.getFlags() & IResourceDelta.MOVED_FROM) != 0);
-    }
-
-    protected boolean isMovedTo(IResourceDelta delta) {
-        return ((delta.getFlags() & IResourceDelta.MOVED_TO) != 0);
-    }
-
-    protected boolean isSync(IResourceDelta delta) {
-        return ((delta.getFlags() & IResourceDelta.SYNC) != 0);
-    }
-
-    /**
-     * Returns true if the CONTENT flag is set, which means that the file's
-     * timestamp changed.
-     */
-    protected boolean isContentChange(IResourceDelta delta) {
-        return ((delta.getFlags() & IResourceDelta.CONTENT) != 0);
-
-    }
-
-    protected void setPostponeSending(boolean value) {
-        postponeSending = value;
-    }
-
-    public boolean postponeSending() {
-        return postponeSending;
-    }
-}

Deleted: 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/ResourceActivityFilter.java
===================================================================
--- 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/ResourceActivityFilter.java 
    2012-04-24 16:02:13 UTC (rev 4044)
+++ 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/ResourceActivityFilter.java 
    2012-04-24 16:12:59 UTC (rev 4045)
@@ -1,76 +0,0 @@
-package de.fu_berlin.inf.dpp.project;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import de.fu_berlin.inf.dpp.activities.business.FileActivity;
-import de.fu_berlin.inf.dpp.activities.business.FolderActivity;
-import de.fu_berlin.inf.dpp.activities.business.IResourceActivity;
-import de.fu_berlin.inf.dpp.project.internal.SharedResourcesManager;
-
-/**
- * A ResourceActivityFilter stores pending activities for the
- * {@link SharedResourcesManager}, then orders and filters them.
- */
-class ResourceActivityFilter {
-    private List<IResourceActivity> enteredActivities = new 
ArrayList<IResourceActivity>();
-
-    public void enterAll(List<? extends IResourceActivity> activities) {
-        enteredActivities.addAll(activities);
-    }
-
-    public void enter(IResourceActivity activity) {
-        enteredActivities.add(activity);
-    }
-
-    public boolean isEmpty() {
-        return enteredActivities.isEmpty();
-    }
-
-    /**
-     * Filters and returns the activities in order and clears the list of 
stored
-     * activities. The order is: VCS activities, folder creations, file
-     * activities, folder removals.
-     */
-    public List<IResourceActivity> retrieveAll() {
-        /*
-         * haferburg: Sorting is not necessary, because activities are already
-         * sorted enough (activity on parent comes before activity on child).
-         * All we need to do is make sure that folders are created first and
-         * deleted last. The sorting stuff was introduced with 1742 (1688).
-         */
-        List<IResourceActivity> fileActivities = new 
ArrayList<IResourceActivity>();
-        List<IResourceActivity> folderCreateActivities = new 
ArrayList<IResourceActivity>();
-        List<IResourceActivity> folderRemoveActivities = new 
ArrayList<IResourceActivity>();
-        List<IResourceActivity> otherActivities = new 
ArrayList<IResourceActivity>();
-
-        // Split all collectedActivities.
-        for (IResourceActivity activity : enteredActivities) {
-
-            if (activity instanceof FileActivity) {
-                fileActivities.add(activity);
-            } else if (activity instanceof FolderActivity) {
-                FolderActivity.Type tFolder = ((FolderActivity) activity)
-                    .getType();
-                if (tFolder == FolderActivity.Type.Created)
-                    folderCreateActivities.add(activity);
-                else if (tFolder == FolderActivity.Type.Removed)
-                    folderRemoveActivities.add(activity);
-            } else {
-                otherActivities.add(activity);
-            }
-        }
-
-        // Add activities to the result.
-        List<IResourceActivity> result = new ArrayList<IResourceActivity>();
-        result.addAll(folderCreateActivities);
-        result.addAll(fileActivities);
-        result.addAll(folderRemoveActivities);
-        result.addAll(otherActivities);
-
-        enteredActivities.clear();
-
-        return result;
-    }
-
-}
\ No newline at end of file

Copied: 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/internal/ProjectDeltaVisitor.java
 (from rev 4044, 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/ProjectDeltaVisitor.java)
===================================================================
--- 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/internal/ProjectDeltaVisitor.java
                               (rev 0)
+++ 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/internal/ProjectDeltaVisitor.java
       2012-04-24 16:12:59 UTC (rev 4045)
@@ -0,0 +1,311 @@
+package de.fu_berlin.inf.dpp.project.internal;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+
+import de.fu_berlin.inf.dpp.User;
+import de.fu_berlin.inf.dpp.activities.SPath;
+import de.fu_berlin.inf.dpp.activities.business.FileActivity;
+import de.fu_berlin.inf.dpp.activities.business.FileActivity.Purpose;
+import de.fu_berlin.inf.dpp.activities.business.FolderActivity;
+import de.fu_berlin.inf.dpp.activities.business.IResourceActivity;
+import de.fu_berlin.inf.dpp.editor.EditorManager;
+import de.fu_berlin.inf.dpp.project.ISarosSession;
+import de.fu_berlin.inf.dpp.project.SharedProject;
+
+/**
+ * Visits the resource changes in a shared project.<br>
+ * The visitor is not supposed to be reused for different resourceChanged
+ * events.
+ */
+public class ProjectDeltaVisitor implements IResourceDeltaVisitor {
+    private static final Logger log = Logger
+        .getLogger(ProjectDeltaVisitor.class);
+    protected final EditorManager editorManager;
+
+    protected final User user;
+
+    protected final ISarosSession sarosSession;
+
+    /** The project visited. */
+    protected final SharedProject sharedProject;
+
+    public ProjectDeltaVisitor(EditorManager editorManager,
+        ISarosSession sarosSession, SharedProject sharedProject) {
+        this.sarosSession = sarosSession;
+        this.editorManager = editorManager;
+        this.sharedProject = sharedProject;
+        this.user = sarosSession.getLocalUser();
+    }
+
+    /** Stores activities to be sent due to one change event. */
+    protected List<IResourceActivity> pendingActivities = new 
ArrayList<IResourceActivity>();
+    /**
+     * Don't generate activities for a resource if
+     * <code>ignoredPath.isPrefixOf(resource.getFullPath())</code>.
+     */
+    private IPath ignoredPath = null;
+
+    /**
+     * Don't send activities yet.
+     */
+    private boolean postponeSending = false;
+
+    public boolean visit(IResourceDelta delta) {
+        IResource resource = delta.getResource();
+        if (resource.isDerived()) {
+            return false;
+        }
+
+        /*
+         * TODO Refactor this, we don't need to make a distinction here.
+         * Resource is resource. It's just Saros that insists on having 
separate
+         * activities for files and folders.
+         */
+        if (resource instanceof IFile) {
+            handleFileDelta(delta);
+            return true;
+        } else if (resource instanceof IFolder) {
+            // Note: IProject is not visited.
+            return handleFolderDelta(delta);
+        }
+
+        return true;
+    }
+
+    protected boolean handleFolderDelta(IResourceDelta delta) {
+        IResource resource = delta.getResource();
+
+        int kind = delta.getKind();
+        switch (kind) {
+        case IResourceDelta.ADDED:
+            add(resource);
+            return true;
+        case IResourceDelta.REMOVED:
+            remove(resource);
+            // We don't want to visit the children if this folder was removed.
+            // The only interesting case is that a file was moved out of this 
or
+            // a child folder, but we're still going to visit the move target.
+            setIgnoreChildren(resource);
+            return true;
+        default:
+            final boolean change = kind != IResourceDelta.NO_CHANGE;
+            return change;
+        }
+    }
+
+    protected void handleFileDelta(IResourceDelta delta) {
+        IResource resource = delta.getResource();
+        int kind = delta.getKind();
+
+        IProject project = resource.getProject();
+        boolean contentChange = isContentChange(delta);
+        switch (kind) {
+        case IResourceDelta.CHANGED:
+            if (contentChange) {
+                contentChanged(resource);
+            }
+            return;
+
+        case IResourceDelta.ADDED:
+
+            // Was this file moved or renamed?
+            if (isMovedFrom(delta)) {
+
+                // Adds have getMovedFrom set:
+                IPath oldFullPath = delta.getMovedFromPath();
+                IProject oldProject = ProjectDeltaVisitor
+                    .getProject(oldFullPath);
+
+                if (project.equals(oldProject)) {
+                    // Moving inside this project
+                    try {
+                        move(resource, oldFullPath, oldProject, contentChange);
+                        return;
+                    } catch (IOException e) {
+                        SharedResourcesManager.log
+                            .warn("Resource could not be read for"
+                                + " sending to peers:" + 
resource.getLocation());
+                    }
+                } else {
+                    // Moving a file into the shared project
+                    // -> Treat like an add!
+
+                    // Fall-through
+                }
+            }
+
+            // usual files adding procedure
+
+            add(resource);
+
+            return;
+
+        case IResourceDelta.REMOVED:
+            if (isMoved(delta)) {
+
+                // REMOVED deltas have MovedTo set
+                IPath newPath = delta.getMovedToPath();
+                IProject newProject = ProjectDeltaVisitor.getProject(newPath);
+                if (project.equals(newProject)) {
+                    // Ignore "REMOVED" while moving into shared project
+                    return;
+                }
+                // else moving file away from shared project, need to tell
+                // others to delete! Fall-through...
+            }
+
+            remove(resource);
+            return;
+
+        default:
+            return;
+        }
+    }
+
+    /** Indicates not to generate activities for children of the resource. */
+    protected void setIgnoreChildren(IResource resource) {
+        if (!ignoreChildren(resource))
+            ignoredPath = resource.getFullPath();
+    }
+
+    /**
+     * Returns true if we're not supposed to generate activities for children 
of
+     * the resource.
+     */
+    protected boolean ignoreChildren(IResource resource) {
+        IPath fullPath = resource.getFullPath();
+        return ignoreChildren(fullPath);
+    }
+
+    /**
+     * {@link #ignoreChildren(IResource)}
+     */
+    protected boolean ignoreChildren(IPath fullPath) {
+        if (ignoredPath == null || !ignoredPath.isPrefixOf(fullPath)) {
+            ignoredPath = null;
+            return false;
+        }
+        return true;
+    }
+
+    protected void add(IResource resource) {
+        sharedProject.add(resource);
+        final SPath spath = new SPath(resource);
+
+        if (resource instanceof IFile) {
+            try {
+                addActivity(FileActivity.created(user, spath, 
Purpose.ACTIVITY));
+            } catch (IOException e) {
+                log.error("Couldn't access file " + spath);
+            }
+        } else {
+            addActivity(new FolderActivity(user, FolderActivity.Type.Created,
+                spath));
+        }
+    }
+
+    protected void move(IResource resource, IPath oldFullPath,
+        IProject oldProject, boolean contentChange) throws IOException {
+        sharedProject.move(resource, oldFullPath);
+        addActivity(FileActivity.moved(user, new SPath(resource), new SPath(
+            oldProject, oldFullPath.removeFirstSegments(1)), contentChange));
+    }
+
+    protected void remove(IResource resource) {
+        sharedProject.remove(resource);
+        if (resource instanceof IFile) {
+            addActivity(FileActivity.removed(user, new SPath(resource),
+                Purpose.ACTIVITY));
+        } else {
+            addActivity(new FolderActivity(user, FolderActivity.Type.Removed,
+                new SPath(resource)));
+        }
+    }
+
+    protected static IProject getProject(IPath newPath) {
+        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+        IProject newProject = root.getProject(newPath.segment(0));
+        return newProject;
+    }
+
+    /**
+     * Adds an activity to {@link ProjectDeltaVisitor#pendingActivities}.
+     */
+    protected void addActivity(IResourceActivity activity) {
+        pendingActivities.add(activity);
+    }
+
+    /**
+     * Adds a FileActivity.created if the file is not currently in any open
+     * editor. We ignore opened files because otherwise we might send CHANGED
+     * events for files that are also handled by the editor manager.
+     * 
+     * @param resource
+     */
+    private void contentChanged(IResource resource) {
+        SPath spath = new SPath(resource);
+        if (editorManager.isOpened(spath)) {
+            return;
+        }
+
+        SharedResourcesManager.log.debug("Resource " + resource.getName()
+            + " changed");
+        try {
+            addActivity(FileActivity.created(user, spath, Purpose.ACTIVITY));
+        } catch (IOException e) {
+            SharedResourcesManager.log.warn(
+                "Resource could not be read for sending to peers:"
+                    + resource.getLocation(), e);
+            return;
+        }
+    }
+
+    /**
+     * Returns true if the "Moved"-flags are set.
+     */
+    protected boolean isMoved(IResourceDelta delta) {
+        return (isMovedFrom(delta) || isMovedTo(delta));
+    }
+
+    protected boolean isMovedFrom(IResourceDelta delta) {
+        return ((delta.getFlags() & IResourceDelta.MOVED_FROM) != 0);
+    }
+
+    protected boolean isMovedTo(IResourceDelta delta) {
+        return ((delta.getFlags() & IResourceDelta.MOVED_TO) != 0);
+    }
+
+    protected boolean isSync(IResourceDelta delta) {
+        return ((delta.getFlags() & IResourceDelta.SYNC) != 0);
+    }
+
+    /**
+     * Returns true if the CONTENT flag is set, which means that the file's
+     * timestamp changed.
+     */
+    protected boolean isContentChange(IResourceDelta delta) {
+        return ((delta.getFlags() & IResourceDelta.CONTENT) != 0);
+
+    }
+
+    protected void setPostponeSending(boolean value) {
+        postponeSending = value;
+    }
+
+    public boolean postponeSending() {
+        return postponeSending;
+    }
+}

Copied: 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/internal/ResourceActivityFilter.java
 (from rev 4044, 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/ResourceActivityFilter.java)
===================================================================
--- 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/internal/ResourceActivityFilter.java
                            (rev 0)
+++ 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/internal/ResourceActivityFilter.java
    2012-04-24 16:12:59 UTC (rev 4045)
@@ -0,0 +1,75 @@
+package de.fu_berlin.inf.dpp.project.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import de.fu_berlin.inf.dpp.activities.business.FileActivity;
+import de.fu_berlin.inf.dpp.activities.business.FolderActivity;
+import de.fu_berlin.inf.dpp.activities.business.IResourceActivity;
+
+/**
+ * A ResourceActivityFilter stores pending activities for the
+ * {@link SharedResourcesManager}, then orders and filters them.
+ */
+class ResourceActivityFilter {
+    private List<IResourceActivity> enteredActivities = new 
ArrayList<IResourceActivity>();
+
+    public void enterAll(List<? extends IResourceActivity> activities) {
+        enteredActivities.addAll(activities);
+    }
+
+    public void enter(IResourceActivity activity) {
+        enteredActivities.add(activity);
+    }
+
+    public boolean isEmpty() {
+        return enteredActivities.isEmpty();
+    }
+
+    /**
+     * Filters and returns the activities in order and clears the list of 
stored
+     * activities. The order is: VCS activities, folder creations, file
+     * activities, folder removals.
+     */
+    public List<IResourceActivity> retrieveAll() {
+        /*
+         * haferburg: Sorting is not necessary, because activities are already
+         * sorted enough (activity on parent comes before activity on child).
+         * All we need to do is make sure that folders are created first and
+         * deleted last. The sorting stuff was introduced with 1742 (1688).
+         */
+        List<IResourceActivity> fileActivities = new 
ArrayList<IResourceActivity>();
+        List<IResourceActivity> folderCreateActivities = new 
ArrayList<IResourceActivity>();
+        List<IResourceActivity> folderRemoveActivities = new 
ArrayList<IResourceActivity>();
+        List<IResourceActivity> otherActivities = new 
ArrayList<IResourceActivity>();
+
+        // Split all collectedActivities.
+        for (IResourceActivity activity : enteredActivities) {
+
+            if (activity instanceof FileActivity) {
+                fileActivities.add(activity);
+            } else if (activity instanceof FolderActivity) {
+                FolderActivity.Type tFolder = ((FolderActivity) activity)
+                    .getType();
+                if (tFolder == FolderActivity.Type.Created)
+                    folderCreateActivities.add(activity);
+                else if (tFolder == FolderActivity.Type.Removed)
+                    folderRemoveActivities.add(activity);
+            } else {
+                otherActivities.add(activity);
+            }
+        }
+
+        // Add activities to the result.
+        List<IResourceActivity> result = new ArrayList<IResourceActivity>();
+        result.addAll(folderCreateActivities);
+        result.addAll(fileActivities);
+        result.addAll(folderRemoveActivities);
+        result.addAll(otherActivities);
+
+        enteredActivities.clear();
+
+        return result;
+    }
+
+}
\ No newline at end of file

Modified: 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/internal/SharedResourcesManager.java
===================================================================
--- 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/internal/SharedResourcesManager.java
    2012-04-24 16:02:13 UTC (rev 4044)
+++ 
branches/dpp_light/src/de/fu_berlin/inf/dpp/project/internal/SharedResourcesManager.java
    2012-04-24 16:12:59 UTC (rev 4045)
@@ -63,8 +63,6 @@
 import de.fu_berlin.inf.dpp.project.ISarosSession;
 import de.fu_berlin.inf.dpp.project.ISarosSessionListener;
 import de.fu_berlin.inf.dpp.project.ISarosSessionManager;
-import de.fu_berlin.inf.dpp.project.ProjectDeltaVisitor;
-import de.fu_berlin.inf.dpp.project.ResourceActivityFilter;
 import de.fu_berlin.inf.dpp.project.SharedProject;
 import de.fu_berlin.inf.dpp.project.ToStringResourceDeltaVisitor;
 import de.fu_berlin.inf.dpp.synchronize.Blockable;
@@ -265,12 +263,6 @@
             }
             log.trace("Adding new activities " + visitor.pendingActivities);
             pendingActivities.enterAll(visitor.pendingActivities);
-
-            // if (!postpone)
-            // assert sharedProject.checkIntegrity();
-
-            log.trace("sharedProject.resourceMap: \n"
-                + sharedProject.resourceMap);
         }
         if (!postpone) {
             fireActivities();

Deleted: branches/dpp_light/src/de/fu_berlin/inf/dpp/util/CausedIOException.java
===================================================================
--- branches/dpp_light/src/de/fu_berlin/inf/dpp/util/CausedIOException.java     
2012-04-24 16:02:13 UTC (rev 4044)
+++ branches/dpp_light/src/de/fu_berlin/inf/dpp/util/CausedIOException.java     
2012-04-24 16:12:59 UTC (rev 4045)
@@ -1,24 +0,0 @@
-package de.fu_berlin.inf.dpp.util;
-
-import java.io.IOException;
-
-/**
- * An IOException which provides a convenience constructor taking a cause.
- * 
- * This class is basically used, because IOException in Java 1.5 does not have
- * this particular constructor.
- */
-public class CausedIOException extends IOException {
-
-    private static final long serialVersionUID = -1388201497639968452L;
-
-    public CausedIOException(String description, Exception exeption) {
-        super(description);
-        initCause(exeption);
-    }
-
-    public CausedIOException(Exception exception) {
-        super();
-        initCause(exception);
-    }
-}

Modified: branches/dpp_light/src/de/fu_berlin/inf/dpp/util/FileUtils.java
===================================================================
--- branches/dpp_light/src/de/fu_berlin/inf/dpp/util/FileUtils.java     
2012-04-24 16:02:13 UTC (rev 4044)
+++ branches/dpp_light/src/de/fu_berlin/inf/dpp/util/FileUtils.java     
2012-04-24 16:12:59 UTC (rev 4045)
@@ -54,7 +54,7 @@
      * 
      * @return checksum of file
      * 
-     * @throws CausedIOException
+     * @throws IOException
      *             if checksum calculation has been failed.
      */
     public static long checksum(IFile file) throws IOException {

Modified: branches/dpp_light/src/de/fu_berlin/inf/dpp/util/FileZipper.java
===================================================================
--- branches/dpp_light/src/de/fu_berlin/inf/dpp/util/FileZipper.java    
2012-04-24 16:02:13 UTC (rev 4044)
+++ branches/dpp_light/src/de/fu_berlin/inf/dpp/util/FileZipper.java    
2012-04-24 16:12:59 UTC (rev 4045)
@@ -12,6 +12,7 @@
 import java.util.zip.ZipOutputStream;
 
 import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.time.StopWatch;
 import org.apache.log4j.Logger;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.IPath;
@@ -91,8 +92,9 @@
 
             stopWatch.stop();
 
-            LOG.debug(String.format("created project archive %s at %s",
-                stopWatch.throughput(archive.length()),
+            LOG.debug(String.format(
+                "created project archive (%d bytes) in %d ms at %s",
+                archive.length(), stopWatch.getTime(),
                 archive.getAbsolutePath()));
         } catch (IOException e) {
             IOUtils.closeQuietly(zipStream);

Deleted: branches/dpp_light/src/de/fu_berlin/inf/dpp/util/StopWatch.java
===================================================================
--- branches/dpp_light/src/de/fu_berlin/inf/dpp/util/StopWatch.java     
2012-04-24 16:02:13 UTC (rev 4044)
+++ branches/dpp_light/src/de/fu_berlin/inf/dpp/util/StopWatch.java     
2012-04-24 16:12:59 UTC (rev 4045)
@@ -1,116 +0,0 @@
-package de.fu_berlin.inf.dpp.util;
-
-/**
- * Apache StopWatch with Fluid Interface Style.
- * 
- * All times are returned in ms.
- * 
- * All calls are delegated to the {@link #watch}.
- * 
- * @see org.apache.commons.lang.time.StopWatch
- */
-public class StopWatch {
-
-    protected org.apache.commons.lang.time.StopWatch watch = new 
org.apache.commons.lang.time.StopWatch();
-
-    /**
-     * @see org.apache.commons.lang.time.StopWatch#getSplitTime()
-     */
-    public long getSplitTime() {
-        return watch.getSplitTime();
-    }
-
-    /**
-     * @see org.apache.commons.lang.time.StopWatch#getStartTime()
-     */
-    public long getStartTime() {
-        return watch.getStartTime();
-    }
-
-    /**
-     * @see org.apache.commons.lang.time.StopWatch#getTime()
-     */
-    public long getTime() {
-        return watch.getTime();
-    }
-
-    /**
-     * @see org.apache.commons.lang.time.StopWatch#reset()
-     */
-    public StopWatch reset() {
-        watch.reset();
-        return this;
-    }
-
-    /**
-     * @see org.apache.commons.lang.time.StopWatch#resume()
-     */
-    public StopWatch resume() {
-        watch.resume();
-        return this;
-    }
-
-    /**
-     * @see org.apache.commons.lang.time.StopWatch#split()
-     */
-    public StopWatch split() {
-        watch.split();
-        return this;
-    }
-
-    /**
-     * @see org.apache.commons.lang.time.StopWatch#start()
-     */
-    public StopWatch start() {
-        watch.start();
-        return this;
-    }
-
-    /**
-     * @see org.apache.commons.lang.time.StopWatch#stop()
-     */
-    public StopWatch stop() {
-        watch.stop();
-        return this;
-    }
-
-    /**
-     * @see org.apache.commons.lang.time.StopWatch#suspend()
-     */
-    public StopWatch suspend() {
-        watch.suspend();
-        return this;
-    }
-
-    /**
-     * @see org.apache.commons.lang.time.StopWatch#toSplitString()
-     */
-    public String toSplitString() {
-        return watch.toSplitString();
-    }
-
-    /**
-     * @see org.apache.commons.lang.time.StopWatch#toString()
-     */
-    @Override
-    public String toString() {
-        return watch.toString();
-    }
-
-    /**
-     * @see org.apache.commons.lang.time.StopWatch#unsplit()
-     */
-    public StopWatch unsplit() {
-        watch.unsplit();
-        return this;
-    }
-
-    /**
-     * Convenience function returning a string representing of the throughput
-     * achieved when sending =length= number of bytes in getTime() ms.
-     */
-    public String throughput(long length) {
-        return Utils.throughput(length, getTime());
-    }
-
-}

Deleted: 
branches/dpp_light/src/de/fu_berlin/inf/dpp/util/ThreadAccessRecorder.java
===================================================================
--- branches/dpp_light/src/de/fu_berlin/inf/dpp/util/ThreadAccessRecorder.java  
2012-04-24 16:02:13 UTC (rev 4044)
+++ branches/dpp_light/src/de/fu_berlin/inf/dpp/util/ThreadAccessRecorder.java  
2012-04-24 16:12:59 UTC (rev 4045)
@@ -1,106 +0,0 @@
-/*
- * DPP - Serious Distributed Pair Programming
- * (c) Freie Universit\xE4t Berlin - Fachbereich Mathematik und Informatik - 
2010
- * (c) Stephan Lau - 2010
- * 
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 1, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-package de.fu_berlin.inf.dpp.util;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * This class helps to interrupt blocking operations by external Threads. Just
- * wrap the operation with
- * 
- * <pre>
- * try {
- *     try {
- *         threadAccessRecorder.record();
- *     } catch (InterruptedException e) {
- *         // threadAccessRecorder already interrupted
- *     }
- *     longRunningAndInterruptibleOperation();
- * } catch (InterruptedException e) {
- *     // threadAccessRecorder or thread interrupted
- * } finally {
- *     try {
- *         threadAccessRecorder.release();
- *     } catch (InterruptedException e) {
- *         // handle optionally
- *     }
- * }
- * </pre>
- * 
- * and when the recorder gets interrupted (by
- * {@link ThreadAccessRecorder#interrupt()}) it interrupts all recorded Threads
- * to stop these operations.
- * 
- * @author s-lau
- */
-public class ThreadAccessRecorder {
-    protected Set<Thread> threads = new HashSet<Thread>();
-    protected boolean interrupted = false;
-
-    /**
-     * After this call a blocking or long operation starts. {@link #release()}
-     * <strong>MUST</strong> be called after this operation finished.
-     * 
-     * @throws InterruptedException
-     *             when this recorder was told to interrupt and can not record
-     *             anymore
-     */
-    public synchronized void record() throws InterruptedException {
-        if (!interrupted)
-            threads.add(Thread.currentThread());
-        else
-            throw new InterruptedException();
-    }
-
-    /**
-     * Operation finished.
-     * 
-     * @throws InterruptedException
-     *             when this recorder got interrupted but operation was already
-     *             done (or doesn't respect the interruption)
-     */
-    public synchronized void release() throws InterruptedException {
-        threads.remove(Thread.currentThread());
-        // re-interrupt when we're not interruptor
-        if (Thread.interrupted() && !interrupted)
-            Thread.currentThread().interrupt();
-        if (interrupted)
-            throw new InterruptedException();
-    }
-
-    /**
-     * Interrupts all Threads which are recorded but not yet released.
-     * Afterwards calls to {@link #record()} or {@link #release()} will lead to
-     * {@link InterruptedException}s.
-     */
-    public synchronized void interrupt() {
-        interrupted = true;
-        for (Thread thread : threads) {
-            thread.interrupt();
-        }
-        threads.clear();
-    }
-
-    public synchronized boolean interrupted() {
-        return interrupted;
-    }
-
-}
\ No newline at end of file

Modified: branches/dpp_light/src/de/fu_berlin/inf/dpp/util/Utils.java
===================================================================
--- branches/dpp_light/src/de/fu_berlin/inf/dpp/util/Utils.java 2012-04-24 
16:02:13 UTC (rev 4044)
+++ branches/dpp_light/src/de/fu_berlin/inf/dpp/util/Utils.java 2012-04-24 
16:12:59 UTC (rev 4045)
@@ -744,9 +744,9 @@
                 subMonitor.worked(1);
             }
             return bos.toByteArray();
-        } catch (java.util.zip.DataFormatException ex) {
-            log.error("Failed to inflate bytearray", ex);
-            throw new CausedIOException(ex);
+        } catch (java.util.zip.DataFormatException e) {
+            log.error("Failed to inflate bytearray", e);
+            throw new IOException(e);
         } finally {
             IOUtils.closeQuietly(bos);
             subMonitor.done();

Deleted: 
branches/dpp_light/test/junit/de/fu_berlin/inf/dpp/util/ThreadAccessRecorderTest.java
===================================================================
--- 
branches/dpp_light/test/junit/de/fu_berlin/inf/dpp/util/ThreadAccessRecorderTest.java
       2012-04-24 16:02:13 UTC (rev 4044)
+++ 
branches/dpp_light/test/junit/de/fu_berlin/inf/dpp/util/ThreadAccessRecorderTest.java
       2012-04-24 16:12:59 UTC (rev 4045)
@@ -1,192 +0,0 @@
-/**
- * 
- */
-package de.fu_berlin.inf.dpp.util;
-
-import static org.junit.Assert.assertTrue;
-
-import org.apache.log4j.Logger;
-import org.junit.Test;
-
-/**
- * 
- */
-public class ThreadAccessRecorderTest extends ThreadAccessRecorder {
-
-    private static Logger log = Logger
-        .getLogger(ThreadAccessRecorderTest.class);
-
-    /**
-     * Test method for
-     * {@link de.fu_berlin.inf.dpp.util.ThreadAccessRecorder#record()}.
-     * 
-     * @throws InterruptedException
-     */
-    @Test
-    public void testRecord() throws InterruptedException {
-        final ThreadAccessRecorder tAccessRec = new ThreadAccessRecorder();
-        int amountThreads = 5;
-        for (int i = 0; i < amountThreads; i++) {
-            Thread t1 = new Thread(new Runnable() {
-
-                public void run() {
-                    try {
-                        tAccessRec.record();
-                    } catch (InterruptedException e) {
-                        // TODO Auto-generated catch block
-                        log.debug("", e);
-                    }
-
-                }
-            });
-            t1.start();
-            t1.join();
-        }
-
-        assertTrue("Record does not record all threads.",
-            tAccessRec.threads.size() == amountThreads);
-
-    }
-
-    /**
-     * Test method for
-     * {@link de.fu_berlin.inf.dpp.util.ThreadAccessRecorder#record()}.
-     * 
-     * @throws InterruptedException
-     */
-    @Test(expected = InterruptedException.class)
-    public void testRecord2() throws InterruptedException {
-        final ThreadAccessRecorder tAccessRec = new ThreadAccessRecorder();
-        tAccessRec.interrupt();
-        // this should throw an interrupted exception!
-        tAccessRec.record();
-    }
-
-    /**
-     * Test method for
-     * {@link de.fu_berlin.inf.dpp.util.ThreadAccessRecorder#release()}.
-     * 
-     * @throws InterruptedException
-     */
-    @Test
-    public void testRelease() throws InterruptedException {
-
-        final ThreadAccessRecorder tAccessRec = new ThreadAccessRecorder();
-        int amountThreads = 5;
-        for (int i = 0; i < amountThreads; i++) {
-            Thread t1 = new Thread(new Runnable() {
-
-                public void run() {
-                    try {
-                        tAccessRec.record();
-                        tAccessRec.release();
-                    } catch (InterruptedException e) {
-                        // TODO Auto-generated catch block
-                        log.debug("", e);
-                    }
-
-                }
-            });
-            t1.start();
-            t1.join();
-        }
-        assertTrue("Release does not release the thread.",
-            tAccessRec.threads.size() == 0);
-
-    }
-
-    /**
-     * Test method for
-     * {@link de.fu_berlin.inf.dpp.util.ThreadAccessRecorder#release()}.
-     * 
-     * @throws InterruptedException
-     */
-    @Test(expected = InterruptedException.class)
-    public void testRelease2() throws InterruptedException {
-        final ThreadAccessRecorder tAccessRec = new ThreadAccessRecorder();
-        tAccessRec.interrupt();
-        // this should throw an interrupted exception!
-        tAccessRec.release();
-    }
-
-    /**
-     * Test method for
-     * {@link de.fu_berlin.inf.dpp.util.ThreadAccessRecorder#release()}.
-     * 
-     * @throws InterruptedException
-     */
-    @Test
-    public void testRelease3() throws InterruptedException {
-
-        final ThreadAccessRecorder tAccessRec = new ThreadAccessRecorder();
-        Thread t1 = new Thread(new Runnable() {
-
-            public void run() {
-                try {
-                    tAccessRec.record();
-                    Thread.currentThread().interrupt();
-                    // tAccessRec.interrupt();
-                    tAccessRec.release();
-                    assertTrue("The thread wasn't interrupted.", Thread
-                        .currentThread().isInterrupted() == true);
-                } catch (InterruptedException e) {
-                    System.out.println(e);
-                }
-
-            }
-        });
-        t1.start();
-        t1.join();
-        tAccessRec.release();
-
-    }
-
-    /**
-     * Test method for
-     * {@link de.fu_berlin.inf.dpp.util.ThreadAccessRecorder#interrupt()}.
-     * 
-     * @throws InterruptedException
-     */
-    @Test
-    public void testInterrupt() throws InterruptedException {
-        final ThreadAccessRecorder tAccessRec = new ThreadAccessRecorder();
-        int amountThreads = 5;
-        for (int i = 0; i < amountThreads; i++) {
-            Thread t1 = new Thread(new Runnable() {
-
-                public void run() {
-                    try {
-                        tAccessRec.record();
-                    } catch (InterruptedException e) {
-                        // TODO Auto-generated catch block
-                        log.debug("", e);
-                    }
-
-                }
-            });
-            t1.start();
-            t1.join();
-        }
-        tAccessRec.interrupt();
-
-        assertTrue(" Interrupted wasn't changed correctly",
-            tAccessRec.interrupted == true);
-        assertTrue("The threads weren't cleared",
-            tAccessRec.threads.size() == 0);
-    }
-
-    /**
-     * Test method for
-     * {@link de.fu_berlin.inf.dpp.util.ThreadAccessRecorder#interrupted()}.
-     */
-    @Test
-    public void testInterrupted() {
-        final ThreadAccessRecorder tAccessRec = new ThreadAccessRecorder();
-        assertTrue("The attribut interrupted wasn't returned correctly",
-            tAccessRec.interrupted() == false);
-        tAccessRec.interrupt();
-        assertTrue("The attribut interrupted wasn't returned correctly",
-            tAccessRec.interrupted() == true);
-    }
-
-}

Modified: 
branches/dpp_light/test/junit/de/fu_berlin/inf/dpp/util/UtilTestSuite.java
===================================================================
--- branches/dpp_light/test/junit/de/fu_berlin/inf/dpp/util/UtilTestSuite.java  
2012-04-24 16:02:13 UTC (rev 4044)
+++ branches/dpp_light/test/junit/de/fu_berlin/inf/dpp/util/UtilTestSuite.java  
2012-04-24 16:12:59 UTC (rev 4045)
@@ -6,7 +6,7 @@
 @RunWith(Suite.class)
 @Suite.SuiteClasses({ UtilTest.class, NamedThreadFactoryTest.class,
     PairTest.class, TotalOrderComparatorTest.class, ArrayUtilsTest.class,
-    ActivityUtilsTest.class, ThreadAccessRecorderTest.class, })
+    ActivityUtilsTest.class, })
 public class UtilTestSuite {
     // the class remains completely empty,
     // being used only as a holder for the above annotations

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dpp-commit mailing list
Dpp-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dpp-commit

Reply via email to