aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ross2013-12-04 13:59:29 (EST)
committerJohn Ross2013-12-05 16:10:55 (EST)
commit05d5f9aa7f8391a9ec266971e016cf8bd722471b (patch)
tree9d3c07cd92de6d9d5d831cf3a18adf59c31f9c16
parentfdf475ed59e302b4f1528c79e71cbf00adcfcb40 (diff)
downloadrt.equinox.framework-05d5f9aa7f8391a9ec266971e016cf8bd722471b.zip
rt.equinox.framework-05d5f9aa7f8391a9ec266971e016cf8bd722471b.tar.gz
rt.equinox.framework-05d5f9aa7f8391a9ec266971e016cf8bd722471b.tar.bz2
[Bug 420067] Add support for org.eclipse.osgi/resolver/report resolver trace option.
Setting org.eclipse.osgi/resolver/report = true will print out the resolution report information.
-rw-r--r--bundles/org.eclipse.osgi/.options4
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java12
2 files changed, 15 insertions, 1 deletions
diff --git a/bundles/org.eclipse.osgi/.options b/bundles/org.eclipse.osgi/.options
index 490f343..4fdf3e9 100644
--- a/bundles/org.eclipse.osgi/.options
+++ b/bundles/org.eclipse.osgi/.options
@@ -50,7 +50,9 @@ org.eclipse.osgi/resolver/hooks = false
# Displays information about uses constraint violations.
org.eclipse.osgi/resolver/uses = false
# Displays wiring information after the resolve process completes.
-org.eclipse.osgi/resolver/wiring = true
+org.eclipse.osgi/resolver/wiring = false
+# Displays the resolution report information.
+org.eclipse.osgi/resolver/report = true
#### Profile settings
org.eclipse.osgi/profile/startup = false
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java
index 731f0a0..88fd61a 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java
@@ -44,12 +44,14 @@ final class ModuleResolver {
private static final String OPTION_HOOKS = OPTION_RESOLVER + "/hooks"; //$NON-NLS-1$
private static final String OPTION_USES = OPTION_RESOLVER + "/uses"; //$NON-NLS-1$
private static final String OPTION_WIRING = OPTION_RESOLVER + "/wiring"; //$NON-NLS-1$
+ private static final String OPTION_REPORT = OPTION_RESOLVER + "/report"; //$NON-NLS-1$
static boolean DEBUG_RESOLVER = false;
static boolean DEBUG_PROVIDERS = false;
static boolean DEBUG_HOOKS = false;
static boolean DEBUG_USES = false;
static boolean DEBUG_WIRING = false;
+ static boolean DEBUG_REPORT = false;
private void setDebugOptions() {
DebugOptions options = adaptor.getDebugOptions();
@@ -61,6 +63,7 @@ final class ModuleResolver {
DEBUG_HOOKS = options.getBooleanOption(OPTION_HOOKS, false);
DEBUG_USES = options.getBooleanOption(OPTION_USES, false);
DEBUG_WIRING = options.getBooleanOption(OPTION_WIRING, false);
+ DEBUG_REPORT = options.getBooleanOption(OPTION_REPORT, false);
}
private static final Collection<String> NON_PAYLOAD_CAPABILITIES = Arrays.asList(IdentityNamespace.IDENTITY_NAMESPACE);
@@ -885,6 +888,15 @@ final class ModuleResolver {
printWirings(result);
}
report = reportBuilder.build(result, re);
+ if (DEBUG_RESOLVER || DEBUG_REPORT) {
+ Set<Resource> resources = report.getEntries().keySet();
+ if (!resources.isEmpty()) {
+ Debug.println("RESOLVER: Resolution report"); //$NON-NLS-1$
+ for (Resource resource : report.getEntries().keySet()) {
+ Debug.println(report.getResolutionReportMessage(resource));
+ }
+ }
+ }
if (hook instanceof ResolutionReport.Listener)
((ResolutionReport.Listener) hook).handleResolutionReport(report);
hook.end();