📄 ipagelayout.java
字号:
package com.plugindev.addressbook;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPerspectiveDescriptor;
import org.eclipse.ui.IPlaceholderFolderLayout;
import org.eclipse.ui.IViewLayout;
public interface IPageLayout {
/**
* The part id for the workbench's editor area. This may only be used
* as a reference part for view addition.
*/
public static String ID_EDITOR_AREA = "org.eclipse.ui.editorss"; //$NON-NLS-1$
/**
* The view id for the workbench's Resource Navigator standard component.
*/
public static String ID_RES_NAV = "org.eclipse.ui.views.ResourceNavigator"; //$NON-NLS-1$
/**
* The view id for the workbench's Property Sheet standard component.
*/
public static String ID_PROP_SHEET = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$
/**
* The view id for the workbench's Content Outline standard component.
*/
public static String ID_OUTLINE = "org.eclipse.ui.views.ContentOutline"; //$NON-NLS-1$
/**
* The view id for the workbench's Bookmark Navigator standard component.
*/
public static String ID_BOOKMARKS = "org.eclipse.ui.views.BookmarkView"; //$NON-NLS-1$
/**
* The view id for the workbench's Problems View standard component.
* @since 3.0
*/
public static String ID_PROBLEM_VIEW = "org.eclipse.ui.views.ProblemView"; //$NON-NLS-1$
/**
* The view id for the workbench's Problems View standard component.
* @since 3.2
*/
public static String ID_PROGRESS_VIEW = "org.eclipse.ui.views.ProgressView"; //$NON-NLS-1$
/**
* The view id for the workbench's Task List standard component.
*/
public static String ID_TASK_LIST = "org.eclipse.ui.views.TaskList"; //$NON-NLS-1$
/**
* Id of the navigate action set.
* (value <code>"org.eclipse.ui.NavigateActionSet"</code>)
* @since 2.1
*/
public static final String ID_NAVIGATE_ACTION_SET = "org.eclipse.ui.NavigateActionSet"; //$NON-NLS-1$
/**
* Relationship constant indicating a part should be placed to the left of
* its relative.
*/
public static final int LEFT = 1;
/**
* Relationship constant indicating a part should be placed to the right of
* its relative.
*/
public static final int RIGHT = 2;
/**
* Relationship constant indicating a part should be placed above its
* relative.
*/
public static final int TOP = 3;
/**
* Relationship constant indicating a part should be placed below its
* relative.
*/
public static final int BOTTOM = 4;
/**
* Minimum acceptable ratio value when adding a view
* @since 2.0
*/
public static final float RATIO_MIN = 0.05f;
/**
* Maximum acceptable ratio value when adding a view
* @since 2.0
*/
public static final float RATIO_MAX = 0.95f;
/**
* The default fast view ratio width.
* @since 2.0
*/
public static final float DEFAULT_FASTVIEW_RATIO = 0.3f;
/**
* The default view ratio width for regular (non-fast) views.
* @since 2.0
*/
public static final float DEFAULT_VIEW_RATIO = 0.5f;
/**
* A variable used to represent invalid ratios.
* @since 2.0
*/
public static final float INVALID_RATIO = -1f;
/**
* A variable used to represent a ratio which has not been specified.
* @since 2.0
*/
public static final float NULL_RATIO = -2f;
/**
* Adds an action set with the given id to this page layout.
* The id must name an action set contributed to the workbench's extension
* point (named <code>"org.eclipse.ui.actionSet"</code>).
*
* @param actionSetId the action set id
*/
public void addActionSet(String actionSetId);
/**
* Adds the view with the given compound id to the page layout as a fast view.
* See the {@link 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 <code>"org.eclipse.ui.views"</code>).
*
* @param viewId the compound id of the view to be added
* @since 2.0
*/
public void addFastView(String viewId);
/**
* Adds the view with the given compound id to the page layout as a fast view
* with the given width ratio.
* See the {@link 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 <code>"org.eclipse.ui.views"</code>).
*
* @param viewId the compound id of the view to be added
* @param ratio the percentage of the workbench the fast view will cover
* @since 2.0
*/
public void addFastView(String viewId, float ratio);
/**
* Adds a new wizard shortcut to the page layout.
* These are typically shown in the UI to allow rapid navigation to appropriate new wizards.
* For example, in the Eclipse IDE, these appear as items under the File > New menu.
* The id must name a new wizard extension contributed to the
* workbench's new wizards extension point (named <code>"org.eclipse.ui.newWizards"</code>).
*
* @param id the wizard id
*/
public void addNewWizardShortcut(String id);
/**
* Adds a perspective shortcut to the page layout.
* These are typically shown in the UI to allow rapid navigation to appropriate new wizards.
* For example, in the Eclipse IDE, these appear as items under the Window > Open Perspective menu.
* The id must name a perspective extension contributed to the
* workbench's perspectives extension point (named <code>"org.eclipse.ui.perspectives"</code>).
*
* @param id the perspective id
*/
public void addPerspectiveShortcut(String id);
/**
* 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 {@link 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 <code>"org.eclipse.ui.views"</code>).
*
* @param viewId the compound view id (wildcards allowed)
* @param relationship the position relative to the reference part;
* one of <code>TOP</code>, <code>BOTTOM</code>, <code>LEFT</code>,
* or <code>RIGHT</code>
* @param ratio a ratio specifying how to divide the space currently occupied by the reference part,
* in the range <code>0.05f</code> to <code>0.95f</code>.
* 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.
* @param refId the id of the reference part; either a view id, a folder id,
* or the special editor area id returned by <code>getEditorArea</code>
*/
public void addPlaceholder(String viewId, int relationship, float ratio,
String refId);
/**
* Adds an item to the Show In prompter.
* The id must name a view contributed to the workbench's view extension point
* (named <code>"org.eclipse.ui.views"</code>).
*
* @param id the view id
*
* @since 2.1
*/
public void addShowInPart(String id);
/**
* Adds a show view shortcut to the page layout.
* These are typically shown in the UI to allow rapid navigation to appropriate views.
* For example, in the Eclipse IDE, these appear as items under the Window > Show View menu.
* The id must name a view contributed to the workbench's views extension point
* (named <code>"org.eclipse.ui.views"</code>).
*
* @param id the view id
*/
public void addShowViewShortcut(String id);
/**
* Adds a view with the given compound id to this page layout.
* See the {@link 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 <code>"org.eclipse.ui.views"</code>).
*
* @param viewId the compound view id
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -