Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348422 - [client][editor] Check internal names in the editor and dependencies
Summary: [client][editor] Check internal names in the editor and dependencies
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-06 11:35 EDT by Felipe Heidrich CLA
Modified: 2011-09-01 11:42 EDT (History)
3 users (show)

See Also:
simon_kaegi: review+


Attachments
diff (101.98 KB, patch)
2011-06-07 18:39 EDT, Susan McCourt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felipe Heidrich CLA 2011-06-06 11:35:08 EDT
We have moved and renamed the files related to the editor and textview (bug 347826).

The most important name changes where
eclipse.Editor -> orion.textview.TextView
orion.EditorContainer -> orion.editor.Editor

I have changed all the internal references of the text view files to make sure the new names are used everywhere. The same should be done for editor files. For example, in the code:

(embeddededitor.js)
var editorContainer = new orion.editor.Editor({
becomes
var editor = new orion.editor.Editor({

(editor.js)
this._editor = this._editorFactory();
becomes
this._view = this._viewFactory();

Personally I would rename all references to editorWidget to view.
Including, example getEditorWidget() -> to getTextView(), etc
Comment 1 Susan McCourt CLA 2011-06-07 14:22:15 EDT
I was originally going to defer this since it's only internal names.
But, it's supposed to be the example for consuming the editor.
Talked to Simon, we are going to go for it.
Comment 2 Susan McCourt CLA 2011-06-07 15:13:26 EDT
Note: This is not just internal code.
This affects the "API" of what is now orion.editor.Editor

Editor constructor options.editorFactory -> options.textViewFactory
Editor.getEditorWidget() -> Editor.getTextView()
Editor.installEditor() -> Editor.installTextView()

So we need to search all users of these methods in order to get this right.
The rest is internal naming in glue code and feature/factories.

I'll make a pass and attach a patch for review once it's working.
cc'ing Libing as this affects compare-container (but I'll make the changes)
Comment 3 Susan McCourt CLA 2011-06-07 18:39:58 EDT
Created attachment 197550 [details]
diff
Comment 4 Susan McCourt CLA 2011-06-07 18:58:54 EDT
Simon, can you please review?

I verified that:
- editor still works
- read only editor still works
- compare editors work (inline and side by side)
- examples work (minimaleditor and embeddededitor)

There may be some more cleanup required later, for example the compare code still has internal methods called "createEditorContainers", etc. but the examples and mainstream coding pages look good.

There is a diff attached.
I also pushed a branch that you can try.
remotes/origin/bug348422
Comment 5 Simon Kaegi CLA 2011-06-07 22:10:10 EDT
Thanks Susan. Looks good and I'm using it without a problem and have now just pushed it.

Fixed in HEAD.

FWIW a branch is by far the easiest for me to review from.