| Summary: | [editor] Can we rename "editor" to "editableText"? | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Boris Bokowski <bokowski> |
| Component: | Client | Assignee: | Project Inbox <e4.orion-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | eclipse.felipe, Silenio_Quarti, susan, thatnitind |
| Version: | 0.2 | ||
| Target Milestone: | 0.2 | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Boris Bokowski
(In reply to comment #0) > "editor" --> "editableText" By "editor", you mean eclipse.Editor, that lives in /org.eclipse.orion.client.editor/web/js/editor.js To be renamed to "editableText" > "editorContainer" --> "editor" > Any opinions? Personally I find "editableText" a bad name. For me, eclipse.Editor is an editor on its own. The "editorContainer" is an extension of eclipse.Editor and could be called CodeEditor, TextEditor, etc. Depending on your design you could call "editorContainer" by BasicEditor or AbstractEditor and then add subclasses like "HTMLEditor", "JSEditor", "CSSEditor", etc. Other alternative (in case you really want to use the name editor for your guy) is to change the name space for the editor, instead of eclipse.Editor it could be changed to orion.editor.Editor (open to suggestios) and "editorContainer" could be orion.client.Editor or orion.ui.Editor This last approach would also solve name collision for other "types" like: eclipse.KeyBinding eclipse.Style eclipse.StyleRange etc (note that some of these names only exist because of JSDoc) The current editor container can be configured with features that are plain text (undo, etc.), and some more code-oriented things (content assist, problem rulers). So calling it a "code editor" or "text editor" doesn't really help. And "BasicEditor" is just a different way to deal with namespace. I think they are both editors, one more at a "widget level" and the other with more semantics. Given that different audiences will see them both as "editors", I like the namespace idea. In my early work on bug 337647, I have started to call editorContainer "editor" and when I need the widget, I call "editor.getEditorWidget()". But I'm not suggesting that the "widget" word be used for names, it's just a good way to distinguish between the two when I'm in code that deals with both layers (plug-in commands, etc.) (In reply to comment #2) > Given that different audiences will see them both as "editors", I like the > namespace idea. I agree with that, any suggestions for namespaces ? I'm not against changing the name for eclipse.Editor, it is just hard to find a good name for it. SSQ should be here this afternoon, I'll ask what he thinks. > "editor.getEditorWidget()" Not bad IMO. In the desktop the same method exists and it is called getTextWidget(). I don't particularly like the namespace idea, because it will be a constant cause of confusion (did you mean "this editor" or "that editor"?) How about EditorWidget as the name for the widget-level editor? (In reply to comment #4) > I don't particularly like the namespace idea, because it will be a constant > cause of confusion (did you mean "this editor" or "that editor"?) > How about EditorWidget as the name for the widget-level editor? we can say that an editor (that is not a widget) has a view (that is a widget). so maybe a better name is TextView (or TextViewer) I like TextView given that we already have TextModel. Note that the rulers interface have an API called setEditor() which should probably be renamed to setView() as well. I like TextView given that we already have TextModel. Note that the rulers interface have an API called setEditor() which should probably be renamed to setView() as well. Fixed, see Bug 347826 for details. |