开发者

Opening IProject properties when another (adaptable to IProject) object is selected

开发者 https://www.devze.com 2022-12-23 07:04 出处:网络
I have a custom view displaying a hierarchy model of the current project. The root element is of class MyProject which is my own class, but it represents one Eclipse IProject, and it\'s adaptable to I

I have a custom view displaying a hierarchy model of the current project. The root element is of class MyProject which is my own class, but it represents one Eclipse IProject, and it's adaptable to IProject.

I have a "properties" menu option in the popup menu for that view, and I'd like to open up IProject's properties when a MyProject object is selected. PropertyDialogAction only looks for property pages registered for MyProject and doesn't give me a chance to offer an adapter -- or, at least, I don't know how to offer one.

What's the proper solution for this?

In the meantime, I've overridden PropertyDialogAction to handle my class开发者_高级运维 in the special way I require, but that seems like quite a kludge to get this done.


How did you add the Properties in the Popup menu? Ideally its functionality is to show up the property pages of the current selection - not to show up the properties of the project in which the current selection resides. If you want that, you need to use the menu item Project->Properties - which uses the ProjectPropertyDialogAction instead of the PropertyDialogAction

0

精彩评论

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

关注公众号