summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-31 07:58:29 (EDT)
committerEike Stepper2007-07-31 07:58:29 (EDT)
commitb6e345c9a16400ba4a74d8215d453536e95afdb7 (patch)
tree17886a06a7f94a46df368dd9d9d72f0b125f7cac
parent03826566585a2727fdb4979d96480f5f99232ee5 (diff)
downloadcdo-b6e345c9a16400ba4a74d8215d453536e95afdb7.zip
cdo-b6e345c9a16400ba4a74d8215d453536e95afdb7.tar.gz
cdo-b6e345c9a16400ba4a74d8215d453536e95afdb7.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/LogDialog.java2
-rw-r--r--plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/MonitorDialog.java5
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/Monitor.java45
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/MonitorUtil.java8
4 files changed, 36 insertions, 24 deletions
diff --git a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/LogDialog.java b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/LogDialog.java
index 75c446c..d603366 100644
--- a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/LogDialog.java
+++ b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/LogDialog.java
@@ -62,7 +62,7 @@ public class LogDialog extends BaseDialog
composite.setLayout(grid);
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- font = new Font(getShell().getDisplay(), "Courier", 8, SWT.NORMAL);
+ font = new Font(getShell().getDisplay(), "Courier", 5, SWT.NORMAL);
text = new Text(composite, SWT.MULTI | SWT.READ_ONLY | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
diff --git a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/MonitorDialog.java b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/MonitorDialog.java
index 6be3f2d..1c5e8d1 100644
--- a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/MonitorDialog.java
+++ b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/MonitorDialog.java
@@ -43,11 +43,6 @@ public class MonitorDialog extends ProgressMonitorDialog
{
public void handleMessage(String msg, int level)
{
- // for (int i = 0; i < level; i++)
- // {
- // log.append(" ");
- // }
-
log.append(msg);
log.append("\n");
}
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 8c2e1b8..f64fcb8 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
@@ -68,6 +68,7 @@ public abstract class Monitor implements OMMonitor, OMSubMonitor
public void setTask(String task)
{
this.task = task;
+ taskChanged(task, 0);
}
public int getTotalWork()
@@ -230,6 +231,18 @@ public abstract class Monitor implements OMMonitor, OMSubMonitor
{
}
+ protected void taskChanged(String task, int level)
+ {
+ if (parent != null)
+ {
+ parent.taskChanged(task, level + 1);
+ }
+ else
+ {
+ trace(task, level);
+ }
+ }
+
protected void message(String msg, int level)
{
if (parent != null)
@@ -238,24 +251,28 @@ public abstract class Monitor implements OMMonitor, OMSubMonitor
}
else
{
+ trace(msg, level);
+ }
+ }
- if (TRACER.isEnabled())
+ protected void trace(String msg, int level)
+ {
+ if (TRACER.isEnabled())
+ {
+ if (level == 0)
{
- if (level == 0)
- {
- TRACER.trace(msg);
- }
- else
+ TRACER.trace(msg);
+ }
+ else
+ {
+ StringBuilder builder = new StringBuilder();
+ for (int i = 0; i < level; i++)
{
- StringBuilder builder = new StringBuilder();
- for (int i = 0; i < level; i++)
- {
- builder.append(" ");
- }
-
- builder.append(msg);
- TRACER.trace(builder.toString());
+ builder.append(" ");
}
+
+ builder.append(msg);
+ TRACER.trace(builder.toString());
}
}
}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/MonitorUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/MonitorUtil.java
index bba88c0..25c0a87 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/MonitorUtil.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/monitor/MonitorUtil.java
@@ -71,9 +71,9 @@ public final class MonitorUtil
MON.startMonitoring(new EclipseMonitor(progressMonitor)
{
@Override
- protected void message(String msg, int level)
+ protected void trace(String msg, int level)
{
- super.message(msg, level);
+ super.trace(msg, level);
handleMessage(messageHandler, msg, level);
}
});
@@ -100,9 +100,9 @@ public final class MonitorUtil
MON.startMonitoring(new LegacyMonitor()
{
@Override
- protected void message(String msg, int level)
+ protected void trace(String msg, int level)
{
- super.message(msg, level);
+ super.trace(msg, level);
handleMessage(messageHandler, msg, level);
}
});