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

Bug 264653

Summary: [JSDT Bridge] [API] Enable the connector for other JavaScript support
Product: [WebTools] JSDT Reporter: Roy Ganor <ganoro>
Component: GeneralAssignee: Nitin Dahyabhai <thatnitind>
Status: RESOLVED WONTFIX QA Contact: Nitin Dahyabhai <thatnitind>
Severity: enhancement    
Priority: P3 CC: cmjaun, david_williams, evgeny.c, greg, jin.phd
Version: 3.1Keywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 266534    
Bug Blocks:    
Attachments:
Description Flags
patch for sse
none
updated version of a patch none

Description Roy Ganor CLA 2009-02-12 04:45:20 EST
First of all about the severity: "Critical - crashes, loss of data, severe memory leak" - I set this bug as critical because the current implementation of JavaScript support suffers from crashes and memory leaks. 

Since the JSDT team has not agreed with our previous proposal to deliver a  package that doesn't not include the JSDT plugins we provide another proposal that should not interfere with other plugins and implementation and provides an alternative to other to use their own implementation.

This proposal enables other implementation for the JavaScript Support in Web tools source editing project.

Basically, the solution is simple - we provide a "priority" field that will fetch the implementations in a row and decide on which to use according to its own "priority". 

Probably, first bridge will be using the DLTK JavaScript support. Attached are patches that should give you a sense of what we are targeting to.

Will be happy to commit it as part of M6 and not delay it to the next milestone.
Comment 1 Roy Ganor CLA 2009-02-12 04:47:37 EST
Created attachment 125501 [details]
patch for sse
Comment 2 Nitin Dahyabhai CLA 2009-02-12 09:18:47 EST
So far I've resisted the idea of letting extensions choose their priority, as you eventually arrive at the same conflicts later on when multiple extensions have decided that they're the most important one.  In fact, your updated schema says as much.
Comment 3 Nitin Dahyabhai CLA 2009-02-12 10:24:37 EST
Are you certain you wouldn't want to keep contributing to the current implementation?  Bug 243886 has the only outstanding patch that I can find, so far, and the DLTK implementation lacks a number of refinements already in JSDT.
Comment 4 Evgeny V. Chesnokov CLA 2009-02-17 15:52:23 EST
Created attachment 125941 [details]
updated version of a patch

Updated version of a patch, schema was fixed a bit to support priority for an additional configuration option.
Comment 5 Roy Ganor CLA 2009-02-19 02:51:53 EST
(In reply to comment #3)
> Are you certain you wouldn't want to keep contributing to the current
> implementation?  Bug 243886 has the only outstanding patch that I can find, so
> far, and the DLTK implementation lacks a number of refinements already in JSDT.
> 

yes we are certain ;) 
Comment 6 Nitin Dahyabhai CLA 2009-02-19 04:47:23 EST
The patch is processing the extension priorities as floats instead of integers.  Is that intentional or something that didn't get updated between the two revisions?
Comment 7 Evgeny V. Chesnokov CLA 2009-02-19 05:03:00 EST
This is intentional, this is to allow injections of functionality in between two other implementations. Like, when there is JSDT with default priority 0 and DLTK with declared priority 1, someone can provide outline implementation that overrides JSDT but is ruled out by DLTK with priority 0.5, and float gives us a confidence that the required intermediate level will always be available.

This is just another touch of configurability and changing this to integers won't break anything as of now.
Comment 8 David Williams CLA 2009-02-19 20:06:30 EST
I think it's inappropriate to have a 'priority' in an participating environment like Eclipse plugins. The standard pattern to allow alternatives, if that is allowed at all, is to use user preferences, or product preferences, or both. Or, am I misunderstanding what this is doing? (I'm skim reading :) 



Comment 9 Nitin Dahyabhai CLA 2009-02-20 01:38:29 EST
No, that is what it is for, and the possible implications just with different Galileo packages and installations is worrisome.  I absolutely want to avoid a *user* preference if I can, though.
Comment 10 Nitin Dahyabhai CLA 2009-03-12 03:19:26 EDT
I understand the problem, and I can see why this solution is attractive, but I just can't solve it in this way.

The sourceViewerConfiguration already has a predictable list of target IDs in a predetermined order and computed at runtime to solve this kind of problem (see http://www.eclipse.org/webtools/wst/components/sse/designs/EditorConfiguration.html and the use of org.eclipse.wst.sse.ui.internal.provisional.extensions.ConfigurationPointCalculator) based on what the user is doing rather than on simply what is installed.  The intended effect of a priority attribute would increase the support burden of any upstream adopter product that didn't also take steps to revert back to the current behavior when the alternate is installed.

I'm not going to mark this as wontfix since I understand the problem you're faced with, but I'm rejecting this patch and approach.
Comment 11 Chris Jaun CLA 2009-09-15 11:38:23 EDT
Categorizing JSDT bugzillas for planning purposes.
Comment 12 Nitin Dahyabhai CLA 2011-08-24 04:33:49 EDT
Resolving given the lack of further push back and contributions in this area.  I expect it will be reopened if there's still interest in pursuing this.