matthiasblaesing commented on code in PR #7938:
URL: https://github.com/apache/netbeans/pull/7938#discussion_r1893013253


##########
ide/svg/licenseinfo.xml:
##########
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<licenseinfo>
+  <fileset>
+    <file>src/org/netbeans/modules/svg/resources/svgLogo.svg</file>

Review Comment:
   This is not necessary. The SVG is already correct (has a license header and 
thus does not need an entry here). The idea of the `licenseinfo.xml` file is to 
be able to record data for files, that prevent us from adding a correct license 
header. Binary files are the most probable use-case.



##########
ide/svg/nbproject/project.properties:
##########
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+is.eager=true
+javac.source=17

Review Comment:
   ```suggestion
   javac.release=17
   ```
   
   There are reasons to use target/source, but not many. The release flag was 
one of the better inventions after JDK 8.



##########
ide/svg/nbproject/project.properties:
##########
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+is.eager=true

Review Comment:
   I retestet with `ant tryme` and contrary to my first inclination this did 
not work. I checked how the image module works. It does not declare itself 
eager, but the `editor.kit` depends on it. So Editing will also load image. So 
I suggest to remove the `is.eager=true` and add a dependency on `svg` to 
`ide/editor.kit`



##########
ide/svg/src/org/netbeans/modules/svg/SVGDataObject.java:
##########
@@ -0,0 +1,163 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.modules.svg;
+
+import org.netbeans.core.spi.multiview.MultiViewElement;
+import org.netbeans.core.spi.multiview.text.MultiViewEditorElement;
+import org.netbeans.modules.xml.XMLDataObjectLook;
+import org.netbeans.modules.xml.cookies.DataObjectCookieManager;
+import org.netbeans.modules.xml.cookies.UpdateDocumentCookie;
+import org.netbeans.modules.xml.sync.DataObjectSyncSupport;
+import org.netbeans.modules.xml.sync.Synchronizator;
+import org.netbeans.spi.xml.cookies.CheckXMLSupport;
+import org.netbeans.spi.xml.cookies.DataObjectAdapters;
+import org.netbeans.spi.xml.cookies.ValidateXMLSupport;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionReferences;
+import org.openide.awt.HtmlBrowser;
+import org.openide.cookies.ViewCookie;
+import org.openide.filesystems.*;
+import org.openide.loaders.*;
+import org.openide.nodes.CookieSet;
+import org.openide.nodes.Node;
+import org.openide.util.*;
+import org.openide.windows.TopComponent;
+import org.xml.sax.InputSource;
+
+/**
+ *
+ * @author Christian Lenz
+ */
[email protected]({
+    "LBL_Svg_LOADER=Files of SVG"
+})
[email protected](
+    displayName = "#LBL_Svg_LOADER",
+    mimeType = SVGDataObject.MIME_TYPE,
+    extension = {"svg", "SVG"},
+    position = 20367
+)
[email protected](
+    mimeType = SVGDataObject.MIME_TYPE,
+    iconBase = "org/netbeans/modules/svg/resources/svgLogo.png",
+    displayName = "#LBL_Svg_LOADER",
+    position = 300
+)
+@ActionReferences(value = {

Review Comment:
   From my POV these lines are awfully long and I think at other places, there 
was more wrapping. Not a problem, just an observation.



##########
ide/svg/licenseinfo.xml:
##########
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<licenseinfo>
+  <fileset>
+    <file>src/org/netbeans/modules/svg/resources/svgLogo.svg</file>
+    <file>src/org/netbeans/modules/svg/resources/svgLogo.png</file>
+    <license ref="Apache-2.0-ASF" />
+    <comment type="COMMENT_UNSUPPORTED">
+      Images for the SVG filetype
+    </comment>

Review Comment:
   ```suggestion
       <comment type="COMMENT_UNSUPPORTED" />
   ```
   
   Misunderstanding: this is a clarification comment if anybody asks why the 
file is here or this this exception is recorded. `COMMENT_UNSUPPORTED` gives 
all the necessary info.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to