Author: mareshkau
Date: 2008-11-03 10:32:57 -0500 (Mon, 03 Nov 2008)
New Revision: 11490
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/messages.properties
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/xpl/WebUIMessages.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeTaglibValidator.java
Log:
JBIDE-2979, validation for prefix was added
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/messages.properties
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/messages.properties 2008-11-03
14:43:50 UTC (rev 11489)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/messages.properties 2008-11-03
15:32:57 UTC (rev 11490)
@@ -170,3 +170,4 @@
CONTEXT_ROOT_CANNOT_CONTAIN_CHARACTER=Context root cannot contain character {0}.
WEB_RESOURCES=Web Resources
INCORRECT_URI=Incorrect URI: {0}
+INCORRECT_PREFIX=Incorrect Prefix: {0}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/xpl/WebUIMessages.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/xpl/WebUIMessages.java 2008-11-03
14:43:50 UTC (rev 11489)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/xpl/WebUIMessages.java 2008-11-03
15:32:57 UTC (rev 11490)
@@ -188,4 +188,5 @@
public static String CONTEXT_ROOT_CANNOT_CONTAIN_CHARACTER;
public static String WEB_RESOURCES;
public static String INCORRECT_URI;
+ public static String INCORRECT_PREFIX;
}
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeTaglibValidator.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeTaglibValidator.java 2008-11-03
14:43:50 UTC (rev 11489)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeTaglibValidator.java 2008-11-03
15:32:57 UTC (rev 11490)
@@ -44,10 +44,18 @@
return;
}
String uriStr = (String) data.get("location"); //$NON-NLS-1$
+ String prefix = (String) data.get("prefix");//$NON-NLS-1$
+ String nameStrt = "[A-Za-z_]|[^\\x00-\\x7F]"; //$NON-NLS-1$
+ String nameChar = "[A-Za-z0-9_.-]|[^\\x00-\\x7F]"; //$NON-NLS-1$
+ String name = '(' + nameStrt + ')'+'(' + nameChar +
")*"; //$NON-NLS-1$
+
try {
new URI(uriStr);
}catch (URISyntaxException ex) {
message = NLS.bind(WebUIMessages.INCORRECT_URI,uriStr);
}
+ if((prefix!=null)&&(!prefix.matches(name))){
+ message = NLS.bind(WebUIMessages.INCORRECT_PREFIX,prefix);
+ }
}
}
Show replies by date