开发者

on Eclipse plug-in:how to implement such a property view?

开发者 https://www.devze.com 2022-12-31 18:11 出处:网络
I want to display a array of 开发者_JAVA百科objects in PropertyView/PropertySheet,just like this:

I want to display a array of 开发者_JAVA百科objects in PropertyView/PropertySheet,just like this:

on Eclipse plug-in:how to implement such a property view?

How to do it? thx.


You can follow this eclipse tips: creating a custom property view, based on PageBookView (which is the kind of view which displays the properties of the selected element in the active part. Whenever the selection changes or the active part changes, it tracks them and displays the properties, unless you used the 'Pin to selection' feature available from 3.5).

on Eclipse plug-in:how to implement such a property view?

<view
  class="com.eclipse_tips.views.CustomPropertiesView"
  icon="icons/sample.gif"
  id="com.eclipse-tips.views.customePropertiesView"
  name="My Properties View">
</view>

Followed by:

public class CustomPropertiesView extends PropertySheet {

 @Override
 protected boolean isImportant(IWorkbenchPart part) {
  if (part.getSite().getId().equals(IPageLayout.ID_PROJECT_EXPLORER))
   return true;
  return false;
 }
}

Now this would react to properties from the project explorer (and not your own set of properties).
So you need to get back to the PageBookView article and see how to implement your own display.

0

精彩评论

暂无评论...
验证码 换一张
取 消