Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Problem setting Category in propertysheets
Problem setting Category in propertysheets [message #169478] Fri, 12 December 2003 06:50 Go to next message
Mark is currently offline MarkFriend
Messages: 29
Registered: July 2009
Junior Member
Hi All,

I am having problems setting categories in property sheet.I can set the
root categories, but not the sub categories.I have something like this.

Misc
Loc
Size
Select
Entry1.1[property descriptor for this has category="Select"]
Entry1.2[property descriptor for this has category="Select"]
Category1.1
Entry1.1.1[property descriptor for this has
category="Category1.1"]
Entry1.1.2[property descriptor for this has
category="Category1.1"]
From
Entry2.1[property descriptor for this has category="From"]

I am able to see the Misc,Select and From categories.
But not Category1.1

Any idea why this is happenning..
Does categories only means Root categories.Cant we create sub categories
like ?Category1.1??
On debugging i found that in PropertySheetViewer, updateCategories() is
getting called for the Root categories[i.e for Misc,Select,From].
But for the sub-category Category1.1 it is not getting called...Can this
be the issue??

What am i doing wrong here???

Rgds,
Mark
Re: Problem setting Category in propertysheets [message #169677 is a reply to message #169478] Fri, 12 December 2003 15:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

How did you try to tell the property sheet there where nested categories?

The reason I ask is because there is nothing in the API that let's you
define category structure. The API doesn't even let you define specific
categories. Categories are discovered and not declared. They are
discovered by asking the property descriptor for its category name.
That's it, there is nothing else available for categories.

--
Thanks, Rich Kulp

Re: Problem setting Category in propertysheets [message #169838 is a reply to message #169677] Fri, 12 December 2003 18:37 Go to previous messageGo to next message
Mark is currently offline MarkFriend
Messages: 29
Registered: July 2009
Junior Member
Rich Kulp wrote:

> How did you try to tell the property sheet there where nested categories?

> The reason I ask is because there is nothing in the API that let's you
> define category structure. The API doesn't even let you define specific
> categories. Categories are discovered and not declared. They are
> discovered by asking the property descriptor for its category name.
> That's it, there is nothing else available for categories.

Hi Rich,

I use the same api,proeprtyDescriptor.setCategory("Category1.1");
But i dont get the desired behaviour. Let me explain once again.

What i want to see in the property sheet is this structure
Select
Entry1.1
Entry1.2
Category1.1
Entry1.1.1
Entry1.1.2
From
Entry2.1

In the above Select,From and Category1.1 are categories.Others are entries.
To achieve the above what i have done is

Select
Entry1.1[propertyDescriptor.setCategory("Select")]
Entry1.2[propertyDescriptor.setCategory("Select")]
Category1.1
Entry1.1.1[propertyDescriptor.setCategory("Category1.1")]
Entry1.1.2[propertyDescriptor.setCategory("Category1.1")]
From
Entry2.1[propertyDescriptor.setCategory("From")]

BUT after doing this what i see is

Select
Entry1.1
Entry1.2
Entry1.1.1[THIS IS WORONG,it is ignoring my category settings]
Entry1.1.2[THIS IS WORONG,it is ignoring my category settings]
From
Entry2.1

Hope my question is clear...Now for some ansewers???
Even though i am setting the categories for the descriptors,why is it
being ignored.Are categories only for Root entries in the property sheet.
Cant we define categories for sub entrys???

Rgds,
Mark
Re: Problem setting Category in propertysheets [message #169876 is a reply to message #169838] Fri, 12 December 2003 20:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

There is no way to nest categories. All you can do is say what category
a property descriptor is in. If you notice there is nothing anywhere
which you can use to say a category is nested. That is because you don't
define the categories. They are discovered simply as strings from the
property descriptor. It simply gathers all of the strings together from
all of the root property descriptors in a set (i.e. ignore duplicates).
Then it creates a category for each root entry.

Why do you think that just doing setCategory("Category 1.1") would cause
a category to be nested? It is simply a string.

Or are you thinking of nested properties (where a property is a
subproperty of another, and you want the categorization to occur for the
nested properties)? If this is the case you aren't asking for nested
categories, you are asking for categories within the nested properties.
Which is different than nested categories. In that case the
PropertySheetViewer will not do categorization of nested properties. It
just doesn't.

--
Thanks, Rich Kulp

Re: Problem setting Category in propertysheets [message #169962 is a reply to message #169876] Fri, 12 December 2003 22:23 Go to previous message
Mark is currently offline MarkFriend
Messages: 29
Registered: July 2009
Junior Member
Rich Kulp wrote:

> There is no way to nest categories. All you can do is say what category
> a property descriptor is in. If you notice there is nothing anywhere
> which you can use to say a category is nested. That is because you don't
> define the categories. They are discovered simply as strings from the
> property descriptor. It simply gathers all of the strings together from
> all of the root property descriptors in a set (i.e. ignore duplicates).
> Then it creates a category for each root entry.

Thanks,Understood this!!!!

> Why do you think that just doing setCategory("Category 1.1") would cause
> a category to be nested? It is simply a string.

Hey,If For Root Entries this API works,then i naturaly expect it to work
for sub-entries.Eclipse makes the difference between root entries and
sub-entries.
I dont!!!!It's simply a string.But this "simple string" works for root
entries while it doesnt for sub-entries..I guess as an API then
setCategory could be misleading..

> Or are you thinking of nested properties (where a property is a
> subproperty of another, and you want the categorization to occur for the
> nested properties)? If this is the case you aren't asking for nested
> categories, you are asking for categories within the nested properties.
> Which is different than nested categories. In that case the
> PropertySheetViewer will not do categorization of nested properties. It
> just doesn't.

Yep,this is what i am trying to achieve.And from ur posting,its not
possible.I guess i should go about in some other way in achieving
this.[found a possible solution in PropertyView article]
Thanks very much for ur inputs..

Rgds,
Mark
Previous Topic:update site bookmark seems broke in 2.0
Next Topic:Extension Point by open a file
Goto Forum:
  


Current Time: Wed Sep 04 23:18:16 GMT 2024

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

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

Back to the top