summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-31 09:39:14 (EDT)
committerEike Stepper2007-07-31 09:39:14 (EDT)
commit14385d949eabc066e831e551f16d31e249dd42d0 (patch)
treed98f1692dd5d2f3a5d1a731670fb08c18f40d9e8
parente9f926b24eb65b918ad165518752ed83a8620a2f (diff)
downloadcdo-14385d949eabc066e831e551f16d31e249dd42d0.zip
cdo-14385d949eabc066e831e551f16d31e249dd42d0.tar.gz
cdo-14385d949eabc066e831e551f16d31e249dd42d0.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/MonitorDialog.java19
-rw-r--r--plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/MonitorLogDialog.java26
2 files changed, 25 insertions, 20 deletions
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 a2de8f0..69f6d41 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
@@ -54,23 +54,8 @@ public class MonitorDialog extends ProgressMonitorDialog
{
try
{
- log = new MonitorLogDialog(getShell(), getShellStyle(), "Log of " + title, "See the log for details.", settings)
- {
- @Override
- public void handleMessage(String msg, int level)
- {
- if (msg.startsWith("Woven class "))
- {
- setTextStyle(getRed());
- append(msg);
- append("\n");
- }
- else
- {
- super.handleMessage(msg, level);
- }
- }
- };
+ log = new MonitorLogDialog(getShell(), getShellStyle(), "Log of " + title, "See the log for details.", settings);
+ log.setEmphasizePrefix("Woven class ");
super.run(fork, cancelable, new IRunnableWithProgress()
{
diff --git a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/MonitorLogDialog.java b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/MonitorLogDialog.java
index e766013..7452862 100644
--- a/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/MonitorLogDialog.java
+++ b/plugins/org.eclipse.net4j.ui/src/org/eclipse/net4j/ui/widgets/MonitorLogDialog.java
@@ -13,6 +13,8 @@ import org.eclipse.swt.widgets.Shell;
*/
public class MonitorLogDialog extends LogDialog implements OMMonitorHandler
{
+ private String emphasizePrefix;
+
private TextStyle normal;
private TextStyle blue;
@@ -24,8 +26,8 @@ public class MonitorLogDialog extends LogDialog implements OMMonitorHandler
super(parentShell, shellStyle, title, message, settings);
Display display = Display.getCurrent();
normal = new TextStyle(null, display.getSystemColor(SWT.COLOR_DARK_GRAY), null);
- blue = new TextStyle(null, display.getSystemColor(SWT.COLOR_DARK_BLUE), null);
- red = new TextStyle(null, display.getSystemColor(SWT.COLOR_DARK_RED), null);
+ blue = new TextStyle(null, display.getSystemColor(SWT.COLOR_BLUE), null);
+ red = new TextStyle(null, display.getSystemColor(SWT.COLOR_RED), null);
}
public MonitorLogDialog(Shell parentShell, String title, String message, IDialogSettings settings)
@@ -33,6 +35,16 @@ public class MonitorLogDialog extends LogDialog implements OMMonitorHandler
this(parentShell, DEFAULT_SHELL_STYLE, title, message, settings);
}
+ public String getEmphasizePrefix()
+ {
+ return emphasizePrefix;
+ }
+
+ public void setEmphasizePrefix(String emphasizePrefix)
+ {
+ this.emphasizePrefix = emphasizePrefix;
+ }
+
public TextStyle getNormal()
{
return normal;
@@ -57,7 +69,15 @@ public class MonitorLogDialog extends LogDialog implements OMMonitorHandler
public void handleMessage(String msg, int level)
{
- setTextStyle(normal);
+ if (msg.startsWith(emphasizePrefix))
+ {
+ setTextStyle(red);
+ }
+ else
+ {
+ setTextStyle(normal);
+ }
+
append(msg);
append("\n");
}