summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2006-05-29 12:39:48 (EDT)
committerpelder2006-05-29 12:39:48 (EDT)
commit30a1635c59d98840c19b2a22c016bdec7f2c2654 (patch)
tree5a7cd4847871082f7b7256c7e762983ab6697155
parent8c9692195355ca541c357bcadc2686ee948d1666 (diff)
downloadorg.eclipse.jet-30a1635c59d98840c19b2a22c016bdec7f2c2654.zip
org.eclipse.jet-30a1635c59d98840c19b2a22c016bdec7f2c2654.tar.gz
org.eclipse.jet-30a1635c59d98840c19b2a22c016bdec7f2c2654.tar.bz2
[144237] Add Error, Warning, Trace and Debug prefixes to messages in JET execution console view.
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java8
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties4
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/launch/JETStreamMonitor.java23
3 files changed, 34 insertions, 1 deletions
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java
index 121a690..739690a 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java
@@ -65,6 +65,14 @@ public class JET2Messages extends NLS
public static String JET2Context_InvalidVariableName;
+ public static String JETStreamMonitor_Debug;
+
+ public static String JETStreamMonitor_Error;
+
+ public static String JETStreamMonitor_Trace;
+
+ public static String JETStreamMonitor_Warning;
+
public static String LoaderManager_CouldNotFindLoader;
public static String LoaderManager_MultipleLoaders;
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties
index e4cf288..d3eda2c 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties
@@ -18,8 +18,12 @@ JET2Builder_CompilingChanged=Compiling changed JET templates in {0}
JET2Context_VariableNotFound=Variable is not defined: {0}
JET2Builder_Compiling=Compiling: {0}
JET2Platform_Executing=Executing
+JETStreamMonitor_Error=Error
+JETStreamMonitor_Trace=Trace
+JETStreamMonitor_Debug=Debug
JET2Builder_Cleaning=Cleaning derived resources: {0}
JET2Builder_CompilingAll=Compiling JET templates in {0}
+JETStreamMonitor_Warning=Warning
JET2BundleBuildTool_CreatingJar=Creating bundle jar file
JET2BundleBuildTool_CreatingBundle=Creating JET Transform Bundle
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/launch/JETStreamMonitor.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/launch/JETStreamMonitor.java
index c3aec43..df2fcc8 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/launch/JETStreamMonitor.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/internal/launch/JETStreamMonitor.java
@@ -23,6 +23,7 @@ import java.util.List;
import org.eclipse.debug.core.IStreamListener;
import org.eclipse.debug.core.model.IStreamMonitor;
import org.eclipse.jet.JET2Context;
+import org.eclipse.jet.internal.l10n.JET2Messages;
import org.eclipse.jet.internal.runtime.RuntimeLoggerContextExtender;
import org.eclipse.jet.internal.runtime.RuntimeTagLogger;
import org.eclipse.jet.taglib.TagInfo;
@@ -77,7 +78,27 @@ public class JETStreamMonitor implements IStreamMonitor, RuntimeTagLogger
{
return;
}
- String formattedMsg = formatMessage(message, td, templatePath);
+
+ String msgPrefix = ""; //$NON-NLS-1$
+ switch(level)
+ {
+ case RuntimeLoggerContextExtender.ERROR_LEVEL:
+ msgPrefix = JET2Messages.JETStreamMonitor_Error + ": "; //$NON-NLS-1$
+ break;
+ case RuntimeLoggerContextExtender.WARNING_LEVEL:
+ msgPrefix = JET2Messages.JETStreamMonitor_Warning + ": "; //$NON-NLS-1$
+ break;
+ case RuntimeLoggerContextExtender.INFO_LEVEL:
+ // no prefix for info messages
+ break;
+ case RuntimeLoggerContextExtender.TRACE_LEVEL:
+ msgPrefix = JET2Messages.JETStreamMonitor_Trace + ": "; //$NON-NLS-1$
+ break;
+ case RuntimeLoggerContextExtender.DEBUG_LEVEL:
+ msgPrefix = JET2Messages.JETStreamMonitor_Debug + ": "; //$NON-NLS-1$
+ break;
+ }
+ String formattedMsg = formatMessage(msgPrefix + message, td, templatePath);
for (Iterator i = listeners.iterator(); i.hasNext();)
{