09-11-2009 03:48 PM - edited 09-11-2009 04:00 PM
Several bb-ant-tools users have brought to my attention some changes that have been made in JDE 4.7.0 in regards to application icon handling.
It seems you can now set your focus icon via project settings. Furthermore you can set multiple application icons and focus icons for a given project (though I have no idea why).
So I want to add this feature to bb-ant-tools but I am struggling with how this should look and the most logical solution is to ask the users! (I think there are a few of you here correct?)
The first idea that comes to mind is add another attribute to the <jdp> element, and extend it to support a comma delimited list of icon paths:
<jdp icon="appicon1.png,appicon2.png" focusicon="focus1.png,focus2.png" />
Advantage to this is it's backwards compatible with existing build scripts. Another advantage to this is putting project settings in a .properties file would still work, eg:
icon = appicon1.png,appicon2.png
focusicon = focus1.png,focus2.png
<!-- build.xml -->
<jdp file="project.properties" />
The disadvantage is that it suffers from an existing problem that bb-ant-tools has always had. The path specified in the icon and focusicon attributes is relative to the build directory which can be counter intuitive to say the least.
Another possible syntax:
<icon file="path/to/appicon1.png" />
<icon file="path/to/appicon2.png" />
<icon file="path/to/focus1.png" focus="true" />
<icon file="path/to/focus2.png" focus="true" />
In this example, bb-ant-tools can leverage ant to verify the path of the file and generate a build error when it is not found. Then automagically adjust the path appropriately when calling the rapc compiler.
The disadvantage to this is that it breaks compatibility with old scripts (however, I can just leave the existing icon attribute there and deprecate it) and it means .properties files can't be used to list application icons.
Ideas? Suggestions? Comments?
10-01-2009 12:23 AM
Going with the best solution and possibly depricating the old seems like it would work best.
Couple of questions:
1. why have <icon .... focus=true>, why not have <icon> and <focusicon>? I think this is more explicit and less apt to user error.
2. the icon and focusicon nested elements could support fileset.
<icon fileset="appicon*.png" />
<focusicon fileset="focus*.png" />
02-16-2010 05:29 PM
I finally sat down and hacked this out. You can find the latest release on the sourceforge page: https://sourceforge.net/projects/bb-ant-tools/
I went with the easiest/quickest sollution which was to use the existing syntax along with a new attribute for the rollover icon. Example:
<rapc ...> <jdp icon="icon.png" focusIcon="focus.png" /> </rapc>