Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview SVG files #7938

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6867a9e
Init SVGPreview commit
Chris2011 Dec 19, 2024
c3bde5a
Update Batik and xmlgraphics-commons, add batik swing and batik anim …
Chris2011 Dec 19, 2024
34a2bfa
Remove multicatch due to build errors
Chris2011 Dec 19, 2024
079f3ef
Create new ant module called svg and moved everything to it
Chris2011 Dec 19, 2024
b650514
Add toolbar for zooming, scaling and activating different backgrounds
Chris2011 Dec 19, 2024
dded6ad
Add missing license headers and svg file as addressed while PR.
Chris2011 Dec 19, 2024
5c76ef7
Revert batik upgrade due to jsvg usage
Chris2011 Dec 19, 2024
2e72095
Remove batik dependency from xml module
Chris2011 Dec 19, 2024
315a6cb
Revert sorting in xml projet.xml file
Chris2011 Dec 22, 2024
10c0791
Add svg module as a dependency to the editor.kit module
Chris2011 Dec 23, 2024
9a84233
Add svg module to the cluster config
Chris2011 Dec 23, 2024
db784b1
Code cleanup in new SVG module, addressed by the reviewers
Chris2011 Dec 25, 2024
06b519f
Change filenames from Svg* to SVG*
Chris2011 Dec 25, 2024
c637a7f
Fix build due to missing case changes in classes
Chris2011 Dec 26, 2024
920fe5a
Fix more camelCase to Uppercase as to be consistent
Chris2011 Dec 26, 2024
70a5764
Fix addressed feedback (Add error handling, add rendering hints, code…
Chris2011 Dec 27, 2024
552e5b6
Try to catch error from JSVG load method.
Chris2011 Dec 29, 2024
a2884b3
Update SVGNavigatorPanel to render error message,
Chris2011 Jan 2, 2025
e3f411f
Update svg with a newer version
Chris2011 Jan 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ide/editor.kit/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@
<specification-version>1.21</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.svg</code-name-base>
<run-dependency>
<specification-version>1.0</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.xml.core</code-name-base>
<run-dependency>
Expand Down
25 changes: 25 additions & 0 deletions ide/svg/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?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.

-->
<project basedir="." default="netbeans" name="ide/svg">
<description>Builds, tests, and runs the project org.netbeans.modules.svg</description>
<import file="../../nbbuild/templates/projectized.xml"/>
</project>
28 changes: 28 additions & 0 deletions ide/svg/licenseinfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?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.png</file>
<license ref="Apache-2.0-ASF" />
<comment type="COMMENT_UNSUPPORTED" />
</fileset>
</licenseinfo>
6 changes: 6 additions & 0 deletions ide/svg/manifest.mf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Manifest-Version: 1.0
AutoUpdate-Show-In-Client: true
OpenIDE-Module: org.netbeans.modules.svg
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/svg/Bundle.properties
OpenIDE-Module-Specification-Version: 1.0

19 changes: 19 additions & 0 deletions ide/svg/nbproject/project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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.

javac.release=17
javac.compilerargs=-Xlint -Xlint:-serial
165 changes: 165 additions & 0 deletions ide/svg/nbproject/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
<?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.

-->
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.apisupport.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
<code-name-base>org.netbeans.modules.svg</code-name-base>
<module-dependencies>
<dependency>
<code-name-base>org.netbeans.api.xml.ui</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.70</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.core.ide</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.68</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.core.multiview</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.71</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.libs.jsvg</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.22</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.xml</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>1.60</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.modules.xml.core</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>2</release-version>
<specification-version>1.69</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.netbeans.spi.navigator</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<release-version>1</release-version>
<specification-version>1.64</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.awt</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.94</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.dialogs</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.74</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.filesystems</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.39</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.loaders</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.96</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.nodes</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>7.71</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.util</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.34</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.util.lookup</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>8.60</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.util.ui</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>9.35</specification-version>
</run-dependency>
</dependency>
<dependency>
<code-name-base>org.openide.windows</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>6.103</specification-version>
</run-dependency>
</dependency>
</module-dependencies>
<public-packages/>
</data>
</configuration>
</project>
27 changes: 27 additions & 0 deletions ide/svg/src/org/netbeans/modules/svg/BackgroundMode.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* 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;

/**
*
* @author Christian Lenz
*/
public enum BackgroundMode {
DEFAULT, BLACK, WHITE, TRANSPARENT, DARK_TRANSPARENT
}
22 changes: 22 additions & 0 deletions ide/svg/src/org/netbeans/modules/svg/Bundle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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.


OpenIDE-Module-Name=SVG Support

## SVGDataObject.java
CTL_SourceTabCaption=&Source
Loading
Loading