com.mindoo.remote.api.org.eclipse.ui
Interface IRemotePageLayout

All Superinterfaces:
IRemoteEclipseWrapper

public interface IRemotePageLayout
extends IRemoteEclipseWrapper

Remote API Wrapper for the org.eclipse.ui.IPageLayout (Online documentation)

Original documentation:
A page layout defines the initial layout for a perspective within a page in a workbench window.

This interface is not intended to be implemented by clients.

When a perspective is opened, it creates a new page layout with a single editor area. This layout is then passed to the perspective factory (implementation of IPerspectiveFactory.createInitialLayout(IPageLayout)) where additional views and other content can be added, using the existing editor area as the initial point of reference.

In some cases, multiple instances of a particular view may need to be added to the same layout. These are disambiguated using a secondary id. In layout methods taking a view id, the id can have the compound form: primaryId [':' secondaryId]. If a secondary id is given, the view must allow multiple instances by having specified allowMultiple="true" in its extension. View placeholders may also have a secondary id.

Wildcards are permitted in placeholder ids (but not regular view ids). '*' matches any substring, '?' matches any single character. Wildcards can be specified for the primary id, the secondary id, or both. For example, the placeholder "someView:*" will match any occurrence of the view that has primary id "someView" and that also has some non-null secondary id. Note that this placeholder will not match the view if it has no secondary id, since the compound id in this case is simply "someView".


Field Summary
static int BOTTOM
          Relationship constant indicating a part should be placed below its relative.
static float DEFAULT_FASTVIEW_RATIO
          The default fast view ratio width.
static float DEFAULT_VIEW_RATIO
          The default view ratio width for regular (non-fast) views.
static java.lang.String ID_BOOKMARKS
          The view id for the workbench's Bookmark Navigator standard component.
static java.lang.String ID_EDITOR_AREA
          The part id for the workbench's editor area.
static java.lang.String ID_NAVIGATE_ACTION_SET
          The view id for the workbench's Task List standard component.
static java.lang.String ID_OUTLINE
          The view id for the workbench's Content Outline standard component.
static java.lang.String ID_PROBLEM_VIEW
          The view id for the workbench's Problems View standard component.
static java.lang.String ID_PROGRESS_VIEW
          The view id for the workbench's Progress View standard component.
static java.lang.String ID_PROP_SHEET
          The view id for the workbench's Property Sheet standard component.
static java.lang.String ID_RES_NAV
          The view id for the workbench's Resource Navigator standard component.
static java.lang.String ID_TASK_LIST
           
static float INVALID_RATIO
          A variable used to represent invalid ratios.
static int LEFT
          Relationship constant indicating a part should be placed to the left of its relative.
static float NULL_RATIO
          A variable used to represent a ratio which has not been specified.
static float RATIO_MAX
          Maximum acceptable ratio value when adding a view
static float RATIO_MIN
          Minimum acceptable ratio value when adding a view
static int RIGHT
          Relationship constant indicating a part should be placed to the right of its relative.
static int TOP
          Relationship constant indicating a part should be placed above its relative.
 
Method Summary
 void addFastView(java.lang.String viewId)
          Adds the view with the given compound id to the page layout as a fast view.
 void addFastView(java.lang.String viewId, float ratio)
          Adds the view with the given compound id to the page layout as a fast view with the given width ratio.
 void addPlaceholder(java.lang.String viewId, int relationship, float ratio, java.lang.String refId)
          Adds a view placeholder to this page layout.
 void addStandaloneView(java.lang.String viewId, boolean showTitle, int relationship, float ratio, java.lang.String refId)
          Adds a standalone view with the given compound id to this page layout.
 void addStandaloneViewPlaceholder(java.lang.String viewId, int relationship, float ratio, java.lang.String refId, boolean showTitle)
          Adds a standalone view placeholder to this page layout.
 void addView(java.lang.String viewId, int relationship, float ratio, java.lang.String refId)
          Adds a view with the given compound id to this page layout.
 IRemoteFolderLayout createFolder(java.lang.String folderId, int relationship, float ratio, java.lang.String refId)
          Creates and adds a new folder with the given id to this page layout.
 IRemotePlaceholderFolderLayout createPlaceholderFolder(java.lang.String folderId, int relationship, float ratio, java.lang.String refId)
          Creates and adds a placeholder for a new folder with the given id to this page layout.
 void setEditorAreaVisible(boolean visible)
          Show or hide the editor area for the page's layout.
 void setFixed(boolean isFixed)
          Sets whether this layout is fixed.
 void setViewLayout_Closeable(java.lang.String id, boolean closeable)
          Helper method: Sets whether a view is closeable.
 void setViewLayout_Moveable(java.lang.String id, boolean moveable)
          Helper method: Sets whether a view is moveable.
 
Methods inherited from interface com.mindoo.remote.api.IRemoteEclipseWrapper
_internalGetId, equalWrappedObjects
 

Field Detail

ID_EDITOR_AREA

static final java.lang.String ID_EDITOR_AREA
The part id for the workbench's editor area. This may only be used as a reference part for view addition.

See Also:
Constant Field Values

ID_RES_NAV

static final java.lang.String ID_RES_NAV
The view id for the workbench's Resource Navigator standard component.

See Also:
Constant Field Values

ID_PROP_SHEET

static final java.lang.String ID_PROP_SHEET
The view id for the workbench's Property Sheet standard component.

See Also:
Constant Field Values

ID_OUTLINE

static final java.lang.String ID_OUTLINE
The view id for the workbench's Content Outline standard component.

See Also:
Constant Field Values

ID_BOOKMARKS

static final java.lang.String ID_BOOKMARKS
The view id for the workbench's Bookmark Navigator standard component.

See Also:
Constant Field Values

ID_PROBLEM_VIEW

static final java.lang.String ID_PROBLEM_VIEW
The view id for the workbench's Problems View standard component.

See Also:
Constant Field Values

ID_PROGRESS_VIEW

static final java.lang.String ID_PROGRESS_VIEW
The view id for the workbench's Progress View standard component.

See Also:
Constant Field Values

ID_TASK_LIST

static final java.lang.String ID_TASK_LIST
See Also:
Constant Field Values

ID_NAVIGATE_ACTION_SET

static final java.lang.String ID_NAVIGATE_ACTION_SET
The view id for the workbench's Task List standard component.

See Also:
Constant Field Values

LEFT

static final int LEFT
Relationship constant indicating a part should be placed to the left of its relative.

See Also:
Constant Field Values

RIGHT

static final int RIGHT
Relationship constant indicating a part should be placed to the right of its relative.

See Also:
Constant Field Values

TOP

static final int TOP
Relationship constant indicating a part should be placed above its relative.

See Also:
Constant Field Values

BOTTOM

static final int BOTTOM
Relationship constant indicating a part should be placed below its relative.

See Also:
Constant Field Values

RATIO_MIN

static final float RATIO_MIN
Minimum acceptable ratio value when adding a view

See Also:
Constant Field Values

RATIO_MAX

static final float RATIO_MAX
Maximum acceptable ratio value when adding a view

See Also:
Constant Field Values

DEFAULT_FASTVIEW_RATIO

static final float DEFAULT_FASTVIEW_RATIO
The default fast view ratio width.

See Also:
Constant Field Values

DEFAULT_VIEW_RATIO

static final float DEFAULT_VIEW_RATIO
The default view ratio width for regular (non-fast) views.

See Also:
Constant Field Values

INVALID_RATIO

static final float INVALID_RATIO
A variable used to represent invalid ratios.

See Also:
Constant Field Values

NULL_RATIO

static final float NULL_RATIO
A variable used to represent a ratio which has not been specified.

See Also:
Constant Field Values
Method Detail

addPlaceholder

void addPlaceholder(java.lang.String viewId,
                    int relationship,
                    float ratio,
                    java.lang.String refId)
                    throws RemoteEclipseAPIException
Adds a view placeholder to this page layout. A view placeholder is used to define the position of a view before the view appears. Initially, it is invisible; however, if the user ever opens a view whose compound id matches the placeholder, the view will appear at the same location as the placeholder. See the IPageLayout type documentation for more details about compound ids. If the placeholder contains wildcards, it remains in the layout, otherwise it is replaced by the view. If the primary id of the placeholder has no wildcards, it must refer to a view contributed to the workbench's view extension point (named "org.eclipse.ui.views").

Parameters:
viewId - the compound view id (wildcards allowed)
relationship - the position relative to the reference part; one of TOP, BOTTOM, LEFT, or RIGHT
ratio - a ratio specifying how to divide the space currently occupied by the reference part, in the range 0.05f to 0.95f. Values outside this range will be clipped to facilitate direct manipulation. For a vertical split, the part on top gets the specified ratio of the current space and the part on bottom gets the rest. Likewise, for a horizontal split, the part at left gets the specified ratio of the current space and the part at right gets the rest.
refId - the id of the reference part; either a view id, a folder id, or the special editor area id returned by getEditorArea
Throws:
RemoteEclipseAPIException

addView

void addView(java.lang.String viewId,
             int relationship,
             float ratio,
             java.lang.String refId)
             throws RemoteEclipseAPIException
Adds a view with the given compound id to this page layout. See the IPageLayout type documentation for more details about compound ids. The primary id must name a view contributed to the workbench's view extension point (named "org.eclipse.ui.views").

Parameters:
viewId - the compound view id
relationship - the position relative to the reference part; one of TOP, BOTTOM, LEFT, or RIGHT
ratio - a ratio specifying how to divide the space currently occupied by the reference part, in the range 0.05f to 0.95f. Values outside this range will be clipped to facilitate direct manipulation. For a vertical split, the part on top gets the specified ratio of the current space and the part on bottom gets the rest. Likewise, for a horizontal split, the part at left gets the specified ratio of the current space and the part at right gets the rest.
refId - the id of the reference part; either a view id, a folder id, or the special editor area id returned by getEditorArea
Throws:
RemoteEclipseAPIException

createFolder

IRemoteFolderLayout createFolder(java.lang.String folderId,
                                 int relationship,
                                 float ratio,
                                 java.lang.String refId)
                                 throws RemoteEclipseAPIException
Creates and adds a new folder with the given id to this page layout. The position and relative size of the folder is expressed relative to a reference part.

Parameters:
folderId - the id for the new folder. This must be unique within the layout to avoid collision with other parts.
relationship - the position relative to the reference part; one of TOP, BOTTOM, LEFT, or RIGHT
ratio - a ratio specifying how to divide the space currently occupied by the reference part, in the range 0.05f to 0.95f. Values outside this range will be clipped to facilitate direct manipulation. For a vertical split, the part on top gets the specified ratio of the current space and the part on bottom gets the rest. Likewise, for a horizontal split, the part at left gets the specified ratio of the current space and the part at right gets the rest.
refId - the id of the reference part; either a view id, a folder id, or the special editor area id returned by getEditorArea
Returns:
the new folder
Throws:
RemoteEclipseAPIException

createPlaceholderFolder

IRemotePlaceholderFolderLayout createPlaceholderFolder(java.lang.String folderId,
                                                       int relationship,
                                                       float ratio,
                                                       java.lang.String refId)
                                                       throws RemoteEclipseAPIException
Creates and adds a placeholder for a new folder with the given id to this page layout. The position and relative size of the folder is expressed relative to a reference part.

Parameters:
folderId - the id for the new folder. This must be unique within the layout to avoid collision with other parts.
relationship - the position relative to the reference part; one of TOP, BOTTOM, LEFT, or RIGHT
ratio - a ratio specifying how to divide the space currently occupied by the reference part, in the range 0.05f to 0.95f. Values outside this range will be clipped to facilitate direct manipulation. For a vertical split, the part on top gets the specified ratio of the current space and the part on bottom gets the rest. Likewise, for a horizontal split, the part at left gets the specified ratio of the current space and the part at right gets the rest.
refId - the id of the reference part; either a view id, a folder id, or the special editor area id returned by getEditorArea
Returns:
a placeholder for the new folder
Throws:
RemoteEclipseAPIException

setFixed

void setFixed(boolean isFixed)
              throws RemoteEclipseAPIException
Sets whether this layout is fixed. In a fixed layout, layout parts cannot be moved or zoomed, and the initial set of views cannot be closed.

Parameters:
isFixed - true if this layout is fixed, false if not
Throws:
RemoteEclipseAPIException

addStandaloneView

void addStandaloneView(java.lang.String viewId,
                       boolean showTitle,
                       int relationship,
                       float ratio,
                       java.lang.String refId)
                       throws RemoteEclipseAPIException
Adds a standalone view with the given compound id to this page layout. See the IPageLayout type documentation for more details about compound ids. A standalone view cannot be docked together with other views. A standalone view's title can optionally be hidden. If hidden, then any controls typically shown with the title (such as the close button) are also hidden. Any contributions or other content from the view itself are always shown (e.g. toolbar or view menu contributions, content description).

The id must name a view contributed to the workbench's view extension point (named "org.eclipse.ui.views").

Parameters:
viewId - the compound view id
showTitle - true to show the title and related controls, false to hide them
relationship - the position relative to the reference part; one of TOP, BOTTOM, LEFT, or RIGHT
ratio - a ratio specifying how to divide the space currently occupied by the reference part, in the range 0.05f to 0.95f. Values outside this range will be clipped to facilitate direct manipulation. For a vertical split, the part on top gets the specified ratio of the current space and the part on bottom gets the rest. Likewise, for a horizontal split, the part at left gets the specified ratio of the current space and the part at right gets the rest.
refId - the id of the reference part; either a view id, a folder id, or the special editor area id returned by getEditorArea
Throws:
RemoteEclipseAPIException

addStandaloneViewPlaceholder

void addStandaloneViewPlaceholder(java.lang.String viewId,
                                  int relationship,
                                  float ratio,
                                  java.lang.String refId,
                                  boolean showTitle)
                                  throws RemoteEclipseAPIException
Adds a standalone view placeholder to this page layout. A view placeholder is used to define the position of a view before the view appears. Initially, it is invisible; however, if the user ever opens a view whose compound id matches the placeholder, the view will appear at the same location as the placeholder. See the IPageLayout type documentation for more details about compound ids. If the placeholder contains wildcards, it remains in the layout, otherwise it is replaced by the view. If the primary id of the placeholder has no wildcards, it must refer to a view contributed to the workbench's view extension point (named "org.eclipse.ui.views").

Parameters:
viewId - the compound view id (wildcards allowed)
relationship - the position relative to the reference part; one of TOP, BOTTOM, LEFT, or RIGHT
ratio - a ratio specifying how to divide the space currently occupied by the reference part, in the range 0.05f to 0.95f. Values outside this range will be clipped to facilitate direct manipulation. For a vertical split, the part on top gets the specified ratio of the current space and the part on bottom gets the rest. Likewise, for a horizontal split, the part at left gets the specified ratio of the current space and the part at right gets the rest.
refId - the id of the reference part; either a view id, a folder id, or the special editor area id returned by getEditorArea
showTitle - true to show the view's title, false if not
Throws:
RemoteEclipseAPIException

setEditorAreaVisible

void setEditorAreaVisible(boolean visible)
                          throws RemoteEclipseAPIException
Show or hide the editor area for the page's layout.

Parameters:
visible - true to show the editor area, false to hide the editor area
Throws:
RemoteEclipseAPIException

addFastView

void addFastView(java.lang.String viewId)
                 throws RemoteEclipseAPIException
Adds the view with the given compound id to the page layout as a fast view. See the IPageLayout type documentation for more details about compound ids. The primary id must name a view contributed to the workbench's view extension point (named "org.eclipse.ui.views").

Parameters:
viewId - the compound id of the view to be added
Throws:
RemoteEclipseAPIException

addFastView

void addFastView(java.lang.String viewId,
                 float ratio)
                 throws RemoteEclipseAPIException
Adds the view with the given compound id to the page layout as a fast view with the given width ratio. See the IPageLayout type documentation for more details about compound ids. The primary id must name a view contributed to the workbench's view extension point (named "org.eclipse.ui.views").

Parameters:
viewId - the compound id of the view to be added
ratio - the percentage of the workbench the fast view will cover
Throws:
RemoteEclipseAPIException

setViewLayout_Closeable

void setViewLayout_Closeable(java.lang.String id,
                             boolean closeable)
                             throws RemoteEclipseAPIException
Helper method: Sets whether a view is closeable.

Parameters:
id - the compound view id or placeholder
closeable - true if the view is closeable, false if not
Throws:
RemoteEclipseAPIException

setViewLayout_Moveable

void setViewLayout_Moveable(java.lang.String id,
                            boolean moveable)
                            throws RemoteEclipseAPIException
Helper method: Sets whether a view is moveable.

Parameters:
id - the compound view id or placeholder
moveable - true if the view is moveable, false if not
Throws:
RemoteEclipseAPIException