Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to sort the preferences pages ?
How to sort the preferences pages ? [message #332893] Thu, 13 November 2008 00:34 Go to next message
Mabu is currently offline MabuFriend
Messages: 9
Registered: July 2009
Junior Member
Hi
I've created a few pages preferences using the plugin
org.eclipse.ui.preferences. But the problem is I want the General
preference page is always at the top and other preferences pages are
listed in alphabetical order as Eclipse did. For example:
root -> General (node - preference page)
-> A (node - preference page)
-> B (node - preference page)
-> C (node - preference page)
-> ...

Does anybody kwnow how Eclipse have done that for their preferences
pages?

Thanks for your help.
Re: How to sort the preferences pages ? [message #332899 is a reply to message #332893] Thu, 13 November 2008 09:30 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
You need to specify root as the parent of the A, B & C preference pages

- Prakash
--
http://blog.eclipse-tips.com


"Mabu " <hoangtonghop@yahoo.com> wrote in message
news:fef81559ad51156a1233d3271312e231$1@www.eclipse.org...
> Hi
> I've created a few pages preferences using the plugin
> org.eclipse.ui.preferences. But the problem is I want the General
> preference page is always at the top and other preferences pages are
> listed in alphabetical order as Eclipse did. For example:
> root -> General (node - preference page)
> -> A (node - preference page)
> -> B (node - preference page)
> -> C (node - preference page)
> -> ...
>
> Does anybody kwnow how Eclipse have done that for their preferences
> pages?
>
> Thanks for your help.
>
Re: How to sort the preferences pages ? [message #332904 is a reply to message #332899] Thu, 13 November 2008 13:27 Go to previous messageGo to next message
Mabu is currently offline MabuFriend
Messages: 9
Registered: July 2009
Junior Member
I did it by using the option Category of the plugin
org.eclipse.ui.preferencePages for indicating the location of the
preference pages in the tree but when i open the preferences dialog, the
tree automatically sorted the node names by alphabetical order. So I don't
know how to specify the root of the nodes as you say. Please tell me more
details about this.

Thanks a lot!
Re: How to sort the preferences pages ? [message #332924 is a reply to message #332904] Fri, 14 November 2008 09:15 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
The category for A,B&C should be the id of the root. Is it possible to share
the plugin.xml ?

- Prakash
--

http://blog.eclipse-tips.com

"Mabu " <hoangtonghop@yahoo.com> wrote in message
news:9407c2a44146c500430ea859496730b4$1@www.eclipse.org...
> I did it by using the option Category of the plugin
> org.eclipse.ui.preferencePages for indicating the location of the
> preference pages in the tree but when i open the preferences dialog, the
> tree automatically sorted the node names by alphabetical order. So I don't
> know how to specify the root of the nodes as you say. Please tell me more
> details about this.
>
> Thanks a lot!
>
>
Re: How to sort the preferences pages ? [message #332928 is a reply to message #332924] Fri, 14 November 2008 14:00 Go to previous message
Mabu is currently offline MabuFriend
Messages: 9
Registered: July 2009
Junior Member
In fact, the preferences pages I created are in some different plug-ins so
I can't share all of them, just an example:

<extension point="org.eclipse.ui.preferencePages">
<page
class="RootPage"
id="root"
name="Root">
</page>
<page
category="root"
class="GeneralPage"
id="general"
name="General">
</page>
<page
category="root"
class="APage"
id="A"
name="A">
</page>
<page
category="root"
class="BPage"
id="B"
name="B">
</page>
<page
category="root"
class="CPage"
id="C"
name="C">
</page>
<page
category="root"
class="XPage"
id="X"
name="X">
</page>

</extension>

I grouped all the preferences pages by using the id of the root. The
result I received is
root -> A (node - preference page)
-> B (node - preference page)
-> C (node - preference page)
-> General (node - preference page)
-> X

But I want General node is always at the top.
Previous Topic:Key bindings / Listen for changes
Next Topic:How can I get notified when java build path is changed
Goto Forum:
  


Current Time: Sat Oct 19 22:55:40 GMT 2024

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

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

Back to the top