当前位置: 首页>>代码示例>>Java>>正文


Java StackPresentation类代码示例

本文整理汇总了Java中org.eclipse.ui.presentations.StackPresentation的典型用法代码示例。如果您正苦于以下问题:Java StackPresentation类的具体用法?Java StackPresentation怎么用?Java StackPresentation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


StackPresentation类属于org.eclipse.ui.presentations包,在下文中一共展示了StackPresentation类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createEditorPresentation

import org.eclipse.ui.presentations.StackPresentation; //导入依赖的package包/类
public StackPresentation createEditorPresentation(Composite parent,
        IStackPresentationSite site) {
    VSEditorStackPresentation presentation = new VSEditorStackPresentation(parent, site, true);
    synchronized(VSImprovedPresentationFactory.class){
        editorPresentations.add(presentation);
    }
    return presentation;
}
 
开发者ID:iloveeclipse,项目名称:skin4eclipse,代码行数:9,代码来源:VSImprovedPresentationFactory.java

示例2: createViewPresentation

import org.eclipse.ui.presentations.StackPresentation; //导入依赖的package包/类
public StackPresentation createViewPresentation(Composite parent,
        IStackPresentationSite site) {
    return new VSViewStackPresentation(parent, site, true);
}
 
开发者ID:iloveeclipse,项目名称:skin4eclipse,代码行数:5,代码来源:VSImprovedPresentationFactory.java

示例3: createStandaloneViewPresentation

import org.eclipse.ui.presentations.StackPresentation; //导入依赖的package包/类
public StackPresentation createStandaloneViewPresentation(Composite parent,
        IStackPresentationSite site, boolean showTitle) {
    return new VSViewStackPresentation(parent, site, true);
}
 
开发者ID:iloveeclipse,项目名称:skin4eclipse,代码行数:5,代码来源:VSImprovedPresentationFactory.java

示例4: setUp

import org.eclipse.ui.presentations.StackPresentation; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
    super.setUp();
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    Point size = window.getShell().getSize();
    /*
     * wide enough to be able to resize views, hight enough to paint tabs + toolbars
     */
    size.x = 1050;
    size.y = 220;
    window.getShell().setSize(size);
    IWorkbenchPage activePage = window.getActivePage();

    activePage.closeAllPerspectives(false, false);
    activePage.setPerspective(PlatformUI.getWorkbench().getPerspectiveRegistry()
            .findPerspectiveWithId("EclipseSkins-test.perspective1"));
    display.update();

    for (String id : MyPerspectiveFactory.ALL) {
        IViewPart part = activePage.showView(id);
        activePage.activate(part);
        display.update();
        if (id.equals(CONSOLE_ID)) {
            console = part;
            /*
             * get console IPresentablePart
             */
            Method method2 = StackPresentation.class.getDeclaredMethod("getSite",
                    (Class[]) null);
            method2.setAccessible(true);
            StackPresentation pres = ((ViewStack) ((ViewSite) console.getSite())
                    .getPane().getStack()).getTestPresentation();
            IStackPresentationSite tlSite = (IStackPresentationSite) method2.invoke(
                    pres, (Object[]) null);
            consolePresPart = tlSite.getSelectedPart();
        }
    }

    Platform.getJobManager().cancel(null);
    Platform.getJobManager().suspend();
    display.update();
}
 
开发者ID:iloveeclipse,项目名称:skin4eclipse,代码行数:43,代码来源:TestBug128455.java

示例5: createEditorPresentation

import org.eclipse.ui.presentations.StackPresentation; //导入依赖的package包/类
public StackPresentation createEditorPresentation(Composite parent,
		IStackPresentationSite site) {
	DefaultTabFolder folder = new DefaultTabFolder(parent,
			editorTabPosition | SWT.BORDER, site
					.supportsState(IStackPresentationSite.STATE_MINIMIZED),
			site.supportsState(IStackPresentationSite.STATE_MAXIMIZED));

	/*
	 * Set the minimum characters to display, if the preference is something
	 * other than the default. This is mainly intended for RCP applications
	 * or for expert users (i.e., via the plug-in customization file).
	 * 
	 * Bug 32789.
	 */
	final IPreferenceStore store = PlatformUI.getPreferenceStore();
	if (store
			.contains(IWorkbenchPreferenceConstants.EDITOR_MINIMUM_CHARACTERS)) {
		final int minimumCharacters = store
				.getInt(IWorkbenchPreferenceConstants.EDITOR_MINIMUM_CHARACTERS);
		if (minimumCharacters >= 0) {
			folder.setMinimumCharacters(minimumCharacters);
		}
	}

	PresentablePartFolder partFolder = new PresentablePartFolder(folder);

	TabbedStackPresentation result = new TabbedStackPresentation(site,
			partFolder, new StandardEditorSystemMenu(site));

	DefaultThemeListener themeListener = new DefaultThemeListener(folder,
			result.getTheme());
	result.getTheme().addListener(themeListener);

	new DefaultMultiTabListener(result.getApiPreferences(),
			IWorkbenchPreferenceConstants.SHOW_MULTIPLE_EDITOR_TABS, folder);

	new DefaultSimpleTabListener(result.getApiPreferences(),
			IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS,
			folder);

	return result;
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:43,代码来源:UnOpenAgainEditorPresentationFactory.java


注:本文中的org.eclipse.ui.presentations.StackPresentation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。