Adding backend IndexAccess.
1.1 --- a/remoting/server/indexer/impl/nbproject/genfiles.properties Fri Jun 22 22:58:14 2012 +0200
1.2 +++ b/remoting/server/indexer/impl/nbproject/genfiles.properties Fri Jun 22 22:59:35 2012 +0200
1.3 @@ -3,6 +3,6 @@
1.4 build.xml.stylesheet.CRC32=a56c6a5b@1.47
1.5 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
1.6 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
1.7 -nbproject/build-impl.xml.data.CRC32=73a66b48
1.8 +nbproject/build-impl.xml.data.CRC32=330c1756
1.9 nbproject/build-impl.xml.script.CRC32=87e6e497
1.10 -nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.47
1.11 +nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.51
2.1 --- a/remoting/server/indexer/impl/nbproject/project.xml Fri Jun 22 22:58:14 2012 +0200
2.2 +++ b/remoting/server/indexer/impl/nbproject/project.xml Fri Jun 22 22:59:35 2012 +0200
2.3 @@ -60,6 +60,14 @@
2.4 </run-dependency>
2.5 </dependency>
2.6 <dependency>
2.7 + <code-name-base>org.netbeans.modules.jackpot30.common</code-name-base>
2.8 + <build-prerequisite/>
2.9 + <compile-dependency/>
2.10 + <run-dependency>
2.11 + <specification-version>1.1</specification-version>
2.12 + </run-dependency>
2.13 + </dependency>
2.14 + <dependency>
2.15 <code-name-base>org.netbeans.modules.java.hints</code-name-base>
2.16 <build-prerequisite/>
2.17 <compile-dependency/>
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/BackendIndexAccess.java Fri Jun 22 22:59:35 2012 +0200
3.3 @@ -0,0 +1,73 @@
3.4 +/*
3.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3.6 + *
3.7 + * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
3.8 + *
3.9 + * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
3.10 + * Other names may be trademarks of their respective owners.
3.11 + *
3.12 + * The contents of this file are subject to the terms of either the GNU
3.13 + * General Public License Version 2 only ("GPL") or the Common
3.14 + * Development and Distribution License("CDDL") (collectively, the
3.15 + * "License"). You may not use this file except in compliance with the
3.16 + * License. You can obtain a copy of the License at
3.17 + * http://www.netbeans.org/cddl-gplv2.html
3.18 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
3.19 + * specific language governing permissions and limitations under the
3.20 + * License. When distributing the software, include this License Header
3.21 + * Notice in each file and include the License file at
3.22 + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
3.23 + * particular file as subject to the "Classpath" exception as provided
3.24 + * by Oracle in the GPL Version 2 section of the License file that
3.25 + * accompanied this code. If applicable, add the following below the
3.26 + * License Header, with the fields enclosed by brackets [] replaced by
3.27 + * your own identifying information:
3.28 + * "Portions Copyrighted [year] [name of copyright owner]"
3.29 + *
3.30 + * If you wish your version of this file to be governed by only the CDDL
3.31 + * or only the GPL Version 2, indicate your decision by adding
3.32 + * "[Contributor] elects to include this software in this distribution
3.33 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
3.34 + * single choice of license, a recipient has the option to distribute
3.35 + * your version of this file under either the CDDL, the GPL Version 2 or
3.36 + * to extend the choice of license to its licensees as provided above.
3.37 + * However, if you add GPL Version 2 code and therefore, elected the GPL
3.38 + * Version 2 license, then the option applies only if the new code is
3.39 + * made subject to such option by the copyright holder.
3.40 + *
3.41 + * Contributor(s):
3.42 + *
3.43 + * Portions Copyrighted 2012 Sun Microsystems, Inc.
3.44 + */
3.45 +package org.netbeans.modules.jackpot30.backend.impl;
3.46 +
3.47 +import java.net.URL;
3.48 +import org.apache.lucene.index.IndexWriter;
3.49 +import org.netbeans.modules.jackpot30.backend.impl.spi.IndexAccessor;
3.50 +import org.netbeans.modules.jackpot30.common.api.IndexAccess;
3.51 +import org.netbeans.modules.parsing.spi.indexing.Indexable;
3.52 +import org.openide.filesystems.FileObject;
3.53 +import org.openide.util.lookup.ServiceProvider;
3.54 +
3.55 +/**
3.56 + *
3.57 + * @author lahvac
3.58 + */
3.59 +@ServiceProvider(service=IndexAccess.class, supersedes="org.netbeans.modules.jackpot30.common.api.IndexAccess")
3.60 +public class BackendIndexAccess extends IndexAccess {
3.61 +
3.62 + @Override
3.63 + public IndexWriter getIndexWriter(URL root, FileObject cacheRoot, String subindexName) {
3.64 + return IndexAccessor.getCurrent().getIndexWriter();
3.65 + }
3.66 +
3.67 + @Override
3.68 + public String getRelativePath(Indexable i) {
3.69 + return IndexAccessor.getCurrent().getPath(i.getURL());
3.70 + }
3.71 +
3.72 + @Override
3.73 + public void finish() {
3.74 + }
3.75 +
3.76 +}
4.1 --- a/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/spi/IndexAccessor.java Fri Jun 22 22:58:14 2012 +0200
4.2 +++ b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/spi/IndexAccessor.java Fri Jun 22 22:59:35 2012 +0200
4.3 @@ -8,8 +8,6 @@
4.4 import java.net.URL;
4.5 import org.apache.lucene.index.IndexWriter;
4.6 import org.openide.filesystems.FileObject;
4.7 -import org.openide.filesystems.FileStateInvalidException;
4.8 -import org.openide.filesystems.FileUtil;
4.9 import org.openide.util.Exceptions;
4.10
4.11 /**
5.1 --- a/remoting/server/indexer/nbproject/platform.properties Fri Jun 22 22:58:14 2012 +0200
5.2 +++ b/remoting/server/indexer/nbproject/platform.properties Fri Jun 22 22:59:35 2012 +0200
5.3 @@ -1,14 +1,16 @@
5.4 cluster.path=\
5.5 - ${nbplatform.active.dir}/nb:\
5.6 - ${nbplatform.active.dir}/latex:\
5.7 + ${nbplatform.active.dir}/apisupport:\
5.8 + ${nbplatform.active.dir}/cnd:\
5.9 + ${nbplatform.active.dir}/dlight:\
5.10 ${nbplatform.active.dir}/enterprise:\
5.11 + ${nbplatform.active.dir}/harness:\
5.12 ${nbplatform.active.dir}/ide:\
5.13 ${nbplatform.active.dir}/java:\
5.14 - ${nbplatform.active.dir}/dlight:\
5.15 + ${nbplatform.active.dir}/nb:\
5.16 + ${nbplatform.active.dir}/platform:\
5.17 + ${nbplatform.active.dir}/profiler:\
5.18 ${nbplatform.active.dir}/websvccommon:\
5.19 - ${nbplatform.active.dir}/apisupport:\
5.20 - ${nbplatform.active.dir}/profiler:\
5.21 - ${nbplatform.active.dir}/platform:\
5.22 - ${nbplatform.active.dir}/cnd:\
5.23 - ${nbplatform.active.dir}/harness
5.24 + ../../common/build/cluster
5.25 +extcluster.../../common/build/cluster.javadoc=
5.26 +extcluster.../../common/build/cluster.sources=
5.27 nbplatform.active=default