Bug 118142 - [BiDi][WorkbenchParts] TextEditor class lacks setOrientation
Summary: [BiDi][WorkbenchParts] TextEditor class lacks setOrientation
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Karice McIntyre CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2005-11-26 16:55 EST by benson margulies CLA
Modified: 2007-01-18 15:57 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description benson margulies CLA 2005-11-26 16:55:00 EST
TextEditor exposes getOrientation but not setOrientation. There's a workaround involving using getAdapter to retrieve the Control, casting the control to StyledText, and then you can its orientation.

Ideally, there should even be UI gestures by default for this, but I'd settle for a cleaner API.
Comment 1 Dani Megert CLA 2005-11-29 12:35:14 EST
IWorkbenchPartOrientation.getOrientation() is defined and used by Platform UI. Allowing a part to set the orientation might be useful for clients.

Asking Platform UI to consider.

>There's a workaround
>involving using getAdapter to retrieve the Control, casting the control to
>StyledText, and then you can its orientation.
It would be much easier to simply subclass the text editor and overwrite getOrientation().
Comment 2 benson margulies CLA 2005-11-29 12:38:20 EST
At the moment, I'm focused on building action contibutions to the default text editor. I will eventually subclass the TextEditor, yes. In the mean time, I submitted this to save someone else some trouble some day.
Comment 3 Karice McIntyre CLA 2007-01-18 15:57:13 EST
Subclassing the part and overriding getOrientation() is the correct way to assign a specific orientation to a part - this is how the workbench layout, presentation, etc is currently implemented to work.  Adding a setOrientation() method would require changing a lot of other code and implies support for changing orientation of workbench parts on the fly, which is not (and will not be) supported.