Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Append to preference
Append to preference [message #1727123] Sat, 19 March 2016 13:55 Go to next message
kon f is currently offline kon fFriend
Messages: 152
Registered: March 2012
Senior Member
Hey Smile

I was wondering if it is possible to append some values to a preference task. I read this here, where Eike mentioned this feature on the road map.

In my use case, I would like to append some values to org.eclipse.ui.workbench/ENABLED_DECORATORS instead of setting the whole value.

Thank you Smile

Kon
Re: Append to preference [message #1727171 is a reply to message #1727123] Sun, 20 March 2016 18:50 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 19.03.2016 um 14:55 schrieb kon f:
> Hey :)
>
> I was wondering if it is possible to append some values to a preference task. I read this
> https://www.eclipse.org/forums/index.php/t/1069172/, where Eike mentioned this feature on the road map.
>
> In my use case, I would like to append some values to org.eclipse.ui.workbench/ENABLED_DECORATORS instead of setting
> the whole value.
I leave this question for Ed, who has been working on preference merging...

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Append to preference [message #1727586 is a reply to message #1727123] Thu, 24 March 2016 08:46 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 19.03.2016 um 14:55 schrieb kon f:
> Hey :)
>
> I was wondering if it is possible to append some values to a preference task. I read this
> https://www.eclipse.org/forums/index.php/t/1069172/, where Eike mentioned this feature on the road map.
>
> In my use case, I would like to append some values to org.eclipse.ui.workbench/ENABLED_DECORATORS instead of setting
> the whole value.
I've just implemented this feature:

490354: Add ListPreferenceHandler for org.eclipse.ui.workbench/ENABLED_DECORATORS
https://bugs.eclipse.org/bugs/show_bug.cgi?id=490354

Because Neon M6 will be delayed til next Monday or Tuesday I'll respin our M6 today, so that the new feature will become
part of it.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Append to preference [message #1729074 is a reply to message #1727586] Sun, 10 April 2016 20:43 Go to previous messageGo to next message
kon f is currently offline kon fFriend
Messages: 152
Registered: March 2012
Senior Member
Hey Eike,

thank you for the implementation. I investigated the source and it took me while to extract the actual changes since also added some refactorings Smile You added a filter for //instance/org.eclipse.ui.workbench/ENABLED_DECORATORS so the value is just added instead replacing the whole value, right?

I needed it for the Eclipaint-Plugin. Now I can group the feature, the uri and the label decoration in one compound task Smile

  <setupTask
      xsi:type="setup:PreferenceTask"
      key="/instance/org.eclipse.ui.workbench/ENABLED_DECORATORS"
      value="org.eclipaint.manager.decorator.icons.folder:true,org.eclipaint.manager..decorator.icons:true">
  </setupTask>
  <setupTask
      xsi:type="setup.p2:P2Task"
      label="EcliPaint">
    <requirement
        name="org.eclipaint.feature.feature.group"/>
    <repository
        url="https://raw.githubusercontent.com/jabiercoding/eclipaint/master/updatesite/org.eclipaint.site/"/>
  </setupTask>
</setup:CompoundTask>


This is how the result looks like (it shows the actual icons instead a default icon):

index.php/fa/25615/0/

I was just wondering why this behavior doesn't come out of the box? Why showing a default icon if the actual icon has the same size?

Best regards,

Konstantin
  • Attachment: icons.png
    (Size: 38.51KB, Downloaded 576 times)

[Updated on: Tue, 12 April 2016 11:16]

Report message to a moderator

Re: Append to preference [message #1729119 is a reply to message #1729074] Mon, 11 April 2016 10:54 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 10.04.2016 um 22:43 schrieb kon f:
> Hey Eike,
>
> thank you for the implementation. I investigated the source and it took me while to extract the actual changes since also added some refactorings :) You added a filter for //instance/org.eclipse.ui.workbench/ENABLED_DECORATORS so the value is just added instead replacing the whole value, right?
Right. Note, though, that it never removes values (decorators). In this case this might become a problem, depending on
the implementation in org.eclipse.ui.workbench, which I haven't checked. The reason is that org.eclipse.ui.workbench
maintains two list preferences, one for ENABLED_DECORATORS and one for DISABLED_DECORATORS. I have no clue why that is
needed ;-(

>
> I needed it for the https://github.com/jabiercoding/eclipaint/wiki. Now I can group the feature, the uri and the label decoration in one compound task :)
>
>
> <setupTask
> xsi:type="setup:PreferenceTask"
> key="/instance/org.eclipse.ui.workbench/ENABLED_DECORATORS"
> value="org.eclipaint.manager.decorator.icons.folder:true,org.eclipaint.manager..decorator.icons:true">
> </setupTask>
> <setupTask
> xsi:type="setup.p2:P2Task"
> label="EcliPaint">
> <requirement
> name="org.eclipaint.feature.feature.group"/>
> <repository
> url="https://raw.githubusercontent.com/jabiercoding/eclipaint/master/updatesite/org.eclipaint.site/"/>
> </setupTask>
> <description>Enables the java type decorator e.g. shows an I for interface types</description>
> </setup:CompoundTask>
>
>
> This is how the result looks like (it shows the actual icons instead a default icon):
Very nice!

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Append to preference [message #1729639 is a reply to message #1729119] Sat, 16 April 2016 14:37 Go to previous message
kon f is currently offline kon fFriend
Messages: 152
Registered: March 2012
Senior Member
I created a feature request (491854) and asked if this could be the default behavior.

Thank you again for the help Smile
Previous Topic:Is it possible to not show the "Projects" and "Variables" page of the installer?
Next Topic:Preference priorities
Goto Forum:
  


Current Time: Fri Apr 26 07:38:10 GMT 2024

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

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

Back to the top