Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java
index 9de78fb8e..9342c6f4e 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java
@@ -149,4 +149,40 @@ public class RepositoryEvent extends EventObject {
return isEnabled;
}
+ /*
+ * (non-Javadoc)
+ * @see java.util.EventObject#toString()
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("RepositoryEvent["); //$NON-NLS-1$
+ switch (kind) {
+ case ADDED :
+ buffer.append("ADDED "); //$NON-NLS-1$
+ break;
+ case CHANGED :
+ buffer.append("CHANGED "); //$NON-NLS-1$
+ break;
+ case DISCOVERED :
+ buffer.append("DISCOVERED "); //$NON-NLS-1$
+ break;
+ case ENABLEMENT :
+ buffer.append("ENABLED "); //$NON-NLS-1$
+ break;
+ case REMOVED :
+ buffer.append("REMOVED "); //$NON-NLS-1$
+ break;
+ }
+ if (type == IRepository.TYPE_ARTIFACT)
+ buffer.append("Artifact "); //$NON-NLS-1$
+ else
+ buffer.append("Metadata "); //$NON-NLS-1$
+ // uri
+ buffer.append(getSource().toString());
+ if (nickname != null)
+ buffer.append("Nickname: " + nickname); //$NON-NLS-1$
+ buffer.append(" Enabled: " + Boolean.toString(isEnabled)); //$NON-NLS-1$
+ buffer.append("] "); //$NON-NLS-1$
+ return buffer.toString();
+ }
}

Back to the top