Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2010-04-24 16:13:57 -0400
committerSusan Franklin2010-04-24 16:13:57 -0400
commit2e0058c3316e03fb7d10d0cf037399d91b77ad1a (patch)
tree450acb7502d64b56a0fa083a4cafc2845f5889bc /bundles/org.eclipse.equinox.p2.repository
parentbcde189cc17726636e028561c235fdad914ce74e (diff)
downloadrt.equinox.p2-2e0058c3316e03fb7d10d0cf037399d91b77ad1a.tar.gz
rt.equinox.p2-2e0058c3316e03fb7d10d0cf037399d91b77ad1a.tar.xz
rt.equinox.p2-2e0058c3316e03fb7d10d0cf037399d91b77ad1a.zip
Bug 300860 - [ui] Support event tracing
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository')
-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