summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-29 10:16:34 (EDT)
committerEike Stepper2007-07-29 10:16:34 (EDT)
commitaf20857d7b1e31703b90c7f72c53d2d6c81ecd64 (patch)
treec8c9a9d5d4af545b0c15fdab474f67030e3474b9
parent4eccf9308d4957c5fead0affca89038b31002650 (diff)
downloadcdo-af20857d7b1e31703b90c7f72c53d2d6c81ecd64.zip
cdo-af20857d7b1e31703b90c7f72c53d2d6c81ecd64.tar.gz
cdo-af20857d7b1e31703b90c7f72c53d2d6c81ecd64.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/CDO UI.launch116
-rw-r--r--plugins/org.eclipse.net4j.util/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/EclipseSubMonitor.java31
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/LegacySubMonitor.java18
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/LegacyTest.java (renamed from plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/RootMonitor.java)9
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/Monitor.java41
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/MonitorTest.java (renamed from plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/LegacyTest.java)17
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/SubMonitor.java33
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/EclipseMonitor.java45
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/IEclipseMonitor.java21
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/LegacyMonitor.java23
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/MONITOR.java8
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/MonitoredJob.java52
13 files changed, 208 insertions, 210 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/CDO UI.launch b/plugins/org.eclipse.emf.cdo.ui/CDO UI.launch
index 3638171..c8f017c 100644
--- a/plugins/org.eclipse.emf.cdo.ui/CDO UI.launch
+++ b/plugins/org.eclipse.emf.cdo.ui/CDO UI.launch
@@ -38,22 +38,22 @@
<mapEntry key="org.eclipse.ui/trace/contexts" value="false"/>
<mapEntry key="org.eclipse.wst.common.environment/trace/error" value="true"/>
<mapEntry key="org.eclipse.debug.ui/debug/viewers/updateSequence" value="false"/>
-<mapEntry key="org.eclipse.emf.validation/debug/exceptions/throwing" value="false"/>
<mapEntry key="org.eclipse.wst.common.environment/trace/warning" value="true"/>
+<mapEntry key="org.eclipse.emf.validation/debug/exceptions/throwing" value="false"/>
<mapEntry key="org.eclipse.osgi/trace/filename" value="runtime.traces"/>
<mapEntry key="org.eclipse.wst.sse.ui/extendededitoractionbuilder" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/contextlaunching" value="false"/>
-<mapEntry key="org.eclipse.wst.sse.ui/actioncontributor/debugstatusfields" value="true"/>
<mapEntry key="org.eclipse.jdt.core/debug" value="true"/>
+<mapEntry key="org.eclipse.wst.sse.ui/actioncontributor/debugstatusfields" value="true"/>
+<mapEntry key="org.eclipse.debug.ui/debug/contextlaunching" value="false"/>
<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug" value="false"/>
<mapEntry key="org.eclipse.net4j.tcp/debug" value="true"/>
<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
<mapEntry key="org.eclipse.emf.cdo.server/debug.repository" value="true"/>
<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
-<mapEntry key="org.eclipse.emf.ocl/debug/exceptions/throwing" value="false"/>
<mapEntry key="org.eclipse.wst.sse.ui/contentOutline" value="false"/>
-<mapEntry key="org.eclipse.wtp.common/debug/logtrace" value="false"/>
+<mapEntry key="org.eclipse.emf.ocl/debug/exceptions/throwing" value="false"/>
<mapEntry key="org.eclipse.wst.sse.ui/preferences-properties" value="false"/>
+<mapEntry key="org.eclipse.wtp.common/debug/logtrace" value="false"/>
<mapEntry key="org.eclipse.ui.intro/trace/printHTML" value="false"/>
<mapEntry key="org.eclipse.emf.query.ocl/debug" value="true"/>
<mapEntry key="org.eclipse.ltk.core.refactoring/perf/participants/createChanges" value="300"/>
@@ -61,39 +61,39 @@
<mapEntry key="org.eclipse.net4j.util/debug.lifecycle.dump" value="true"/>
<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPerspectiveListener" value="false"/>
<mapEntry key="org.eclipse.emf.cdo/debug.util" value="true"/>
-<mapEntry key="org.eclipse.wst.sse.ui/propertySheet" value="false"/>
<mapEntry key="org.eclipse.osgi/resolver/debug" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.ui/propertySheet" value="false"/>
<mapEntry key="org.eclipse.team.core/refreshjob" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
<mapEntry key="org.eclipse.ui/debug" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
<mapEntry key="org.eclipse.wtp.common/debug/loglevel" value="WARNING"/>
<mapEntry key="org.eclipse.help.ui/debug/infopop" value="false"/>
<mapEntry key="org.eclipse.pde.core/classpath" value="false"/>
<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
<mapEntry key="org.eclipse.equinox.preferences/general" value="false"/>
<mapEntry key="org.eclipse.net4j.jms.server/debug.store" value="true"/>
-<mapEntry key="org.eclipse.wst.sse.core/format" value="false"/>
<mapEntry key="org.eclipse.ui/trace/handlers.performance" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/format" value="false"/>
<mapEntry key="org.eclipse.ocl/debug/evaluation" value="false"/>
<mapEntry key="org.eclipse.ui/trace/operations.verbose" value="false"/>
<mapEntry key="org.eclipse.emf.validation/debug/constraints" value="false"/>
<mapEntry key="org.eclipse.osgi/trace/activation" value="false"/>
<mapEntry key="org.eclipse.ocl/debug/exceptions/catching" value="false"/>
<mapEntry key="org.eclipse.debug.core/debug/commands" value="false"/>
-<mapEntry key="org.eclipse.team.core/threading" value="false"/>
<mapEntry key="org.eclipse.ui/perf/workbench.restore" value="30000"/>
+<mapEntry key="org.eclipse.team.core/threading" value="false"/>
<mapEntry key="org.eclipse.wst.sse.core/structureddocument" value="false"/>
<mapEntry key="org.eclipse.net4j.util/perf" value="false"/>
<mapEntry key="org.eclipse.emf.transaction/debug/methods/exiting" value="false"/>
<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
<mapEntry key="org.eclipse.emf.cdo.protocol/debug.protocol" value="true"/>
+<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
<mapEntry key="org.eclipse.ocl/debug" value="true"/>
<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
<mapEntry key="org.eclipse.osgi/defaultprofile/logsynchronously" value="false"/>
<mapEntry key="org.eclipse.net4j.db/debug" value="true"/>
-<mapEntry key="org.eclipse.wst.common.environment/trace/ws_dt_cmd_engine" value="true"/>
<mapEntry key="org.eclipse.emf.query/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.wst.common.environment/trace/ws_dt_cmd_engine" value="true"/>
<mapEntry key="org.eclipse.osgi/monitor/activation" value="false"/>
<mapEntry key="org.eclipse.net4j.jms/debug.protocol" value="true"/>
<mapEntry key="org.eclipse.wst.sse.ui/gotoNextAnnotation" value="false"/>
@@ -101,8 +101,8 @@
<mapEntry key="org.eclipse.debug.ui/debug" value="false"/>
<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
<mapEntry key="org.eclipse.help.base/debug/search" value="false"/>
-<mapEntry key="org.eclipse.pde.build/debug" value="false"/>
<mapEntry key="org.eclipse.jface.text/debug/ContentAssistSubjectAdapters" value="false"/>
+<mapEntry key="org.eclipse.pde.build/debug" value="false"/>
<mapEntry key="org.eclipse.wst.common.environment/trace/ws_ant" value="true"/>
<mapEntry key="org.eclipse.jdt.ui/perf/search/participants" value="300"/>
<mapEntry key="org.eclipse.emf.validation/debug/parsers" value="false"/>
@@ -111,13 +111,13 @@
<mapEntry key="org.eclipse.ui/perf/perspective.create" value="800"/>
<mapEntry key="org.eclipse.update.core/debug/type" value="false"/>
<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/platformadmin" value="false"/>
-<mapEntry key="org.eclipse.osgi/resolver/generics" value="false"/>
-<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPropertyChangeListener" value="false"/>
<mapEntry key="org.eclipse.emf.workspace/debug/methods/exiting" value="false"/>
+<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPropertyChangeListener" value="false"/>
+<mapEntry key="org.eclipse.osgi/resolver/generics" value="false"/>
<mapEntry key="org.eclipse.wst.common.project.facet.core/actionSorting" value="false"/>
<mapEntry key="org.eclipse.osgi/resolver/requires" value="false"/>
-<mapEntry key="org.eclipse.core.resources/refresh" value="false"/>
<mapEntry key="org.eclipse.emf.workspace/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.core.resources/refresh" value="false"/>
<mapEntry key="org.eclipse.jdt.core/perf/containerinitializer" value="5000"/>
<mapEntry key="org.eclipse.osgi/profile/benchmark" value="false"/>
<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
@@ -128,14 +128,14 @@
<mapEntry key="org.eclipse.ui/trace/handlers" value="false"/>
<mapEntry key="org.eclipse.ui/trace/contexts.performance" value="false"/>
<mapEntry key="org.eclipse.jem.util/debug/logtrace" value="false"/>
-<mapEntry key="org.eclipse.jdt.core/perf/completion" value="300"/>
<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/perf/completion" value="300"/>
<mapEntry key="org.eclipse.osgi/profile/startup" value="false"/>
<mapEntry key="org.eclipse.core.jobs/jobs" value="false"/>
<mapEntry key="org.eclipse.wst.sse.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.wst.common.environment/trace/info" value="true"/>
-<mapEntry key="org.eclipse.emf.query.ocl/debug/exceptions/throwing" value="false"/>
<mapEntry key="org.eclipse.core.resources/perf/save.participants" value="500"/>
+<mapEntry key="org.eclipse.emf.query.ocl/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.wst.common.environment/trace/info" value="true"/>
<mapEntry key="org.eclipse.net4j/perf" value="false"/>
<mapEntry key="org.eclipse.help.base/debug" value="true"/>
<mapEntry key="org.eclipse.net4j/debug" value="true"/>
@@ -153,11 +153,11 @@
<mapEntry key="org.eclipse.core.resources/contenttype/cache" value="false"/>
<mapEntry key="org.eclipse.emf.cdo/debug.repository" value="true"/>
<mapEntry key="org.eclipse.wst.sse.ui/extendedconfigurationbuilder" value="false"/>
-<mapEntry key="org.eclipse.core.jobs/jobs/locks" value="false"/>
<mapEntry key="org.eclipse.update.core/debug/configuration" value="false"/>
+<mapEntry key="org.eclipse.core.jobs/jobs/locks" value="false"/>
<mapEntry key="org.eclipse.wst.xml.core/debug/cmdocumentmanager" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
<mapEntry key="org.eclipse.ui/trace/handlers.verbose.commandId" value=""/>
+<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
<mapEntry key="org.eclipse.ui.ide/debug" value="false"/>
<mapEntry key="org.eclipse.osgi/profile/debug" value="false"/>
<mapEntry key="org.eclipse.pde.core/debug" value="true"/>
@@ -166,17 +166,17 @@
<mapEntry key="org.eclipse.net4j.util/debug.registry" value="true"/>
<mapEntry key="org.eclipse.jdt.ui/perf/explorer/createPartControl" value="1300"/>
<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
-<mapEntry key="org.eclipse.ui.ide/debug/internalerror/openDialog" value="false"/>
-<mapEntry key="org.eclipse.emf.cdo/debug.object" value="false"/>
<mapEntry key="org.eclipse.jdt.core/perf/variableinitializer" value="5000"/>
+<mapEntry key="org.eclipse.emf.cdo/debug.object" value="false"/>
+<mapEntry key="org.eclipse.ui.ide/debug/internalerror/openDialog" value="false"/>
<mapEntry key="org.eclipse.emf.cdo.server/debug.revision" value="true"/>
<mapEntry key="org.eclipse.core.resources/strings" value="false"/>
<mapEntry key="org.eclipse.jdt.core/debug/sourcemapper" value="false"/>
<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
<mapEntry key="org.eclipse.core.expressions/tracePropertyResolving" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/showHeapStatus" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
<mapEntry key="org.eclipse.core.resources/preferences" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/showHeapStatus" value="true"/>
<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
<mapEntry key="org.eclipse.emf.workspace/debug" value="true"/>
<mapEntry key="org.eclipse.jdt.ui/perf/content_assist_sorters/extensions" value=""/>
@@ -190,25 +190,25 @@
<mapEntry key="org.eclipse.emf.transaction/debug/transactions" value="false"/>
<mapEntry key="org.eclipse.ocl/debug/parsing" value="false"/>
<mapEntry key="org.eclipse.update.core/debug" value="true"/>
-<mapEntry key="org.eclipse.wst.sse.core/tasks/preferences" value="false"/>
<mapEntry key="org.eclipse.osgi/debug/security" value="false"/>
-<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/tasks/preferences" value="false"/>
<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
+<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
<mapEntry key="org.eclipse.core.resources/perf/builders" value="10000"/>
-<mapEntry key="org.eclipse.net4j.jms.admin/debug.protocol" value="true"/>
<mapEntry key="org.eclipse.ui/perf/perspective.listeners" value="200"/>
+<mapEntry key="org.eclipse.net4j.jms.admin/debug.protocol" value="true"/>
<mapEntry key="org.eclipse.ui/debug/showAllJobs" value="false"/>
<mapEntry key="org.eclipse.core.resources/history" value="false"/>
<mapEntry key="org.eclipse.wst.sse.ui/propertyChangeUpdateActionContributionItem" value="false"/>
<mapEntry key="org.eclipse.ui/listeners/IWorkbenchPage.IPartListener" value="false"/>
<mapEntry key="org.eclipse.jdt.core/debug/search" value="false"/>
-<mapEntry key="org.eclipse.pde.core/validation" value="false"/>
<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
+<mapEntry key="org.eclipse.pde.core/validation" value="false"/>
<mapEntry key="org.eclipse.wst.sse.ui/extendededitoractionbuilder/readtime" value="false"/>
<mapEntry key="org.eclipse.jface.text/debug/AnnotationPainter" value="false"/>
<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
<mapEntry key="org.eclipse.wst.sse.core/tasks" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
<mapEntry key="org.eclipse.equinox.preferences/set" value="false"/>
<mapEntry key="org.eclipse.core.resources/restore/snapshots" value="false"/>
<mapEntry key="org.eclipse.ui/perf/perspective.switch" value="800"/>
@@ -221,16 +221,16 @@
<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
<mapEntry key="org.eclipse.core.runtime/perf/success" value="false"/>
<mapEntry key="org.eclipse.net4j/debug.connector" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/perf/selection" value="300"/>
<mapEntry key="org.eclipse.wst.dtd.ui/projectionperf" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/perf/selection" value="300"/>
<mapEntry key="org.eclipse.osgi/debug/startlevel" value="false"/>
<mapEntry key="org.eclipse.ocl/debug/methods/entering" value="false"/>
<mapEntry key="org.eclipse.core.resources/restore" value="false"/>
<mapEntry key="org.eclipse.osgi/resolver/wiring" value="false"/>
<mapEntry key="org.eclipse.core.resources/perf/snapshot" value="1000"/>
<mapEntry key="org.eclipse.ui.intro/trace/logPerformance" value="false"/>
-<mapEntry key="org.eclipse.osgi/debug/loader" value="false"/>
<mapEntry key="org.eclipse.ui/trace/contexts.verbose" value="false"/>
+<mapEntry key="org.eclipse.osgi/debug/loader" value="false"/>
<mapEntry key="org.eclipse.osgi/resolver/grouping" value="false"/>
<mapEntry key="org.eclipse.wst.sse.ui/debug/reconcilerjob" value="false"/>
<mapEntry key="org.eclipse.jdt.ui/perf/explorer/makeActions" value="1000"/>
@@ -246,11 +246,11 @@
<mapEntry key="org.eclipse.emf.validation/debug/cache" value="false"/>
<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
<mapEntry key="org.eclipse.equinox.registry/debug/events" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
<mapEntry key="org.eclipse.help/debug/protocols" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save/metainfo" value="false"/>
<mapEntry key="org.eclipse.net4j.util/debug.lifecycle" value="true"/>
-<mapEntry key="org.eclipse.ui/perf/contentTypes" value="200"/>
<mapEntry key="org.eclipse.emf.validation/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/contentTypes" value="200"/>
<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser/inprocess" value="false"/>
<mapEntry key="org.eclipse.jdt.core/perf/javadeltalistener" value="500"/>
<mapEntry key="org.eclipse.core.resources/perf/listeners" value="500"/>
@@ -264,8 +264,8 @@
<mapEntry key="org.eclipse.wst.sse.ui/debug/reconcilerValidators" value="false"/>
<mapEntry key="org.eclipse.emf.validation/debug/xml" value="false"/>
<mapEntry key="org.eclipse.osgi/debug/manifest" value="false"/>
-<mapEntry key="org.eclipse.emf.cdo/debug" value="true"/>
<mapEntry key="org.eclipse.ui/trace/multipageeditor" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo/debug" value="true"/>
<mapEntry key="org.eclipse.emf.cdo.ui/debug" value="true"/>
<mapEntry key="org.eclipse.emf.workspace/debug/exceptions/catching" value="false"/>
<mapEntry key="org.eclipse.core.resources/build/needbuildstack" value="false"/>
@@ -281,23 +281,23 @@
<mapEntry key="org.eclipse.osgi/trace/classLoading" value="false"/>
<mapEntry key="org.eclipse.net4j.jms.server.jdbc/debug" value="true"/>
<mapEntry key="org.eclipse.wst.xml.ui/projectionperf" value="false"/>
-<mapEntry key="org.eclipse.core.resources/save" value="false"/>
<mapEntry key="org.eclipse.core.jobs/jobs/errorondeadlock" value="false"/>
+<mapEntry key="org.eclipse.core.resources/save" value="false"/>
<mapEntry key="org.eclipse.emf.transaction/debug/exceptions/throwing" value="false"/>
<mapEntry key="org.eclipse.core.resources/contenttype" value="false"/>
-<mapEntry key="org.eclipse.jface.text/debug/FastPartitioner/PositionCache" value="false"/>
<mapEntry key="org.eclipse.jem.util/debug/loglevel" value="WARNING"/>
+<mapEntry key="org.eclipse.jface.text/debug/FastPartitioner/PositionCache" value="false"/>
<mapEntry key="org.eclipse.emf.validation/debug/exceptions/catching" value="false"/>
-<mapEntry key="org.eclipse.emf.cdo.server/debug" value="true"/>
<mapEntry key="org.eclipse.jdt.core/debug/compiler" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.server/debug" value="true"/>
<mapEntry key="org.eclipse.osgi/debug/events" value="false"/>
<mapEntry key="org.eclipse.ui/trace/commands" value="false"/>
<mapEntry key="org.eclipse.equinox.preferences/get" value="false"/>
<mapEntry key="org.eclipse.wst.sse.ui/filemodelprovider/operations" value="false"/>
<mapEntry key="org.eclipse.jdt.ui/debug/ResultCollector" value="false"/>
<mapEntry key="org.eclipse.debug.ui/debug/launchhistory" value="false"/>
-<mapEntry key="org.eclipse.wst.sse.ui/extendededitoractionbuilder/contributetime" value="false"/>
<mapEntry key="org.eclipse.net4j.util/debug.om" value="true"/>
+<mapEntry key="org.eclipse.wst.sse.ui/extendededitoractionbuilder/contributetime" value="false"/>
<mapEntry key="org.eclipse.net4j.jms.server/debug" value="true"/>
<mapEntry key="org.eclipse.emf.workspace/debug/methods/entering" value="false"/>
<mapEntry key="org.eclipse.emf.query.ocl/debug/methods/entering" value="false"/>
@@ -309,8 +309,8 @@
<mapEntry key="org.eclipse.ui.intro/debug" value="true"/>
<mapEntry key="org.eclipse.emf.transaction/debug/locking" value="false"/>
<mapEntry key="org.eclipse.jdt.core/debug/cpresolution/advanced" value="false"/>
-<mapEntry key="org.eclipse.emf.validation/debug/providers" value="false"/>
<mapEntry key="org.eclipse.net4j.jms/debug" value="true"/>
+<mapEntry key="org.eclipse.emf.validation/debug/providers" value="false"/>
<mapEntry key="org.eclipse.osgi/eclipseadaptor/converter/debug" value="false"/>
<mapEntry key="org.eclipse.emf.cdo.server/debug.resource" value="true"/>
<mapEntry key="org.eclipse.pde.core/cache" value="false"/>
@@ -318,16 +318,16 @@
<mapEntry key="org.eclipse.wst.sse.ui/extendedconfigurationbuilder/time" value="false"/>
<mapEntry key="org.eclipse.wst.sse.core/tasks/time" value="false"/>
<mapEntry key="org.eclipse.emf.cdo/debug.transaction" value="true"/>
-<mapEntry key="org.eclipse.emf.query/debug/methods/exiting" value="false"/>
<mapEntry key="org.eclipse.wst.sse.ui/filemodelprovider/lifecyclelistener" value="false"/>
-<mapEntry key="org.eclipse.net4j/debug.selector" value="true"/>
+<mapEntry key="org.eclipse.emf.query/debug/methods/exiting" value="false"/>
<mapEntry key="org.eclipse.debug.core/debug/events" value="false"/>
+<mapEntry key="org.eclipse.net4j/debug.selector" value="true"/>
<mapEntry key="org.eclipse.jdt.ui/debug" value="true"/>
-<mapEntry key="org.eclipse.osgi/monitor/classes" value="false"/>
-<mapEntry key="org.eclipse.wst.sse.core/filebuffers/modelmanagement" value="false"/>
<mapEntry key="org.eclipse.net4j.db/debug.sql" value="true"/>
-<mapEntry key="org.eclipse.wst.sse.ui/debug/tracefilter" value=""/>
+<mapEntry key="org.eclipse.wst.sse.core/filebuffers/modelmanagement" value="false"/>
+<mapEntry key="org.eclipse.osgi/monitor/classes" value="false"/>
<mapEntry key="org.eclipse.ui/perf/part.input" value="200"/>
+<mapEntry key="org.eclipse.wst.sse.ui/debug/tracefilter" value=""/>
<mapEntry key="org.eclipse.wtp.common/debug/logtracefile" value="false"/>
<mapEntry key="org.eclipse.emf.query/debug" value="true"/>
<mapEntry key="org.eclipse.ui.intro.universal/debug" value="true"/>
@@ -343,11 +343,11 @@
<mapEntry key="org.eclipse.jdt.core.manipulation/debug" value="true"/>
<mapEntry key="org.eclipse.net4j.jms.admin/debug" value="true"/>
<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser" value="false"/>
<mapEntry key="org.eclipse.wst.common.project.facet.core/activation" value="false"/>
+<mapEntry key="org.eclipse.help.ui/debug/embeddedBrowser" value="false"/>
<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
-<mapEntry key="org.eclipse.ui/perf/part.create" value="800"/>
<mapEntry key="org.eclipse.core.resources/build/stacktrace" value="false"/>
+<mapEntry key="org.eclipse.ui/perf/part.create" value="800"/>
<mapEntry key="org.eclipse.ui.intro/trace/logInfo" value="true"/>
<mapEntry key="org.eclipse.team.core/streams" value="false"/>
<mapEntry key="org.eclipse.ui.ide/debug/undomonitor" value="false"/>
@@ -355,11 +355,11 @@
<mapEntry key="org.eclipse.ui/experimental/menus" value="false"/>
<mapEntry key="org.eclipse.core.jobs/jobs/shutdown" value="false"/>
<mapEntry key="org.eclipse.osgi/debug/packageadmin" value="false"/>
-<mapEntry key="org.eclipse.emf.cdo/debug.session" value="true"/>
<mapEntry key="org.eclipse.net4j.container.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.emf.cdo/debug.session" value="true"/>
<mapEntry key="org.eclipse.core.runtime/compatibility/debug" value="false"/>
-<mapEntry key="org.eclipse.wst.sse.ui/storagemodelprovider/operations" value="false"/>
<mapEntry key="org.eclipse.emf.cdo/debug.adapter" value="true"/>
+<mapEntry key="org.eclipse.wst.sse.ui/storagemodelprovider/operations" value="false"/>
<mapEntry key="org.eclipse.ui/debug/declaredImages" value="false"/>
<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
<mapEntry key="org.eclipse.ui.ide/debug/gc" value="false"/>
@@ -369,36 +369,36 @@
<mapEntry key="org.eclipse.net4j.db.mysql/debug.sql" value="true"/>
<mapEntry key="org.eclipse.ui.workbench/debug" value="false"/>
<mapEntry key="org.eclipse.jdt.ui/perf/content_assist/extensions" value="1000"/>
-<mapEntry key="org.eclipse.emf.cdo.protocol/debug.model" value="true"/>
<mapEntry key="org.eclipse.osgi/debug/filter" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.protocol/debug.model" value="true"/>
<mapEntry key="org.eclipse.debug.core/debug" value="false"/>
<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
<mapEntry key="org.eclipse.jem.util/debug/logtracefile" value="false"/>
<mapEntry key="org.eclipse.ui.browser/debug" value="false"/>
<mapEntry key="org.eclipse.osgi/profile/impl" value="org.eclipse.osgi.internal.profile.DefaultProfileLogger"/>
-<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
<mapEntry key="org.eclipse.net4j.jms.server/debug.protocol" value="true"/>
+<mapEntry key="org.eclipse.update.core/debug/web" value="false"/>
<mapEntry key="org.eclipse.team.cvs.core/debug" value="false"/>
<mapEntry key="org.eclipse.help/debug" value="true"/>
<mapEntry key="org.eclipse.core.runtime/perf" value="false"/>
<mapEntry key="org.eclipse.osgi/trace/filters" value="trace.properties"/>
-<mapEntry key="org.eclipse.wst.sse.core/dom/adapter/notification/time" value="false"/>
<mapEntry key="org.eclipse.emf.ocl/debug/methods/entering" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/dom/adapter/notification/time" value="false"/>
<mapEntry key="org.eclipse.net4j/debug.channel" value="true"/>
<mapEntry key="org.eclipse.emf.cdo/debug.revision" value="true"/>
<mapEntry key="org.eclipse.emf.cdo/debug.view" value="true"/>
<mapEntry key="org.eclipse.ui/perf/part.listeners" value="200"/>
<mapEntry key="org.eclipse.debug.ui/debug/viewers/viewer" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/keyBindings.verbose" value="false"/>
<mapEntry key="org.eclipse.wst.sse.core/dom/adapter/notification/time/criteria" value="10"/>
+<mapEntry key="org.eclipse.ui/trace/keyBindings.verbose" value="false"/>
<mapEntry key="org.eclipse.wst.common.environment/trace/data" value="true"/>
-<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
<mapEntry key="org.eclipse.osgi/defaultprofile/buffersize" value="256"/>
-<mapEntry key="org.eclipse.ui/perf/page.listeners" value="200"/>
+<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
-<mapEntry key="org.eclipse.emf.cdo.protocol/debug" value="true"/>
+<mapEntry key="org.eclipse.ui/perf/page.listeners" value="200"/>
<mapEntry key="org.eclipse.ocl/debug/exceptions/throwing" value="false"/>
+<mapEntry key="org.eclipse.emf.cdo.protocol/debug" value="true"/>
<mapEntry key="org.eclipse.emf.cdo/debug.resource" value="true"/>
<mapEntry key="org.eclipse.wst.sse.core/debug" value="true"/>
<mapEntry key="org.eclipse.ui/trace/handlers.verbose" value="false"/>
@@ -418,16 +418,16 @@
<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
<mapEntry key="org.eclipse.osgi/resolver/cycles" value="false"/>
<mapEntry key="org.eclipse.ui/listeners/IWorkbenchWindow.IPartListener" value="false"/>
-<mapEntry key="org.eclipse.wst.sse.core/structuredmodel/locks" value="true"/>
<mapEntry key="org.eclipse.wst.sse.core/filebuffers/lifecycle" value="false"/>
+<mapEntry key="org.eclipse.wst.sse.core/structuredmodel/locks" value="true"/>
<mapEntry key="org.eclipse.jdt.core/debug/resolution" value="false"/>
<mapEntry key="org.eclipse.wst.common.environment/debug" value="true"/>
<mapEntry key="org.eclipse.update.configurator/debug" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug/viewers/deltas" value="false"/>
<mapEntry key="org.eclipse.help.ui/debug" value="true"/>
+<mapEntry key="org.eclipse.debug.ui/debug/viewers/deltas" value="false"/>
<mapEntry key="org.eclipse.emf.query.ocl/debug/methods/exiting" value="false"/>
-<mapEntry key="org.eclipse.ocl/debug/methods/exiting" value="false"/>
<mapEntry key="org.eclipse.osgi/eclipseadaptor/debug/location" value="false"/>
+<mapEntry key="org.eclipse.ocl/debug/methods/exiting" value="false"/>
<mapEntry key="org.eclipse.wst.sse.ui/debug/reconcilerSpelling" value="false"/>
<mapEntry key="org.eclipse.emf.transaction/debug/methods/entering" value="false"/>
<mapEntry key="org.eclipse.ui.intro.universal/trace/logInfo" value="true"/>
diff --git a/plugins/org.eclipse.net4j.util/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.util/META-INF/MANIFEST.MF
index c404db0..cdab0f2 100644
--- a/plugins/org.eclipse.net4j.util/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.util/META-INF/MANIFEST.MF
@@ -6,8 +6,7 @@ Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Activator: org.eclipse.net4j.internal.util.bundle.OM$Activator
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.eclipse.core.runtime;resolution:=optional,
- org.eclipse.osgi.service.debug;version="1.0.0";resolution:=optional,
+Import-Package: org.eclipse.osgi.service.debug;version="1.0.0";resolution:=optional,
org.osgi.framework;version="1.3.0";resolution:=optional,
org.osgi.service.log;version="1.3.0";resolution:=optional,
org.osgi.util.tracker;version="1.3.0";resolution:=optional
@@ -41,3 +40,4 @@ Export-Package: org.eclipse.net4j.internal.util.collection;version="0.8.0",
org.eclipse.net4j.util.registry;version="0.8.0",
org.eclipse.net4j.util.transaction;version="0.8.0"
Eclipse-LazyStart: true
+Require-Bundle: org.eclipse.core.runtime;resolution:=optional
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/EclipseSubMonitor.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/EclipseSubMonitor.java
deleted file mode 100644
index 991bf56..0000000
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/EclipseSubMonitor.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.net4j.internal.util.om.monitor;
-
-import org.eclipse.net4j.util.om.monitor.IEclipseMonitor;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-
-/**
- * @author Eike Stepper
- */
-public final class EclipseSubMonitor extends SubMonitor implements IEclipseMonitor
-{
- private IProgressMonitor progressMonitor;
-
- public EclipseSubMonitor(Monitor parent, int workFromParent)
- {
- super(parent, workFromParent);
- progressMonitor = new SubProgressMonitor(((IEclipseMonitor)parent).getProgressMonitor(), workFromParent);
- }
-
- public IProgressMonitor getProgressMonitor()
- {
- return progressMonitor;
- }
-
- @Override
- public SubMonitor newSubMonitor(int workFromParent)
- {
- return new EclipseSubMonitor(this, workFromParent);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/LegacySubMonitor.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/LegacySubMonitor.java
deleted file mode 100644
index b7cd3b5..0000000
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/LegacySubMonitor.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.eclipse.net4j.internal.util.om.monitor;
-
-/**
- * @author Eike Stepper
- */
-public final class LegacySubMonitor extends SubMonitor
-{
- public LegacySubMonitor(Monitor parent, int workFromParent)
- {
- super(parent, workFromParent);
- }
-
- @Override
- public SubMonitor newSubMonitor(int workFromParent)
- {
- return new LegacySubMonitor(this, workFromParent);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/RootMonitor.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/LegacyTest.java
index 6e00037..40a7135 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/RootMonitor.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/LegacyTest.java
@@ -10,12 +10,17 @@
**************************************************************************/
package org.eclipse.net4j.internal.util.om.monitor;
+import org.eclipse.net4j.util.om.monitor.LegacyMonitor;
+
/**
* @author Eike Stepper
*/
-public abstract class RootMonitor extends Monitor
+public class LegacyTest extends MonitorTest
{
- public RootMonitor()
+ public static void main(String[] args)
{
+ LegacyMonitor.startMonitoring();
+ readClasses();
+ LegacyMonitor.stopMonitoring();
}
}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/Monitor.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/Monitor.java
index 929afea..0e8fe21 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/Monitor.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/Monitor.java
@@ -9,22 +9,38 @@ public abstract class Monitor
{
private static final int UNINITIALIZED = 0;
+ private Monitor parent;
+
+ private int workFromParent;
+
private int totalWork = UNINITIALIZED;
private int work;
private String task;
- public Monitor()
+ public Monitor(Monitor parent, int workFromParent)
+ {
+ this.parent = parent;
+ this.workFromParent = workFromParent;
+ }
+
+ public Monitor getParent()
+ {
+ return parent;
+ }
+
+ public int getWorkFromParent()
{
+ return workFromParent;
}
- public final String getTask()
+ public String getTask()
{
return task;
}
- public final void setTask(String task, int level)
+ public void setTask(String task, int level)
{
this.task = task;
message(task, level);
@@ -68,7 +84,22 @@ public abstract class Monitor
}
}
- public abstract void message(String msg, int level);
+ public void message(String msg, int level)
+ {
+ if (parent != null)
+ {
+ parent.message(msg, level + 1);
+ }
+ else
+ {
+ for (int i = 0; i < level; i++)
+ {
+ System.out.print(" ");
+ }
+
+ System.out.println(msg);
+ }
+ }
- public abstract SubMonitor newSubMonitor(int workFromParent);
+ public abstract Monitor subMonitor(int workFromParent);
} \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/LegacyTest.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/MonitorTest.java
index 6c6e05d..b8b8b0a 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/LegacyTest.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/MonitorTest.java
@@ -8,28 +8,23 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.net4j.util.om.monitor;
+package org.eclipse.net4j.internal.util.om.monitor;
+
+import org.eclipse.net4j.util.om.monitor.MONITOR;
/**
* @author Eike Stepper
*/
-public class LegacyTest
+public abstract class MonitorTest
{
private static final String[] CLASSES = { "A", "B", "C", "D", "E" };
private static final String[] FIELDS = { "x", "y", "z" };
- public static void main(String[] args)
- {
- LegacyMonitor.startMonitoring();
- readClasses();
- LegacyMonitor.stopMonitoring();
- }
-
/**
* Supports {@link MONITOR progress monitoring}.
*/
- private static void readClasses()
+ public static void readClasses()
{
int num = CLASSES.length;
MONITOR.begin(2 * num, "Reading " + num + " classes");
@@ -52,7 +47,7 @@ public class LegacyTest
/**
* Supports {@link MONITOR progress monitoring}.
*/
- private static void readFields()
+ public static void readFields()
{
int num = FIELDS.length;
MONITOR.begin(num, "Reading " + num + " fields");
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/SubMonitor.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/SubMonitor.java
deleted file mode 100644
index 75d395a..0000000
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/SubMonitor.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.eclipse.net4j.internal.util.om.monitor;
-
-/**
- * @author Eike Stepper
- */
-public abstract class SubMonitor extends Monitor
-{
- private Monitor parent;
-
- private int workFromParent;
-
- public SubMonitor(Monitor parent, int workFromParent)
- {
- this.parent = parent;
- this.workFromParent = workFromParent;
- }
-
- public Monitor getParent()
- {
- return parent;
- }
-
- public int getWorkFromParent()
- {
- return workFromParent;
- }
-
- @Override
- public void message(String msg, int level)
- {
- parent.message(msg, level + 1);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/EclipseMonitor.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/EclipseMonitor.java
index 0a652d7..757f475 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/EclipseMonitor.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/EclipseMonitor.java
@@ -10,21 +10,27 @@
**************************************************************************/
package org.eclipse.net4j.util.om.monitor;
-import org.eclipse.net4j.internal.util.om.monitor.EclipseSubMonitor;
-import org.eclipse.net4j.internal.util.om.monitor.RootMonitor;
-import org.eclipse.net4j.internal.util.om.monitor.SubMonitor;
+import org.eclipse.net4j.internal.util.om.monitor.Monitor;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
/**
* @author Eike Stepper
*/
-public final class EclipseMonitor extends RootMonitor
+public final class EclipseMonitor extends Monitor
{
private IProgressMonitor progressMonitor;
+ private EclipseMonitor(EclipseMonitor parent, int workFromParent)
+ {
+ super(parent, workFromParent);
+ progressMonitor = new SubProgressMonitor(parent.getProgressMonitor(), workFromParent);
+ }
+
private EclipseMonitor(IProgressMonitor progressMonitor)
{
+ super(null, 0);
this.progressMonitor = progressMonitor;
}
@@ -34,20 +40,41 @@ public final class EclipseMonitor extends RootMonitor
}
@Override
- public SubMonitor newSubMonitor(int workFromParent)
+ public void begin(int totalWork, String task, int level)
{
- return new EclipseSubMonitor(this, workFromParent);
+ super.begin(totalWork, task, level);
+ progressMonitor.beginTask(task == null ? "" : task, totalWork);
}
@Override
public void message(String msg, int level)
{
- for (int i = 0; i < level; i++)
+ super.message(msg, level);
+ progressMonitor.subTask(msg);
+ }
+
+ @Override
+ public void setTask(String task, int level)
+ {
+ super.setTask(task, level);
+ progressMonitor.setTaskName(task);
+ }
+
+ @Override
+ public void worked(int work, String msg, int level)
+ {
+ super.worked(work, msg, level);
+ progressMonitor.worked(work);
+ if (msg != null)
{
- System.out.print(" ");
+ progressMonitor.subTask(msg);
}
+ }
- System.out.println(msg);
+ @Override
+ public EclipseMonitor subMonitor(int workFromParent)
+ {
+ return new EclipseMonitor(this, workFromParent);
}
public static void startMonitoring(IProgressMonitor progressMonitor)
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/IEclipseMonitor.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/IEclipseMonitor.java
deleted file mode 100644
index fb0e69e..0000000
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/IEclipseMonitor.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.util.om.monitor;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * @author Eike Stepper
- */
-public interface IEclipseMonitor
-{
- public IProgressMonitor getProgressMonitor();
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/LegacyMonitor.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/LegacyMonitor.java
index d9091ad..769b872 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/LegacyMonitor.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/LegacyMonitor.java
@@ -10,34 +10,27 @@
**************************************************************************/
package org.eclipse.net4j.util.om.monitor;
-import org.eclipse.net4j.internal.util.om.monitor.LegacySubMonitor;
-import org.eclipse.net4j.internal.util.om.monitor.RootMonitor;
-import org.eclipse.net4j.internal.util.om.monitor.SubMonitor;
+import org.eclipse.net4j.internal.util.om.monitor.Monitor;
/**
* @author Eike Stepper
*/
-public final class LegacyMonitor extends RootMonitor
+public final class LegacyMonitor extends Monitor
{
- private LegacyMonitor()
+ private LegacyMonitor(LegacyMonitor parent, int workFromParent)
{
+ super(parent, workFromParent);
}
- @Override
- public SubMonitor newSubMonitor(int workFromParent)
+ private LegacyMonitor()
{
- return new LegacySubMonitor(this, workFromParent);
+ super(null, 0);
}
@Override
- public void message(String msg, int level)
+ public LegacyMonitor subMonitor(int workFromParent)
{
- for (int i = 0; i < level; i++)
- {
- System.out.print(" ");
- }
-
- System.out.println(msg);
+ return new LegacyMonitor(this, workFromParent);
}
public static void startMonitoring()
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/MONITOR.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/MONITOR.java
index 62d1a34..ae9fdb7 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/MONITOR.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/MONITOR.java
@@ -11,8 +11,6 @@
package org.eclipse.net4j.util.om.monitor;
import org.eclipse.net4j.internal.util.om.monitor.Monitor;
-import org.eclipse.net4j.internal.util.om.monitor.RootMonitor;
-import org.eclipse.net4j.internal.util.om.monitor.SubMonitor;
/**
* @author Eike Stepper
@@ -99,7 +97,7 @@ public final class MONITOR
return;
}
- SubMonitor subMonitor = monitor.newSubMonitor(workFromParent);
+ Monitor subMonitor = monitor.subMonitor(workFromParent);
CURRENT.set(subMonitor);
try
@@ -132,7 +130,7 @@ public final class MONITOR
}
}
- static void startMonitoring(RootMonitor rootMonitor)
+ static void startMonitoring(Monitor rootMonitor)
{
Monitor monitor = CURRENT.get();
if (monitor != null)
@@ -151,7 +149,7 @@ public final class MONITOR
throw new IllegalStateException("Monitoring has not been started");
}
- if (!(monitor instanceof RootMonitor))
+ if (monitor.getParent() != null)
{
throw new IllegalStateException("Illegal monitor nesting");
}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/MonitoredJob.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/MonitoredJob.java
new file mode 100644
index 0000000..f6d42a5
--- /dev/null
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/MonitoredJob.java
@@ -0,0 +1,52 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2007 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.net4j.util.om.monitor;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+
+/**
+ * @author Eike Stepper
+ */
+public abstract class MonitoredJob extends Job
+{
+ private String bundleID;
+
+ public MonitoredJob(String bundleID, String name)
+ {
+ super(name);
+ this.bundleID = bundleID;
+ }
+
+ @Override
+ protected final IStatus run(IProgressMonitor monitor)
+ {
+ EclipseMonitor.startMonitoring(monitor);
+
+ try
+ {
+ run();
+ return Status.OK_STATUS;
+ }
+ catch (Exception ex)
+ {
+ return new Status(IStatus.ERROR, bundleID, ex.getMessage(), ex);
+ }
+ finally
+ {
+ EclipseMonitor.stopMonitoring();
+ }
+ }
+
+ protected abstract void run() throws Exception;
+}