Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319698

Summary: Files intentionally excluded from include path are automatically added
Product: [WebTools] JSDT Reporter: Jacek Pospychala <jacek.pospychala>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: cmjaun
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
patch none

Description Jacek Pospychala CLA 2010-07-13 08:38:39 EDT
When processing HTML files, JSDT updates project's include path to contain all JavaScript files referenced from that HTML.
That's fine, but JSDT should not add elements that were explicitly excluded from Include Path.


Steps to reproduce:
1. Create javascript project
2. create a.js
2. in project include path configuration add exclusion rule, e.g. "**/a.js"
3. create index.html which contains following script tag:

<script type="text/javascript" src="a.js"></script>

4. Try to use Content-Assist in index.html

Notice that types from a.js are found, altough they shouldn't, because they were excluded.
Comment 1 Jacek Pospychala CLA 2010-07-13 08:43:00 EDT
Created attachment 174137 [details]
patch

When adding new files to include path, first make sure that they were not intentionally excluded.

The isExcluded() method is inspired by org.eclipse.wst.jsdt.internal.core.JavaProject.isOnIncludepath(IResource)
I was trying to use those in Util class, but with no success.
Comment 2 Chris Jaun CLA 2010-07-13 13:51:13 EDT
I don't think this is a problem in 3.2.1.

Will try it out and probably close.
Comment 3 Chris Jaun CLA 2010-07-15 16:38:13 EDT
Works correctly in 3.2.1.

BUG318252