Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323177 - Auto activation does not work in javascript regions in webpages
Summary: Auto activation does not work in javascript regions in webpages
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Ian Tewksbury CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-19 13:20 EDT by Yang Li CLA
Modified: 2010-09-29 17:37 EDT (History)
2 users (show)

See Also:
cmjaun: review+
thatnitind: review+


Attachments
Fix Patch (9.88 KB, patch)
2010-09-17 08:59 EDT, Ian Tewksbury CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yang Li CLA 2010-08-19 13:20:42 EDT
This seems to be a bug that auto activation does not work in Javascript regions. Bug 305209 fixed this problem for Java regions in JSPs. 

JavaScript Development Tools

Version: 1.2.0.v201005270528-7C78FGDF9JgLWLMBWz-Ose6
Build id: 20100615235519
Comment 1 Chris Jaun CLA 2010-08-24 15:27:27 EDT
Ian, you fixed this same bug in Java.
Comment 2 Ian Tewksbury CLA 2010-09-17 08:59:50 EDT
Created attachment 179108 [details]
Fix Patch

This patch makes it so auto activation for Javascript works in Javascript regions in both HTML and JSPs.  To do this an implementation of StructuredContentAssistProcessor had to be created for JSDT that uses the JSDT content assist auto-activation preferences.  Then JSDTStructuredTextViewerConfigurationJSP#getContentAssistProcessors and StructuredTextViewerConfigurationJSDT#getContentAssistProcessors had to be updated to use this new JSDTStructuredContentAssistProcessor when the given partition type is a Javascript partition type, else each processor calls into their super #getContentAssistProcessors.

I did have to add an exported package to org.eclipse.wst.jsdt.web.ui to put the new JSDTStructuredContentAssistProcessor in so that JSDTStructuredTextViewerConfigurationJSP could access it.

No real way to JUnit this but have tested it manually in both JSPs and HTML pages.
Comment 3 Chris Jaun CLA 2010-09-29 17:36:52 EDT
Checked into 3.2.3 and HEAD.