Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351462 - [client] [editor] Stop using dojo in Editor
Summary: [client] [editor] Stop using dojo in Editor
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Editor (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.3 M2   Edit
Assignee: Mark Macdonald CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 352621 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-07 11:13 EDT by Mark Macdonald CLA
Modified: 2011-08-15 17:58 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Macdonald CLA 2011-07-07 11:13:46 EDT
It should be possible for a client to consume the Editor component without needing dojo. To do this we need to come up with replacements for:

- dojo.hitch
- dojo.connect
- dojo.regexp.escapeString
- dojo.Animation
- dojo.Deferred
- dojo.DeferredList


Deferred and DeferredList are used only for content assist, and could probably be removed altogether.
Comment 1 Felipe Heidrich CLA 2011-07-07 11:34:04 EDT
Note that to remove dojo.connect you will need to do in the editor and something similar to what we need to the textview.
See the implementation of:
textView#addEventListener
textView#removeEventListener
textView#onSelection (as an example)

If you like this format we can move our EventTable to API so you can reuse it.

How many events do you have in the editor ? is it only "InputChange" and "DirtyChange" ?
Comment 2 Felipe Heidrich CLA 2011-07-07 11:35:43 EDT
>Note that to remove dojo.connect you will need to do in the editor and
>something similar to what we need to the textview.

Note that to remove dojo.connect you will need to do to the editor 
something similar to what we did in the textview.
Comment 3 Mark Macdonald CLA 2011-07-07 13:55:05 EDT
(In reply to comment #1)
> If you like this format we can move our EventTable to API so you can reuse it.
That would be useful.

> How many events do you have in the editor ? is it only "InputChange" and
> "DirtyChange" ?

Yes, although I expect we will want more events later. If you have ideas, Bug 349957 is probably the best place to capture them.
Comment 4 Mark Macdonald CLA 2011-08-04 09:22:13 EDT
*** Bug 352621 has been marked as a duplicate of this bug. ***
Comment 5 Mark Macdonald CLA 2011-08-04 09:28:27 EDT
More complete list of dojo features being used

- dojo.byId
- dojo.hitch
- dojo.addOnLoad
- dojo.connect
- dojo.forEach
- dojo.map
- dojo.regexp.escapeString
- dojo.create
- dojo.Animation
- dojo.Deferred
- dojo.DeferredList