| <?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 name="org.netbeans.modules.nbcode.integration" default="netbeans" basedir="."> | |
| <description>Builds, tests, and runs the project org.netbeans.modules.nbcode.integration.</description> | |
| <import file="nbproject/build-impl.xml"/> | |
| <property name="nbantext.jar" location="${harness.dir}/../../build/nbantext.jar"/> | |
| <target name="copy-icon-files" depends="init"> | |
| <!-- load the properties as plain text into a property --> | |
| <loadfile property="_imagelist" srcfile="${src.dir}/org/netbeans/modules/nbcode/integration/resources/uimanager-icons.properties"> | |
| <!-- only load affirmative values of properties --> | |
| <filterchain> | |
| <linecontainsregexp negate="true"> | |
| <regexp pattern="^#|^\s*$|=" /> | |
| </linecontainsregexp> | |
| <tokenfilter> | |
| <replaceregex pattern="(.+)$" replace="\1,"/> | |
| </tokenfilter> | |
| <!-- | |
| <prefixlines prefix="copyicons." /> | |
| --> | |
| </filterchain> | |
| </loadfile> | |
| <echo message="${_imagelist}"/> | |
| <mkdir dir="${build.dir}/org/netbeans/modules/nbcode/integration/resources/uidefaults"/> | |
| <taskdef name="repeat" classname="org.netbeans.nbbuild.Repeat" classpath="${nbantext.jar}"/> | |
| <repeat target="-copy-single-file" name="copy.icon.name" values="${_imagelist}" /> | |
| </target> | |
| <target name="-copy-single-file"> | |
| <condition property="empty"> | |
| <equals arg1="${copy.icon.name}" arg2="" trim="true"/> | |
| </condition> | |
| <antcall target="-copy-single-file2"/> | |
| </target> | |
| <target name="-copy-single-file2" unless="${empty}"> | |
| <copy file="${src.dir}/org/netbeans/modules/nbcode/integration/resources/empty.png" tofile="${build.classes.dir}/org/netbeans/modules/nbcode/integration/resources/uidefaults/${copy.icon.name}.png"/> | |
| </target> | |
| <target name="-pre-jar" depends="projectized-common.-pre-jar, copy-icon-files"/> | |
| </project> |