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

Bug 348422

Summary: [client][editor] Check internal names in the editor and dependencies
Product: [ECD] Orion Reporter: Felipe Heidrich <eclipse.felipe>
Component: ClientAssignee: Susan McCourt <susan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: libingw, simon_kaegi, susan
Version: 0.2Flags: simon_kaegi: review+
Target Milestone: 0.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
diff none

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.