AnsweredAssumed Answered

Import another js file to webscript and autoformat code issue in eclipse.

Question asked by sunquanbin on May 19, 2014
Latest reply on May 21, 2014 by sunquanbin
Hi everyone,

In webscript js handler, we can import another js file via:

<import resource="classpath:/alfresco/extension/templates/webscripts/org/alfresco/eLab/parse-args.lib.js">

It works fine but the only issue is I cannot use the "Auto Format Code" feature in Eclipse because that <import> is not recognised by Eclipse.

It's quite annoying to me as I currently have to comment out that line and do the auto format and then un-comment.

In addition, I'm using "JSHint" plugin to valid the code and it reports the <import> tag as an error. I knew this import only works in Alfresco, but I can I config the plugin to ignore this error?

These are non-program issues so I am not sure whether I have posted it at the correct place.

Many thanks,