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

Bug 323177

Summary: Auto activation does not work in javascript regions in webpages
Product: [WebTools] JSDT Reporter: Yang Li <progenitor00>
Component: GeneralAssignee: Ian Tewksbury <itewksbu>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: cmjaun, mauromol
Version: unspecifiedFlags: cmjaun: review+
thatnitind: review+
Target Milestone: 3.2.3   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Fix Patch none

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.