Server-side indexing for duplicates
authorJan Lahoda <jlahoda@netbeans.org>
Fri, 22 Jun 2012 23:15:13 +0200
changeset 8060e5196af58c1
parent 805 e502b71f2040
child 807 3d6cba23b030
Server-side indexing for duplicates
duplicates/build.sh
duplicates/server/indexer/build.xml
duplicates/server/indexer/impl/build.xml
duplicates/server/indexer/impl/manifest.mf
duplicates/server/indexer/impl/nbproject/build-impl.xml
duplicates/server/indexer/impl/nbproject/genfiles.properties
duplicates/server/indexer/impl/nbproject/project.properties
duplicates/server/indexer/impl/nbproject/project.xml
duplicates/server/indexer/impl/nbproject/suite.properties
duplicates/server/indexer/impl/src/org/netbeans/modules/jackpot30/duplicates/remoting/Bundle.properties
duplicates/server/indexer/impl/src/org/netbeans/modules/jackpot30/duplicates/remoting/IndexerImpl.java
duplicates/server/indexer/nbproject/build-impl.xml
duplicates/server/indexer/nbproject/genfiles.properties
duplicates/server/indexer/nbproject/platform.properties
duplicates/server/indexer/nbproject/platform.xml
duplicates/server/indexer/nbproject/project.properties
duplicates/server/indexer/nbproject/project.xml
     1.1 --- a/duplicates/build.sh	Fri Jun 22 22:59:35 2012 +0200
     1.2 +++ b/duplicates/build.sh	Fri Jun 22 23:15:13 2012 +0200
     1.3 @@ -1,3 +1,4 @@
     1.4  #!/bin/bash
     1.5  (cd ide; ant "$@" clean && ant "$@" nbms && ant "$@" test) || exit 1
     1.6 +(cd server/indexer; ant "$@" clean && ant "$@" build && cp -r build/cluster build/indexer; cp -r ../../ide/build/cluster/* build/indexer/; cp -r ../../../remoting/ide/build/cluster/* build/indexer/; cd build; zip -r ../../../../remoting/build/duplicates-indexer.zip indexer/) || exit 1
     1.7  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/duplicates/server/indexer/build.xml	Fri Jun 22 23:15:13 2012 +0200
     2.3 @@ -0,0 +1,8 @@
     2.4 +<?xml version="1.0" encoding="UTF-8"?>
     2.5 +<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
     2.6 +<!-- for some information on what you could do (e.g. targets to override). -->
     2.7 +<!-- If you delete this file and reopen the project it will be recreated. -->
     2.8 +<project name="duplicates-indexer" basedir=".">
     2.9 +    <description>Builds the module suite indexer.</description>
    2.10 +    <import file="nbproject/build-impl.xml"/>
    2.11 +</project>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/duplicates/server/indexer/impl/build.xml	Fri Jun 22 23:15:13 2012 +0200
     3.3 @@ -0,0 +1,8 @@
     3.4 +<?xml version="1.0" encoding="UTF-8"?>
     3.5 +<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
     3.6 +<!-- for some information on what you could do (e.g. targets to override). -->
     3.7 +<!-- If you delete this file and reopen the project it will be recreated. -->
     3.8 +<project name="org.netbeans.modules.jackpot30.duplicates.remoting" default="netbeans" basedir=".">
     3.9 +    <description>Builds, tests, and runs the project org.netbeans.modules.jackpot30.duplicates.remoting.</description>
    3.10 +    <import file="nbproject/build-impl.xml"/>
    3.11 +</project>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/duplicates/server/indexer/impl/manifest.mf	Fri Jun 22 23:15:13 2012 +0200
     4.3 @@ -0,0 +1,5 @@
     4.4 +Manifest-Version: 1.0
     4.5 +OpenIDE-Module: org.netbeans.modules.jackpot30.duplicates.remoting
     4.6 +OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jackpot30/duplicates/remoting/Bundle.properties
     4.7 +OpenIDE-Module-Specification-Version: 1.0
     4.8 +
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/duplicates/server/indexer/impl/nbproject/build-impl.xml	Fri Jun 22 23:15:13 2012 +0200
     5.3 @@ -0,0 +1,45 @@
     5.4 +<?xml version="1.0" encoding="UTF-8"?>
     5.5 +<!--
     5.6 +*** GENERATED FROM project.xml - DO NOT EDIT  ***
     5.7 +***         EDIT ../build.xml INSTEAD         ***
     5.8 +-->
     5.9 +<project name="org.netbeans.modules.jackpot30.duplicates.remoting-impl" basedir="..">
    5.10 +    <fail message="Please build using Ant 1.7.1 or higher.">
    5.11 +        <condition>
    5.12 +            <not>
    5.13 +                <antversion atleast="1.7.1"/>
    5.14 +            </not>
    5.15 +        </condition>
    5.16 +    </fail>
    5.17 +    <property file="nbproject/private/suite-private.properties"/>
    5.18 +    <property file="nbproject/suite.properties"/>
    5.19 +    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
    5.20 +    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
    5.21 +    <property file="${suite.dir}/nbproject/platform.properties"/>
    5.22 +    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
    5.23 +        <attribute name="name"/>
    5.24 +        <attribute name="value"/>
    5.25 +        <sequential>
    5.26 +            <property name="@{name}" value="${@{value}}"/>
    5.27 +        </sequential>
    5.28 +    </macrodef>
    5.29 +    <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
    5.30 +        <attribute name="property"/>
    5.31 +        <attribute name="value"/>
    5.32 +        <sequential>
    5.33 +            <property name="@{property}" value="@{value}"/>
    5.34 +        </sequential>
    5.35 +    </macrodef>
    5.36 +    <property file="${user.properties.file}"/>
    5.37 +    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
    5.38 +    <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
    5.39 +    <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
    5.40 +    <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
    5.41 +        <condition>
    5.42 +            <not>
    5.43 +                <contains string="${cluster.path.evaluated}" substring="platform"/>
    5.44 +            </not>
    5.45 +        </condition>
    5.46 +    </fail>
    5.47 +    <import file="${harness.dir}/build.xml"/>
    5.48 +</project>
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/duplicates/server/indexer/impl/nbproject/genfiles.properties	Fri Jun 22 23:15:13 2012 +0200
     6.3 @@ -0,0 +1,8 @@
     6.4 +build.xml.data.CRC32=a5ddb0ad
     6.5 +build.xml.script.CRC32=5603d4c2
     6.6 +build.xml.stylesheet.CRC32=a56c6a5b@2.50
     6.7 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
     6.8 +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
     6.9 +nbproject/build-impl.xml.data.CRC32=a5ddb0ad
    6.10 +nbproject/build-impl.xml.script.CRC32=8782c05b
    6.11 +nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.50
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/duplicates/server/indexer/impl/nbproject/project.properties	Fri Jun 22 23:15:13 2012 +0200
     7.3 @@ -0,0 +1,2 @@
     7.4 +javac.source=1.6
     7.5 +javac.compilerargs=-Xlint -Xlint:-serial
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/duplicates/server/indexer/impl/nbproject/project.xml	Fri Jun 22 23:15:13 2012 +0200
     8.3 @@ -0,0 +1,113 @@
     8.4 +<?xml version="1.0" encoding="UTF-8"?>
     8.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
     8.6 +    <type>org.netbeans.modules.apisupport.project</type>
     8.7 +    <configuration>
     8.8 +        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
     8.9 +            <code-name-base>org.netbeans.modules.jackpot30.duplicates.remoting</code-name-base>
    8.10 +            <suite-component/>
    8.11 +            <module-dependencies>
    8.12 +                <dependency>
    8.13 +                    <code-name-base>org.netbeans.api.java.classpath</code-name-base>
    8.14 +                    <build-prerequisite/>
    8.15 +                    <compile-dependency/>
    8.16 +                    <run-dependency>
    8.17 +                        <release-version>1</release-version>
    8.18 +                        <specification-version>1.30</specification-version>
    8.19 +                    </run-dependency>
    8.20 +                </dependency>
    8.21 +                <dependency>
    8.22 +                    <code-name-base>org.netbeans.libs.javacapi</code-name-base>
    8.23 +                    <build-prerequisite/>
    8.24 +                    <compile-dependency/>
    8.25 +                    <run-dependency>
    8.26 +                        <specification-version>7.7.0.3</specification-version>
    8.27 +                    </run-dependency>
    8.28 +                </dependency>
    8.29 +                <dependency>
    8.30 +                    <code-name-base>org.netbeans.libs.lucene</code-name-base>
    8.31 +                    <build-prerequisite/>
    8.32 +                    <compile-dependency/>
    8.33 +                    <run-dependency>
    8.34 +                        <release-version>3</release-version>
    8.35 +                        <specification-version>3.3</specification-version>
    8.36 +                    </run-dependency>
    8.37 +                </dependency>
    8.38 +                <dependency>
    8.39 +                    <code-name-base>org.netbeans.modules.editor.mimelookup</code-name-base>
    8.40 +                    <build-prerequisite/>
    8.41 +                    <compile-dependency/>
    8.42 +                    <run-dependency>
    8.43 +                        <release-version>1</release-version>
    8.44 +                        <specification-version>1.23</specification-version>
    8.45 +                    </run-dependency>
    8.46 +                </dependency>
    8.47 +                <dependency>
    8.48 +                    <code-name-base>org.netbeans.modules.jackpot30.common</code-name-base>
    8.49 +                    <build-prerequisite/>
    8.50 +                    <compile-dependency/>
    8.51 +                    <run-dependency>
    8.52 +                        <specification-version>1.1</specification-version>
    8.53 +                    </run-dependency>
    8.54 +                </dependency>
    8.55 +                <dependency>
    8.56 +                    <code-name-base>org.netbeans.modules.jackpot30.duplicates.impl</code-name-base>
    8.57 +                    <build-prerequisite/>
    8.58 +                    <compile-dependency/>
    8.59 +                    <run-dependency>
    8.60 +                        <implementation-version/>
    8.61 +                    </run-dependency>
    8.62 +                </dependency>
    8.63 +                <dependency>
    8.64 +                    <code-name-base>org.netbeans.modules.java.preprocessorbridge</code-name-base>
    8.65 +                    <build-prerequisite/>
    8.66 +                    <compile-dependency/>
    8.67 +                    <run-dependency>
    8.68 +                        <implementation-version/>
    8.69 +                    </run-dependency>
    8.70 +                </dependency>
    8.71 +                <dependency>
    8.72 +                    <code-name-base>org.netbeans.modules.java.source</code-name-base>
    8.73 +                    <build-prerequisite/>
    8.74 +                    <compile-dependency/>
    8.75 +                    <run-dependency>
    8.76 +                        <implementation-version/>
    8.77 +                    </run-dependency>
    8.78 +                </dependency>
    8.79 +                <dependency>
    8.80 +                    <code-name-base>org.netbeans.modules.parsing.api</code-name-base>
    8.81 +                    <build-prerequisite/>
    8.82 +                    <compile-dependency/>
    8.83 +                    <run-dependency>
    8.84 +                        <release-version>1</release-version>
    8.85 +                        <specification-version>1.43.0.6</specification-version>
    8.86 +                    </run-dependency>
    8.87 +                </dependency>
    8.88 +                <dependency>
    8.89 +                    <code-name-base>org.openide.filesystems</code-name-base>
    8.90 +                    <build-prerequisite/>
    8.91 +                    <compile-dependency/>
    8.92 +                    <run-dependency>
    8.93 +                        <specification-version>7.48</specification-version>
    8.94 +                    </run-dependency>
    8.95 +                </dependency>
    8.96 +                <dependency>
    8.97 +                    <code-name-base>org.openide.util</code-name-base>
    8.98 +                    <build-prerequisite/>
    8.99 +                    <compile-dependency/>
   8.100 +                    <run-dependency>
   8.101 +                        <specification-version>8.16</specification-version>
   8.102 +                    </run-dependency>
   8.103 +                </dependency>
   8.104 +                <dependency>
   8.105 +                    <code-name-base>org.openide.util.lookup</code-name-base>
   8.106 +                    <build-prerequisite/>
   8.107 +                    <compile-dependency/>
   8.108 +                    <run-dependency>
   8.109 +                        <specification-version>8.9</specification-version>
   8.110 +                    </run-dependency>
   8.111 +                </dependency>
   8.112 +            </module-dependencies>
   8.113 +            <public-packages/>
   8.114 +        </data>
   8.115 +    </configuration>
   8.116 +</project>
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/duplicates/server/indexer/impl/nbproject/suite.properties	Fri Jun 22 23:15:13 2012 +0200
     9.3 @@ -0,0 +1,1 @@
     9.4 +suite.dir=${basedir}/..
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/duplicates/server/indexer/impl/src/org/netbeans/modules/jackpot30/duplicates/remoting/Bundle.properties	Fri Jun 22 23:15:13 2012 +0200
    10.3 @@ -0,0 +1,42 @@
    10.4 +#
    10.5 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    10.6 +#
    10.7 +# Copyright 2012 Oracle and/or its affiliates. All rights reserved.
    10.8 +#
    10.9 +# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   10.10 +# Other names may be trademarks of their respective owners.
   10.11 +#
   10.12 +# The contents of this file are subject to the terms of either the GNU
   10.13 +# General Public License Version 2 only ("GPL") or the Common
   10.14 +# Development and Distribution License("CDDL") (collectively, the
   10.15 +# "License"). You may not use this file except in compliance with the
   10.16 +# License. You can obtain a copy of the License at
   10.17 +# http://www.netbeans.org/cddl-gplv2.html
   10.18 +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   10.19 +# specific language governing permissions and limitations under the
   10.20 +# License.  When distributing the software, include this License Header
   10.21 +# Notice in each file and include the License file at
   10.22 +# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   10.23 +# particular file as subject to the "Classpath" exception as provided
   10.24 +# by Oracle in the GPL Version 2 section of the License file that
   10.25 +# accompanied this code. If applicable, add the following below the
   10.26 +# License Header, with the fields enclosed by brackets [] replaced by
   10.27 +# your own identifying information:
   10.28 +# "Portions Copyrighted [year] [name of copyright owner]"
   10.29 +#
   10.30 +# If you wish your version of this file to be governed by only the CDDL
   10.31 +# or only the GPL Version 2, indicate your decision by adding
   10.32 +# "[Contributor] elects to include this software in this distribution
   10.33 +# under the [CDDL or GPL Version 2] license." If you do not indicate a
   10.34 +# single choice of license, a recipient has the option to distribute
   10.35 +# your version of this file under either the CDDL, the GPL Version 2 or
   10.36 +# to extend the choice of license to its licensees as provided above.
   10.37 +# However, if you add GPL Version 2 code and therefore, elected the GPL
   10.38 +# Version 2 license, then the option applies only if the new code is
   10.39 +# made subject to such option by the copyright holder.
   10.40 +#
   10.41 +# Contributor(s):
   10.42 +#
   10.43 +# Portions Copyrighted 2012 Sun Microsystems, Inc.
   10.44 +#
   10.45 +OpenIDE-Module-Name=Jackpot 3.0 Duplicates Indexer
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/duplicates/server/indexer/impl/src/org/netbeans/modules/jackpot30/duplicates/remoting/IndexerImpl.java	Fri Jun 22 23:15:13 2012 +0200
    11.3 @@ -0,0 +1,103 @@
    11.4 +/*
    11.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    11.6 + *
    11.7 + * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
    11.8 + *
    11.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
   11.10 + * Other names may be trademarks of their respective owners.
   11.11 + *
   11.12 + * The contents of this file are subject to the terms of either the GNU
   11.13 + * General Public License Version 2 only ("GPL") or the Common
   11.14 + * Development and Distribution License("CDDL") (collectively, the
   11.15 + * "License"). You may not use this file except in compliance with the
   11.16 + * License. You can obtain a copy of the License at
   11.17 + * http://www.netbeans.org/cddl-gplv2.html
   11.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
   11.19 + * specific language governing permissions and limitations under the
   11.20 + * License.  When distributing the software, include this License Header
   11.21 + * Notice in each file and include the License file at
   11.22 + * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
   11.23 + * particular file as subject to the "Classpath" exception as provided
   11.24 + * by Oracle in the GPL Version 2 section of the License file that
   11.25 + * accompanied this code. If applicable, add the following below the
   11.26 + * License Header, with the fields enclosed by brackets [] replaced by
   11.27 + * your own identifying information:
   11.28 + * "Portions Copyrighted [year] [name of copyright owner]"
   11.29 + *
   11.30 + * If you wish your version of this file to be governed by only the CDDL
   11.31 + * or only the GPL Version 2, indicate your decision by adding
   11.32 + * "[Contributor] elects to include this software in this distribution
   11.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
   11.34 + * single choice of license, a recipient has the option to distribute
   11.35 + * your version of this file under either the CDDL, the GPL Version 2 or
   11.36 + * to extend the choice of license to its licensees as provided above.
   11.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
   11.38 + * Version 2 license, then the option applies only if the new code is
   11.39 + * made subject to such option by the copyright holder.
   11.40 + *
   11.41 + * Contributor(s):
   11.42 + *
   11.43 + * Portions Copyrighted 2012 Sun Microsystems, Inc.
   11.44 + */
   11.45 +package org.netbeans.modules.jackpot30.duplicates.remoting;
   11.46 +
   11.47 +import com.sun.source.tree.CompilationUnitTree;
   11.48 +import com.sun.source.util.Trees;
   11.49 +import java.io.IOException;
   11.50 +import java.net.URL;
   11.51 +import org.netbeans.api.editor.mimelookup.MimeRegistration;
   11.52 +import org.netbeans.modules.jackpot30.common.api.IndexAccess;
   11.53 +import org.netbeans.modules.jackpot30.impl.duplicates.indexing.DuplicatesIndex;
   11.54 +import org.netbeans.modules.java.preprocessorbridge.spi.JavaIndexerPlugin;
   11.55 +import org.netbeans.modules.parsing.spi.indexing.Indexable;
   11.56 +import org.openide.filesystems.FileObject;
   11.57 +import org.openide.util.Exceptions;
   11.58 +import org.openide.util.Lookup;
   11.59 +
   11.60 +/**
   11.61 + *
   11.62 + * @author lahvac
   11.63 + */
   11.64 +public class IndexerImpl implements JavaIndexerPlugin {
   11.65 +
   11.66 +    private final DuplicatesIndex index;
   11.67 +
   11.68 +    public IndexerImpl(URL root, FileObject cacheFolder) {
   11.69 +        try {
   11.70 +            index = new DuplicatesIndex(root, cacheFolder);
   11.71 +        } catch (IOException ex) {
   11.72 +            throw new IllegalStateException(ex);
   11.73 +        }
   11.74 +    }
   11.75 +
   11.76 +    @Override
   11.77 +    public void process(CompilationUnitTree toProcess, Indexable indexable, Lookup services) {
   11.78 +        try {
   11.79 +            index.record(services.lookup(Trees.class), indexable, toProcess);
   11.80 +        } catch (IOException ex) {
   11.81 +            Exceptions.printStackTrace(ex);
   11.82 +        }
   11.83 +    }
   11.84 +
   11.85 +    @Override
   11.86 +    public void delete(Indexable indexable) {
   11.87 +        try {
   11.88 +            index.remove(Lookup.getDefault().lookup(IndexAccess.class).getRelativePath(indexable));
   11.89 +        } catch (IOException ex) {
   11.90 +            Exceptions.printStackTrace(ex);
   11.91 +        }
   11.92 +    }
   11.93 +
   11.94 +    @Override
   11.95 +    public void finish() { }
   11.96 +
   11.97 +    @MimeRegistration(mimeType="text/x-java", service=Factory.class)
   11.98 +    public static final class FactoryImpl implements Factory {
   11.99 +
  11.100 +        @Override
  11.101 +        public JavaIndexerPlugin create(URL root, FileObject cacheFolder) {
  11.102 +            return new IndexerImpl(root, cacheFolder);
  11.103 +        }
  11.104 +
  11.105 +    }
  11.106 +}
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/duplicates/server/indexer/nbproject/build-impl.xml	Fri Jun 22 23:15:13 2012 +0200
    12.3 @@ -0,0 +1,50 @@
    12.4 +<?xml version="1.0" encoding="UTF-8"?>
    12.5 +<!--
    12.6 +*** GENERATED FROM project.xml - DO NOT EDIT  ***
    12.7 +***         EDIT ../build.xml INSTEAD         ***
    12.8 +-->
    12.9 +<project name="indexer-impl" basedir=".." xmlns:sproject="http://www.netbeans.org/ns/nb-module-suite-project/1">
   12.10 +    <fail message="Please build using Ant 1.7.1 or higher.">
   12.11 +        <condition>
   12.12 +            <not>
   12.13 +                <antversion atleast="1.7.1"/>
   12.14 +            </not>
   12.15 +        </condition>
   12.16 +    </fail>
   12.17 +    <property file="nbproject/private/platform-private.properties"/>
   12.18 +    <property file="nbproject/platform.properties"/>
   12.19 +    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-suite-project/1">
   12.20 +        <attribute name="name"/>
   12.21 +        <attribute name="value"/>
   12.22 +        <sequential>
   12.23 +            <property name="@{name}" value="${@{value}}"/>
   12.24 +        </sequential>
   12.25 +    </macrodef>
   12.26 +    <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-suite-project/1">
   12.27 +        <attribute name="property"/>
   12.28 +        <attribute name="value"/>
   12.29 +        <sequential>
   12.30 +            <property name="@{property}" value="@{value}"/>
   12.31 +        </sequential>
   12.32 +    </macrodef>
   12.33 +    <property file="${user.properties.file}"/>
   12.34 +    <sproject:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir"/>
   12.35 +    <sproject:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir"/>
   12.36 +    <sproject:evalprops property="cluster.path.evaluated" value="${cluster.path}"/>
   12.37 +    <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
   12.38 +        <condition>
   12.39 +            <not>
   12.40 +                <contains string="${cluster.path.evaluated}" substring="platform"/>
   12.41 +            </not>
   12.42 +        </condition>
   12.43 +    </fail>
   12.44 +    <ant antfile="nbproject/platform.xml"/>
   12.45 +    <fail message="Cannot find NetBeans build harness. ${line.separator}Check that nbplatform.${nbplatform.active}.netbeans.dest.dir and nbplatform.${nbplatform.active}.harness.dir are defined. ${line.separator}On a developer machine these are normally defined in ${user.properties.file}=${netbeans.user}/build.properties ${line.separator}but for automated builds you should pass these properties to Ant explicitly. ${line.separator}You may instead download the harness and platform: -Dbootstrap.url=.../tasks.jar -Dautoupdate.catalog.url=.../updates.xml">
   12.46 +        <condition>
   12.47 +            <not>
   12.48 +                <available file="${harness.dir}/suite.xml"/>
   12.49 +            </not>
   12.50 +        </condition>
   12.51 +    </fail>
   12.52 +    <import file="${harness.dir}/suite.xml"/>
   12.53 +</project>
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/duplicates/server/indexer/nbproject/genfiles.properties	Fri Jun 22 23:15:13 2012 +0200
    13.3 @@ -0,0 +1,11 @@
    13.4 +build.xml.data.CRC32=8121b4f6
    13.5 +build.xml.script.CRC32=58124a00
    13.6 +build.xml.stylesheet.CRC32=eaf9f76a@2.50
    13.7 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
    13.8 +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
    13.9 +nbproject/build-impl.xml.data.CRC32=8121b4f6
   13.10 +nbproject/build-impl.xml.script.CRC32=d8a24b22
   13.11 +nbproject/build-impl.xml.stylesheet.CRC32=0f381476@2.50
   13.12 +nbproject/platform.xml.data.CRC32=8121b4f6
   13.13 +nbproject/platform.xml.script.CRC32=db9e1f43
   13.14 +nbproject/platform.xml.stylesheet.CRC32=df8ac4dd@2.50
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/duplicates/server/indexer/nbproject/platform.properties	Fri Jun 22 23:15:13 2012 +0200
    14.3 @@ -0,0 +1,26 @@
    14.4 +cluster.path=\
    14.5 +    ${nbplatform.active.dir}/apisupport:\
    14.6 +    ${nbplatform.active.dir}/cnd:\
    14.7 +    ${nbplatform.active.dir}/dlight:\
    14.8 +    ${nbplatform.active.dir}/enterprise:\
    14.9 +    ${nbplatform.active.dir}/harness:\
   14.10 +    ${nbplatform.active.dir}/ide:\
   14.11 +    ${nbplatform.active.dir}/java:\
   14.12 +    ${nbplatform.active.dir}/nb:\
   14.13 +    ${nbplatform.active.dir}/platform:\
   14.14 +    ${nbplatform.active.dir}/profiler:\
   14.15 +    ${nbplatform.active.dir}/webcommon:\
   14.16 +    ${nbplatform.active.dir}/websvccommon:\
   14.17 +    ../../ide/build/cluster:\
   14.18 +    ../../../remoting/common/build/cluster:\
   14.19 +    ../../../remoting/server/indexer/build/cluster:\
   14.20 +    ../../../remoting/ide/build/cluster
   14.21 +extcluster.../../../remoting/common/build/cluster.javadoc=
   14.22 +extcluster.../../../remoting/common/build/cluster.sources=
   14.23 +extcluster.../../../remoting/ide/build/cluster.javadoc=
   14.24 +extcluster.../../../remoting/ide/build/cluster.sources=
   14.25 +extcluster.../../../remoting/server/indexer/build/cluster.javadoc=
   14.26 +extcluster.../../../remoting/server/indexer/build/cluster.sources=
   14.27 +extcluster.../../ide/build/cluster.javadoc=
   14.28 +extcluster.../../ide/build/cluster.sources=
   14.29 +nbplatform.active=trunk
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/duplicates/server/indexer/nbproject/platform.xml	Fri Jun 22 23:15:13 2012 +0200
    15.3 @@ -0,0 +1,34 @@
    15.4 +<?xml version="1.0" encoding="UTF-8"?>
    15.5 +<project name="platform" default="download" basedir="..">
    15.6 +    <condition property="download.required">
    15.7 +        <and>
    15.8 +            <not>
    15.9 +                <available file="${harness.dir}/suite.xml"/>
   15.10 +            </not>
   15.11 +            <isset property="bootstrap.url"/>
   15.12 +            <isset property="autoupdate.catalog.url"/>
   15.13 +        </and>
   15.14 +    </condition>
   15.15 +    <target name="download" if="download.required">
   15.16 +        <mkdir dir="${harness.dir}"/>
   15.17 +        <pathconvert pathsep="|" property="download.clusters">
   15.18 +            <mapper type="flatten"/>
   15.19 +            <path path="${cluster.path}"/>
   15.20 +        </pathconvert>
   15.21 +        <property name="disabled.modules" value=""/>
   15.22 +        <pathconvert property="module.includes" pathsep="">
   15.23 +            <mapper type="glob" from="${basedir}${file.separator}*" to="(?!\Q*\E)"/>
   15.24 +            <path>
   15.25 +                <filelist files="${disabled.modules}" dir="."/>
   15.26 +            </path>
   15.27 +        </pathconvert>
   15.28 +        <echo message="Downloading clusters ${download.clusters}"/>
   15.29 +        <property name="tasks.jar" location="${java.io.tmpdir}/tasks.jar"/>
   15.30 +        <get src="${bootstrap.url}" dest="${tasks.jar}" usetimestamp="true" verbose="true"/>
   15.31 +        <taskdef name="autoupdate" classname="org.netbeans.nbbuild.AutoUpdate" classpath="${tasks.jar}"/>
   15.32 +        <autoupdate installdir="${nbplatform.active.dir}" updatecenter="${autoupdate.catalog.url}">
   15.33 +            <modules includes="${module.includes}.*" clusters="${download.clusters}"/>
   15.34 +            <modules includes="org[.]netbeans[.]modules[.]apisupport[.]harness" clusters="harness"/>
   15.35 +        </autoupdate>
   15.36 +    </target>
   15.37 +</project>
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/duplicates/server/indexer/nbproject/project.properties	Fri Jun 22 23:15:13 2012 +0200
    16.3 @@ -0,0 +1,3 @@
    16.4 +modules=\
    16.5 +    ${project.org.netbeans.modules.jackpot30.duplicates.remoting}
    16.6 +project.org.netbeans.modules.jackpot30.duplicates.remoting=impl
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/duplicates/server/indexer/nbproject/project.xml	Fri Jun 22 23:15:13 2012 +0200
    17.3 @@ -0,0 +1,9 @@
    17.4 +<?xml version="1.0" encoding="UTF-8"?>
    17.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
    17.6 +    <type>org.netbeans.modules.apisupport.project.suite</type>
    17.7 +    <configuration>
    17.8 +        <data xmlns="http://www.netbeans.org/ns/nb-module-suite-project/1">
    17.9 +            <name>indexer</name>
   17.10 +        </data>
   17.11 +    </configuration>
   17.12 +</project>