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 2018/10/31 04:39:06 UTC

[GitHub] tmysik closed pull request #996: [NETBEANS-1575] Change twig and smarty file icons

tmysik closed pull request #996: [NETBEANS-1575] Change twig and smarty file icons
URL: https://github.com/apache/incubator-netbeans/pull/996
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/php/php.smarty/licenseinfo.xml b/php/php.smarty/licenseinfo.xml
index 202e8835a4..e497e29c41 100644
--- a/php/php.smarty/licenseinfo.xml
+++ b/php/php.smarty/licenseinfo.xml
@@ -36,4 +36,9 @@
         <license ref="Apache-2.0-ASF" />
         <comment type="COMMENT_UNSUPPORTED" />
     </fileset>
+    <fileset>
+        <file>src/org/netbeans/modules/php/smarty/resources/tpl-icon.png</file>
+        <license ref="CDDL-1.0" />
+        <comment type="COMMENT_UNSUPPORTED" />
+    </fileset>
 </licenseinfo>
diff --git a/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/TplDataObject.java b/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/TplDataObject.java
index 6f8e380e03..4d2e3901c0 100644
--- a/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/TplDataObject.java
+++ b/php/php.smarty/src/org/netbeans/modules/php/smarty/editor/TplDataObject.java
@@ -36,6 +36,7 @@
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.logging.Level;
 import java.util.logging.Logger;
+import org.netbeans.api.annotations.common.StaticResource;
 import org.netbeans.api.html.lexer.HTMLTokenId;
 import org.netbeans.api.lexer.Token;
 import org.netbeans.api.lexer.TokenHierarchy;
@@ -92,7 +93,8 @@
     /**
      * Constant where is placed standard TPL file icon.
      */
-    private static final String ICON_LOCATION = "org/netbeans/modules/php/smarty/resources/tpl-cc-icon.png"; //NOI18N
+    @StaticResource
+    private static final String ICON_LOCATION = "org/netbeans/modules/php/smarty/resources/tpl-icon.png"; //NOI18N
 
     private static final Logger LOG = Logger.getLogger(TplDataObject.class.getName());
 
diff --git a/php/php.smarty/src/org/netbeans/modules/php/smarty/resources/layer.xml b/php/php.smarty/src/org/netbeans/modules/php/smarty/resources/layer.xml
index 12b7d8e367..348ecf40ef 100644
--- a/php/php.smarty/src/org/netbeans/modules/php/smarty/resources/layer.xml
+++ b/php/php.smarty/src/org/netbeans/modules/php/smarty/resources/layer.xml
@@ -218,7 +218,7 @@
         <folder name="text">
             <folder name="x-tpl">
                 <!-- GSF -->
-                <attr name="iconBase" stringvalue="org/netbeans/modules/php/smarty/resources/tpl-cc-icon.png"/>
+                <attr name="iconBase" stringvalue="org/netbeans/modules/php/smarty/resources/tpl-icon.png"/>
                 <!-- eof GSF -->
             </folder>
         </folder>
@@ -228,7 +228,7 @@
     <folder name="Templates">
         <folder name="Scripting">
             <file name="SmartyTemplate.tpl" url="nbresloc:/org/netbeans/modules/php/smarty/resources/TplTemplate.tpl">
-                <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/php/smarty/resources/tpl-cc-icon.png"/>
+                <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/php/smarty/resources/tpl-icon.png"/>
                 <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.php.smarty.resources.Bundle"/>
                 <attr name="javax.script.ScriptEngine" stringvalue="freemarker"/>
                 <attr name="template" boolvalue="true"/>
diff --git a/php/php.smarty/src/org/netbeans/modules/php/smarty/resources/tpl-icon.png b/php/php.smarty/src/org/netbeans/modules/php/smarty/resources/tpl-icon.png
new file mode 100644
index 0000000000..b68cb78661
Binary files /dev/null and b/php/php.smarty/src/org/netbeans/modules/php/smarty/resources/tpl-icon.png differ
diff --git a/php/php.twig/licenseinfo.xml b/php/php.twig/licenseinfo.xml
index 11c6567aa7..be30848c75 100644
--- a/php/php.twig/licenseinfo.xml
+++ b/php/php.twig/licenseinfo.xml
@@ -37,4 +37,9 @@
         <license ref="Apache-2.0-ASF" />
         <comment type="COMMENT_UNSUPPORTED" />
     </fileset>
+    <fileset>
+        <file>src/org/netbeans/modules/php/twig/resources/twig-icon.png</file>
+        <license ref="CDDL-1.0" />
+        <comment type="COMMENT_UNSUPPORTED" />
+    </fileset>
 </licenseinfo>
diff --git a/php/php.twig/src/org/netbeans/modules/php/twig/editor/TwigDataObject.java b/php/php.twig/src/org/netbeans/modules/php/twig/editor/TwigDataObject.java
index ec2197ff1d..f32d1f8a8c 100644
--- a/php/php.twig/src/org/netbeans/modules/php/twig/editor/TwigDataObject.java
+++ b/php/php.twig/src/org/netbeans/modules/php/twig/editor/TwigDataObject.java
@@ -22,6 +22,7 @@
 package org.netbeans.modules.php.twig.editor;
 
 import java.io.IOException;
+import org.netbeans.api.annotations.common.StaticResource;
 import org.netbeans.core.spi.multiview.MultiViewElement;
 import org.netbeans.core.spi.multiview.text.MultiViewEditorElement;
 import static org.netbeans.modules.php.twig.editor.TwigDataObject.ACTIONS;
@@ -33,7 +34,6 @@
 import org.openide.filesystems.MIMEResolver;
 import org.openide.loaders.DataNode;
 import org.openide.loaders.DataObject.Registration;
-import org.openide.loaders.DataObjectExistsException;
 import org.openide.loaders.MultiDataObject;
 import org.openide.loaders.MultiFileLoader;
 import org.openide.nodes.Children;
@@ -44,7 +44,7 @@
 
 @Messages("TwigResolver=Twig Files")
 @MIMEResolver.ExtensionRegistration(displayName = "#TwigResolver", position = 125, extension = "twig", mimeType = TwigLanguage.TWIG_MIME_TYPE)
-@Registration(displayName = "TWIG", iconBase = "org/netbeans/modules/php/twig/resources/filter.png", mimeType = TwigLanguage.TWIG_MIME_TYPE)
+@Registration(displayName = "TWIG", iconBase = TwigDataObject.ICON_LOCATION, mimeType = TwigLanguage.TWIG_MIME_TYPE)
 @ActionReferences(value = {
     @ActionReference(id =
     @ActionID(category = "System", id = "org.openide.actions.OpenAction"), path = ACTIONS, position = 100, separatorAfter = 200),
@@ -66,7 +66,9 @@
     @ActionID(category = "System", id = "org.openide.actions.PropertiesAction"), path = ACTIONS, position = 1400)})
 public class TwigDataObject extends MultiDataObject {
 
-    static final String ACTIONS = "Loaders/" + TwigLanguage.TWIG_MIME_TYPE + "/Actions";
+    static final String ACTIONS = "Loaders/" + TwigLanguage.TWIG_MIME_TYPE + "/Actions"; // NOI18N
+    @StaticResource
+    static final String ICON_LOCATION = "org/netbeans/modules/php/twig/resources/twig-icon.png"; // NOI18N
 
     public TwigDataObject(FileObject pf, MultiFileLoader loader) throws IOException {
         super(pf, loader);
@@ -81,7 +83,7 @@ protected Node createNodeDelegate() {
     @Messages("Source=&Source")
     @MultiViewElement.Registration(
             displayName = "#Source",
-    iconBase = "org/netbeans/modules/php/twig/resources/filter.png",
+    iconBase = ICON_LOCATION,
     persistenceType = TopComponent.PERSISTENCE_ONLY_OPENED,
     mimeType = TwigLanguage.TWIG_MIME_TYPE,
     preferredID = "php.twig.source",
diff --git a/php/php.twig/src/org/netbeans/modules/php/twig/resources/layer.xml b/php/php.twig/src/org/netbeans/modules/php/twig/resources/layer.xml
index 9d019df721..f5652aac6f 100644
--- a/php/php.twig/src/org/netbeans/modules/php/twig/resources/layer.xml
+++ b/php/php.twig/src/org/netbeans/modules/php/twig/resources/layer.xml
@@ -231,7 +231,7 @@ Contributor(s): Sebastian Hörl
         <folder name="text">
             <folder name="x-twig">
                 <!-- keep for language annotation-->
-                <attr name="iconBase" stringvalue="org/netbeans/modules/php/twig/resources/filter.png"/>
+                <attr name="iconBase" stringvalue="org/netbeans/modules/php/twig/resources/twig-icon.png"/>
             </folder>
         </folder>
     </folder>
@@ -262,7 +262,7 @@ Contributor(s): Sebastian Hörl
     <folder name="Templates">
         <folder name="Scripting">
             <file name="TwigTemplate.html.twig" url="TwigTemplate.html.twig">
-                <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/php/twig/resources/filter.png"/>
+                <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/php/twig/resources/twig-icon.png"/>
                 <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.php.twig.resources.Bundle"/>
                 <attr name="template" boolvalue="true"/>
                 <attr name="templateCategory" stringvalue="PHP"/>
diff --git a/php/php.twig/src/org/netbeans/modules/php/twig/resources/twig-icon.png b/php/php.twig/src/org/netbeans/modules/php/twig/resources/twig-icon.png
new file mode 100644
index 0000000000..d6a2a2b3c1
Binary files /dev/null and b/php/php.twig/src/org/netbeans/modules/php/twig/resources/twig-icon.png differ


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

---------------------------------------------------------------------
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