|Re: how do i set an orientation specifically to views and editors? [message #539895 is a reply to message #519918]
||Mon, 14 June 2010 08:43
| Dani Megert
Registered: July 2009
Paul Webster wrote:|
> You can use IPartListener2 to listen for new editor open events. You
> can use org.eclipse.ui.IWorkbenchPage.getEditorReferences() to get the
> list of currently open editors, and editorReference.getPart(false) to
> actually get the IEditorPart.
> But then what? IEditorPart does not offer you any methods for
> accessing the orientation or even the SWT controls within the editor.
> AFAIK eclipse switches to RTL mode if the locale is RTL (like iw, eg)
> or if the command line contains -dir rtl. That orientation is set at
> startup, and is used when creating shells and composites (and every
> child control inherits this flag).
> In theory if you wrote an editor you could deliberately set the
> direction in your createPartControl(*) method on your Composite ...
> but that means you cannot effect editors you didn't write, and by the
> time the IEditorPart becomes available that editor's
> createPartControl(*) has already been called.
As Paul said: you can only control this for parts that you own and in
that case see
Powered by FUDForum
. Page generated in 0.12754 seconds