Tabbed property view

1.add Dependences:org.eclipse.ui.views.properties.tabbed

2.add 3 extentions:

    1:org.eclipse.ui.views.properties.tabbed.propertyContributor主要设置其ID并定义一个Category

    这个是全局性的,要使用该propertyContributor的part必须实现ITabbedPropertySheetPageContributor接口

    重写两个方法:

     public String getContributorId() {
      

        return BpmnDiagramEditor.ID_PROPERTY_SHEET_PAGE;// 该propertyContributor的ID

      }


    @Override
     public Object getAdapter(Class type) {
        if (type == IPropertySheetPage.class)
{
          return getTabbedPropertySheetPage();
        }  

        return super.getAdapter(type);
     }

     protected TabbedPropertySheetPage getTabbedPropertySheetPage() {
       if (propertySheetPage == null) {
        propertySheetPage = new TabbedPropertySheetPage(this);
       }
        return propertySheetPage;
     }   

     2:org.eclipse.ui.views.properties.tabbed.propertyTabs:

      首先设置contributorId 为刚才的ID,凡是用到的contributorId 均是一致的。

      并定义所需的Tab

       3:org.eclipse.ui.views.properties.tabbed.propertySections

       设置contributorId(同上),定义Sections, 每一个Section对应于一个上面定义的Tab,

       Section用来定制页面的显示,必须为其提供一个Input类型,否则不可用。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值