本文整理汇总了Java中org.eclipse.ui.IPerspectiveDescriptor.getId方法的典型用法代码示例。如果您正苦于以下问题:Java IPerspectiveDescriptor.getId方法的具体用法?Java IPerspectiveDescriptor.getId怎么用?Java IPerspectiveDescriptor.getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.IPerspectiveDescriptor
的用法示例。
在下文中一共展示了IPerspectiveDescriptor.getId方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getActivePerspectiveId
import org.eclipse.ui.IPerspectiveDescriptor; //导入方法依赖的package包/类
/**
* Returns the active perspective id if there is one
*
* @return the active perspective id; <code>null</code> in case it could not be resolved.
*/
public static String getActivePerspectiveId()
{
IPerspectiveDescriptor perspective = getActivePerspectiveDescriptor();
if (perspective != null)
{
return perspective.getId();
}
return null;
}
示例2: perspectiveActivated
import org.eclipse.ui.IPerspectiveDescriptor; //导入方法依赖的package包/类
@Override
public void perspectiveActivated(IWorkbenchPage page,
IPerspectiveDescriptor perspective) {
switch (perspective.getId()) {
case IDebugUIConstants.ID_DEBUG_PERSPECTIVE:
WatchDogEventType.START_PERSPECTIVE.process(Perspective.DEBUG);
break;
case JavaUI.ID_PERSPECTIVE:
WatchDogEventType.START_PERSPECTIVE.process(Perspective.JAVA);
break;
default:
WatchDogEventType.START_PERSPECTIVE.process(Perspective.OTHER);
}
}
示例3: getBreadcrumbPreferenceKey
import org.eclipse.ui.IPerspectiveDescriptor; //导入方法依赖的package包/类
public String getBreadcrumbPreferenceKey( )
{
IPerspectiveDescriptor perspective = getSite( ).getPage( )
.getPerspective( );
if ( perspective == null )
return null;
return EDITOR_SHOW_BREADCRUMB + "." + perspective.getId( ); //$NON-NLS-1$
}
示例4: getPreferenceKey
import org.eclipse.ui.IPerspectiveDescriptor; //导入方法依赖的package包/类
/**
* Returns the preference key for the breadcrumb. The
* value depends on the current perspective.
*
* @return the preference key or <code>null</code> if there's no perspective
*/
private String getPreferenceKey() {
IPerspectiveDescriptor perspective= fPage.getPerspective();
if (perspective == null)
return null;
return GraphicalEditorWithFlyoutPalette.EDITOR_SHOW_BREADCRUMB + "." + perspective.getId(); //$NON-NLS-1$
}
示例5: getPreferenceKey
import org.eclipse.ui.IPerspectiveDescriptor; //导入方法依赖的package包/类
/**
* Returns the preference key for the breadcrumb. The value depends on the current perspective.
*
* @return the preference key to use
*/
private String getPreferenceKey() {
IPerspectiveDescriptor perspective= fPage.getPerspective();
String perspectiveID= perspective != null ? perspective.getId() : "<unknown>"; //$NON-NLS-1$
return JavaEditor.EDITOR_SHOW_BREADCRUMB + "." + perspectiveID; //$NON-NLS-1$
}
示例6: getBreadcrumbPreferenceKey
import org.eclipse.ui.IPerspectiveDescriptor; //导入方法依赖的package包/类
/**
* Returns the preference key for the breadcrumb. The
* value depends on the current perspective.
*
* @return the preference key or <code>null</code> if there's no perspective
* @since 3.4
*/
String getBreadcrumbPreferenceKey() {
IPerspectiveDescriptor perspective= getSite().getPage().getPerspective();
if (perspective == null)
return null;
return JavaEditor.EDITOR_SHOW_BREADCRUMB + "." + perspective.getId(); //$NON-NLS-1$
}