summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2006-06-01 08:49:09 (EDT)
committerpelder2006-06-01 08:49:09 (EDT)
commit11ac38e9db82e5b4325738a1cfcaca9635724225 (patch)
tree8d7f458308fc51197a1f3421af3929668203d95d
parentaf73f4910d881feecac30c0b825779f5ec3b2bfa (diff)
downloadorg.eclipse.jet-11ac38e9db82e5b4325738a1cfcaca9635724225.zip
org.eclipse.jet-11ac38e9db82e5b4325738a1cfcaca9635724225.tar.gz
org.eclipse.jet-11ac38e9db82e5b4325738a1cfcaca9635724225.tar.bz2
[144515] Warn on unsupported "classic" JET directives.
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/ASTCompilerParseListener.java7
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/Problem.java5
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.java2
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/internal/l10n/JET2Messages.properties1
4 files changed, 15 insertions, 0 deletions
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/ASTCompilerParseListener.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/ASTCompilerParseListener.java
index 4b2e803..70c660e 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/ASTCompilerParseListener.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/ASTCompilerParseListener.java
@@ -219,6 +219,10 @@ class ASTCompilerParseListener implements JETParseEventListener2
else if(JET__DIRECTIVE.equalsIgnoreCase(directive))
{
handleJetDirective(start, stop, attributes);
+ } else {
+ recordProblem(ParseProblemSeverity.WARNING, Problem.UnsupportedDirective,
+ JET2Messages.ASTCompilerParseListener_UnsupportedDirective,
+ new Object[] {directive}, start.getCursor(), stop.getCursor(), start.getLine(), start.getCol() );
}
}
@@ -627,6 +631,9 @@ class ASTCompilerParseListener implements JETParseEventListener2
JETParser.Directive directive = new JETParser.Directive();
directive.getDirectives().add("jet"); //$NON-NLS-1$
directive.getDirectives().add("taglib"); //$NON-NLS-1$
+ directive.getDirectives().add("include"); //$NON-NLS-1$
+ directive.getDirectives().add("start"); //$NON-NLS-1$
+ directive.getDirectives().add("end"); //$NON-NLS-1$
JETCoreElement[] coreElements = new JETCoreElement []{
directive,
new JETParser.Expression(),
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/Problem.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/Problem.java
index aabc72e..cfe7bb4 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/Problem.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/compiler/Problem.java
@@ -105,6 +105,11 @@ public class Problem
*/
public static final int DeprecatedTag = 14;
+ /**
+ * Unsupported Directive.
+ */
+ public static final int UnsupportedDirective = 15;
+
private final String originatingFileName;
private final int id;
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 739690a..5a71371 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
@@ -45,6 +45,8 @@ public class JET2Messages extends NLS
public static String AnyTag_MutuallyExclusiveAttributes;
+ public static String ASTCompilerParseListener_UnsupportedDirective;
+
public static String JavaActionsUtil_CannotFindSourceFolder;
public static String JavaActionsUtil_InvalidSourceFolder;
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 d3eda2c..142f5b7 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
@@ -153,3 +153,4 @@ TransformContextExtender_NeedsRebuildForOverride=Transform {0} needs to be rebui
ReplaceStringsTag_BadList=Error parsing comma-separated list of strings:
ReplaceStringsTag_ListsNotSameLength='Replace' list and 'With' list have different lengths.
ReplaceStringsTag_EmptyList='Replace' list contains empty strings.
+ASTCompilerParseListener_UnsupportedDirective=Unsupported directive ''{0}''