Is it possible to enable task tags like //TODO
and //FIXME
for html files in Eclipse? I've already checked in Eclipse's settings and there is no "Task Tags" section for HTML files. The issue is that I'm not really using these task tags in the html itself; they're in blocks of javascript inside the html files. It would be nice to somehow capture them even though they reside in an html file.
Is it possible to enable task tags like //TODO
and //FIXME
for html files in Eclipse? I've already checked in Eclipse's settings and there is no "Task Tags" section for HTML files. The issue is that I'm not really using these task tags in the html itself; they're in blocks of javascript inside the html files. It would be nice to somehow capture them even though they reside in an html file.
1 Answer
Reset to default 5Unfortunately Eclipse is not able to recognize Task Tags for JavaScript embedded in HTML. You can however use HTML ments to add Task Tags around the blocks of JavaScript. For example:
<!DOCTYPE html>
<html>
<head>
<!-- TODO: Add meta tags and page title here. -->
</head>
<body>
<h1>Title</h1>
<!-- FIXME: There might be a semicolon missing in this code. -->
<script type="text/javascript">
// TODO: This ment will not be added to Task Tags in Eclipse.
var i = 0
</script>
</body>
</html>
Would result in the following descriptions appearing in your Tasks view:
TODO: Add meta tags and page title here.
FIXME: There might be a semicolon missing in this code.
To enable Task Tags in Eclipse go to Preferences > General > Editors > Structured Text Editors > Task Tags.
(Eclipse Java EE IDE for Web Developers. Version: Indigo Service Release 1 Build id: 20110916-0149)
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745359689a4624301.html
评论列表(0条)