【问题标题】:eclipse rcp product set tab style not workeclipse rcp 产品集选项卡样式不起作用
【发布时间】:2013-09-25 15:42:30
【问题描述】:

我使用 eclipse kepler(用于 RCP 和 RAP 开发人员的 Eclipse)开发了一个 rcp 产品,但设置选项卡样式不起作用。 我尝试了两种方法

1.config.xml

<extension  id="product" point="org.eclipse.core.runtime.products">
 <product  application="cn.desktoptool.application" name="cn.test">
     <property name="preferenceCustomization" value="plugin_customization.ini"/>
 </product>

和 plugin_customization.ini 文件

org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=false

2.在ApplicationWorkbenchAdvisor类中添加代码

PlatformUI.getPreferenceStore().setValue( IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS, false);

但是不行,有什么问题?

【问题讨论】:

    标签: eclipse-rcp


    【解决方案1】:

    在 Eclipse 4.3 (Kepler) 中不使用此首选项,因为样式由 CSS 控制。

    要更改选项卡样式,您可以定义自己的样式,也可以编辑现有的css 文件之一(在org.eclipse.platform 插件css 目录中)。

    标签样式由swt-simple属性控制,通常为.MPartStack类设置:

    .MPartStack {
        swt-simple: true;
        .. other properties ...
    }
    

    true 为您提供传统标签。

    更多关于 CSS 样式和创建样式的信息在这里:http://www.vogella.com/articles/Eclipse4CSS/article.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-31
      • 2013-07-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多