Eclipse: task tags in javascript blocks inside html files - Stack Overflow

Is it possible to enable task tags like TODO and FIXME for html files in Eclipse? I've already

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.

Share Improve this question asked Jun 19, 2011 at 21:43 AaronAaron 10.9k13 gold badges41 silver badges53 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

Unfortunately 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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信