You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/09/23 11:10:17 UTC

[GitHub] [netbeans] JaroslavTulach commented on pull request #2387: [NETBEANS-4830] Integrate SVG icons drawn so far

JaroslavTulach commented on pull request #2387:
URL: https://github.com/apache/netbeans/pull/2387#issuecomment-697295159


   I know there is a discussion raging on about SVG icon registry. However I believe it is an orthogonal problem which shall not be blocked by the way we organize our icons (CCing @lkishalmi) - if we are just replacing `wait.png` by `wait.svg` we should go on.
   
   One enhancement has however recently come to my mind: We could use [@StaticResource annotation](https://bits.netbeans.org/12.0/javadoc/org-netbeans-api-annotations-common/org/netbeans/api/annotations/common/StaticResource.html) - it wasn't there when people started to copy `wait.png` to thirty different places, but it was later designed to avoid doing that. Nobody just had enough incentives to fix all the copies. Could we use the switch to SVG as an opportunity to cleanup the copies?
   
   Just find a common module all other depend on and place the `wait.svg` in there. Let's suppose it ends up in `org/openide/awt/resources/wait.svg`. Then let all other modules declare a dependency on the resource by:
   ```java
   @StaticResource
   private static final String WAIT_SVG = "org/openide/awt/resources/wait.svg";
   ```
   That basically forms a "compile time" API, as the annotation's processor is going to fail if somebody removes the icon. No need for too many copies. Enough to share it.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists