IDEA-37004 TLD: tag/body-content value could be supported

This commit is contained in:
Dmitry Avdeev
2014-10-29 16:48:25 +03:00
parent bf3ef3eb09
commit a2d9e4fe33
2 changed files with 20 additions and 2 deletions
@@ -21,4 +21,22 @@ import com.intellij.xml.XmlElementDescriptor;
* @author Maxim.Mossienko
*/
public interface JspElementDescriptor extends XmlElementDescriptor {
/**
* The body of the tag contains nested JSP syntax.
* @see #getContentType()
*/
int CONTENT_TYPE_JSP = CONTENT_TYPE_MIXED;
/**
* The body accepts only template text, EL Expressions, and JSP action elements.
* No scripting elements are allowed.
*/
int CONTENT_TYPE_SCRIPTLESS = 101;
/**
* The body of the tag is interpreted by the tag implementation itself,
* and is most likely in a different "language", e.g embedded SQL statements.
*/
int CONTENT_TYPE_TAG_DEPENDENT = 102;
}
@@ -59,7 +59,7 @@ public class CheckTagEmptyBodyInspection extends XmlSuppressableInspectionTool {
if (node != null &&
node.getElementType() == XmlTokenType.XML_END_TAG_START) {
final LocalQuickFix localQuickFix = new ReplaceEmptyTagBodyByEmptyEndFix();
final LocalQuickFix localQuickFix = new Fix();
holder.registerProblem(
tag,
XmlBundle.message("xml.inspections.tag.empty.body"),
@@ -98,7 +98,7 @@ public class CheckTagEmptyBodyInspection extends XmlSuppressableInspectionTool {
return "CheckTagEmptyBody";
}
private static class ReplaceEmptyTagBodyByEmptyEndFix implements LocalQuickFix {
public static class Fix implements LocalQuickFix {
@Override
@NotNull
public String getName() {