Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Different Properties in properties view for multiple objects selction
Different Properties in properties view for multiple objects selction [message #890176] Thu, 21 June 2012 11:29 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

I would like to have different properties available in properties view when multiple objects are selected. For example if one object is selected the it shows name property but when multiple objects are selected then name property should not be available as i want each object to have unique name.


any idea how to acheive that?

Cheers,
Re: Different Properties in properties view for multiple objects selction [message #892824 is a reply to message #890176] Fri, 29 June 2012 22:48 Go to previous message
Simon Scholz is currently offline Simon ScholzFriend
Messages: 73
Registered: April 2012
Location: Germany
Member
Hi ModelGeek,

What kinds of org.eclipse.ui.views.properties.IPropertyDescriptor do you use?

Maybe you could take a look at this method, which is defined by the org.eclipse.ui.views.properties.IPropertyDescriptor :
    /**
     * Returns whether this property descriptor and the given one are compatible.
     * <p>
     * The property sheet uses this method during multiple selection to determine
     * whether two property descriptors with the same id are in fact the same 
     * property and can be displayed as a single entry in the property sheet.
     * </p>
     *
     * @param anotherProperty the other property descriptor 
     * @return <code>true</code> if the property descriptors are compatible, and 
     *   <code>false</code> otherwise
     */
    public boolean isCompatibleWith(IPropertyDescriptor anotherProperty);


You could derive your own class from the default org.eclipse.ui.views.properties.PropertyDescriptor and override the isCompatibleWith method, or use the org.eclipse.ui.views.properties.PropertyDescriptor#setAlwaysIncompatible(boolean flag) method, so that the isCompatibleWith always returns false.

I hope this is what you actually want to achieve and that I was able to help you again.
Do not hesitate to ask further question, if something is unclear or I missunderstood what you really want to achieve.

Best regards,

Simon
Previous Topic:can not deactivate handler (only toolbar)
Next Topic:How to remove RCP view icon?
Goto Forum:
  


Current Time: Thu Oct 10 09:12:19 GMT 2024

Powered by FUDForum. Page generated in 0.03583 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top