http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/web/resolve.web.api/nbproject/project.properties ---------------------------------------------------------------------- diff --git a/remoting/server/web/resolve.web.api/nbproject/project.properties b/remoting/server/web/resolve.web.api/nbproject/project.properties new file mode 100644 index 0000000..4ff415b --- /dev/null +++ b/remoting/server/web/resolve.web.api/nbproject/project.properties @@ -0,0 +1,141 @@ +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +# +# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved. +# +# Oracle and Java are registered trademarks of Oracle and/or its affiliates. +# Other names may be trademarks of their respective owners. +# +# The contents of this file are subject to the terms of either the GNU +# General Public License Version 2 only ("GPL") or the Common +# Development and Distribution License("CDDL") (collectively, the +# "License"). You may not use this file except in compliance with the +# License. You can obtain a copy of the License at +# http://www.netbeans.org/cddl-gplv2.html +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the +# specific language governing permissions and limitations under the +# License. When distributing the software, include this License Header +# Notice in each file and include the License file at +# nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the GPL Version 2 section of the License file that +# accompanied this code. If applicable, add the following below the +# License Header, with the fields enclosed by brackets [] replaced by +# your own identifying information: +# "Portions Copyrighted [year] [name of copyright owner]" +# +# Contributor(s): +# +# The Original Software is NetBeans. The Initial Developer of the Original +# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun +# Microsystems, Inc. All Rights Reserved. +# +# If you wish your version of this file to be governed by only the CDDL +# or only the GPL Version 2, indicate your decision by adding +# "[Contributor] elects to include this software in this distribution +# under the [CDDL or GPL Version 2] license." If you do not indicate a +# single choice of license, a recipient has the option to distribute +# your version of this file under either the CDDL, the GPL Version 2 or +# to extend the choice of license to its licensees as provided above. +# However, if you add GPL Version 2 code and therefore, elected the GPL +# Version 2 license, then the option applies only if the new code is +# made subject to such option by the copyright holder. +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=resolve.web.api +application.vendor=lahvac +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/resolve.web.api.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +file.reference.org-netbeans-modules-java-lexer.jar=../../../../lib/org-netbeans-modules-java-lexer.jar +file.reference.org-netbeans-modules-java-source-base.jar=../../../../lib/org-netbeans-modules-java-source-base.jar +file.reference.org-netbeans-modules-lexer.jar=../../../../lib/org-netbeans-modules-lexer.jar +file.reference.org-netbeans-modules-parsing-api.jar=../../../../lib/org-netbeans-modules-parsing-api.jar +file.reference.org-netbeans-modules-parsing-lucene.jar=../../../../lib/org-netbeans-modules-parsing-lucene.jar +file.reference.org-openide-filesystems.jar=../../../../lib/org-openide-filesystems.jar +file.reference.org-openide-util-lookup.jar=../../../../lib/org-openide-util-lookup.jar +file.reference.util-commons.jar=../../../ide/api/external/util-commons.jar +file.reference.util-pojson.jar=../../../ide/api/external/util-pojson.jar +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.org-netbeans-modules-parsing-lucene.jar}:\ + ${reference.base_web_api.jar}:\ + ${libs.jersey.classpath}:\ + ${file.reference.org-netbeans-modules-parsing-api.jar}:\ + ${file.reference.org-openide-filesystems.jar}:\ + ${libs.lucene.classpath}:\ + ${libs.javac.classpath}:\ + ${reference.source_web_api.jar}:\ + ${file.reference.util-commons.jar}:\ + ${file.reference.util-pojson.jar}:\ + ${file.reference.org-netbeans-modules-lexer.jar}:\ + ${file.reference.org-netbeans-modules-java-lexer.jar}:\ + ${file.reference.org-openide-util-lookup.jar}:\ + ${file.reference.org-netbeans-modules-java-source-base.jar} +# Space-separated list of extra javac options +javac.compilerargs=-Xbootclasspath/p:${libs.javac.classpath} +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.6 +javac.target=1.6 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class= +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +project.base_web_api=../base.web.api +project.source_web_api=../source.web.api +reference.base_web_api.jar=${project.base_web_api}/dist/base.web.api.jar +reference.source_web_api.jar=${project.source_web_api}/dist/source.web.api.jar +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value +# or test-sys-prop.name=value to set system properties for unit tests): +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/web/resolve.web.api/nbproject/project.xml ---------------------------------------------------------------------- diff --git a/remoting/server/web/resolve.web.api/nbproject/project.xml b/remoting/server/web/resolve.web.api/nbproject/project.xml new file mode 100644 index 0000000..45f6b3d --- /dev/null +++ b/remoting/server/web/resolve.web.api/nbproject/project.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved. + +Oracle and Java are registered trademarks of Oracle and/or its affiliates. +Other names may be trademarks of their respective owners. + +The contents of this file are subject to the terms of either the GNU +General Public License Version 2 only ("GPL") or the Common +Development and Distribution License("CDDL") (collectively, the +"License"). You may not use this file except in compliance with the +License. You can obtain a copy of the License at +http://www.netbeans.org/cddl-gplv2.html +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the +specific language governing permissions and limitations under the +License. When distributing the software, include this License Header +Notice in each file and include the License file at +nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this +particular file as subject to the "Classpath" exception as provided +by Oracle in the GPL Version 2 section of the License file that +accompanied this code. If applicable, add the following below the +License Header, with the fields enclosed by brackets [] replaced by +your own identifying information: +"Portions Copyrighted [year] [name of copyright owner]" + +Contributor(s): + +The Original Software is NetBeans. The Initial Developer of the Original +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun +Microsystems, Inc. All Rights Reserved. + +If you wish your version of this file to be governed by only the CDDL +or only the GPL Version 2, indicate your decision by adding +"[Contributor] elects to include this software in this distribution +under the [CDDL or GPL Version 2] license." If you do not indicate a +single choice of license, a recipient has the option to distribute +your version of this file under either the CDDL, the GPL Version 2 or +to extend the choice of license to its licensees as provided above. +However, if you add GPL Version 2 code and therefore, elected the GPL +Version 2 license, then the option applies only if the new code is +made subject to such option by the copyright holder. +--> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.java.j2seproject</type> + <configuration> + <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> + <name>resolve.web.api</name> + <source-roots> + <root id="src.dir"/> + </source-roots> + <test-roots> + <root id="test.src.dir"/> + </test-roots> + </data> + <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1"> + <definitions>../../../../lib/nblibraries.properties</definitions> + </libraries> + <references xmlns="http://www.netbeans.org/ns/ant-project-references/1"> + <reference> + <foreign-project>base_web_api</foreign-project> + <artifact-type>jar</artifact-type> + <script>build.xml</script> + <target>jar</target> + <clean-target>clean</clean-target> + <id>jar</id> + </reference> + <reference> + <foreign-project>source_web_api</foreign-project> + <artifact-type>jar</artifact-type> + <script>build.xml</script> + <target>jar</target> + <clean-target>clean</clean-target> + <id>jar</id> + </reference> + </references> + </configuration> +</project> http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/CompilationInfo.java ---------------------------------------------------------------------- diff --git a/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/CompilationInfo.java b/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/CompilationInfo.java new file mode 100644 index 0000000..13331c8 --- /dev/null +++ b/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/CompilationInfo.java @@ -0,0 +1,97 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright 2012 Oracle and/or its affiliates. All rights reserved. + * + * Oracle and Java are registered trademarks of Oracle and/or its affiliates. + * Other names may be trademarks of their respective owners. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common + * Development and Distribution License("CDDL") (collectively, the + * "License"). You may not use this file except in compliance with the + * License. You can obtain a copy of the License at + * http://www.netbeans.org/cddl-gplv2.html + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the + * specific language governing permissions and limitations under the + * License. When distributing the software, include this License Header + * Notice in each file and include the License file at + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the GPL Version 2 section of the License file that + * accompanied this code. If applicable, add the following below the + * License Header, with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * If you wish your version of this file to be governed by only the CDDL + * or only the GPL Version 2, indicate your decision by adding + * "[Contributor] elects to include this software in this distribution + * under the [CDDL or GPL Version 2] license." If you do not indicate a + * single choice of license, a recipient has the option to distribute + * your version of this file under either the CDDL, the GPL Version 2 or + * to extend the choice of license to its licensees as provided above. + * However, if you add GPL Version 2 code and therefore, elected the GPL + * Version 2 license, then the option applies only if the new code is + * made subject to such option by the copyright holder. + * + * Contributor(s): + * + * Portions Copyrighted 2012 Sun Microsystems, Inc. + */ +package org.netbeans.modules.jackpot30.resolve.api; + +import com.sun.source.tree.CompilationUnitTree; +import com.sun.source.util.JavacTask; +import com.sun.source.util.Trees; +import javax.lang.model.util.Elements; +import javax.lang.model.util.Types; +import org.netbeans.api.java.lexer.JavaTokenId; +import org.netbeans.api.lexer.TokenHierarchy; + +/** + * + * @author lahvac + */ +public class CompilationInfo { + + private final Javac javac; + private final CompilationUnitTree cut; + private final String text; + private final TokenHierarchy<?> th; + + public CompilationInfo(Javac javac, CompilationUnitTree cut, String text) { + this.javac = javac; + this.cut = cut; + this.text = text; + this.th = TokenHierarchy.create(text, JavaTokenId.language()); + } + + public /*@NonNull*/ Trees getTrees() { + return Trees.instance(javac.getTask()); + } + + public /*@NonNull*/ Types getTypes() { + return javac.getTask().getTypes(); + } + + public /*@NonNull*/ Elements getElements() { + return javac.getTask().getElements(); + } + + public CompilationUnitTree getCompilationUnit() { + return cut; + } + + public /*@NonNull*/ String getText() { + return text; + } + + public /*@NonNull*/ TokenHierarchy<?> getTokenHierarchy() { + return th; + } + + public JavacTask getJavacTask() { + return javac.getTask(); + } +} http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/JavaUtils.java ---------------------------------------------------------------------- diff --git a/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/JavaUtils.java b/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/JavaUtils.java new file mode 100644 index 0000000..95c219e --- /dev/null +++ b/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/JavaUtils.java @@ -0,0 +1,79 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright 2011 Oracle and/or its affiliates. All rights reserved. + * + * Oracle and Java are registered trademarks of Oracle and/or its affiliates. + * Other names may be trademarks of their respective owners. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common + * Development and Distribution License("CDDL") (collectively, the + * "License"). You may not use this file except in compliance with the + * License. You can obtain a copy of the License at + * http://www.netbeans.org/cddl-gplv2.html + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the + * specific language governing permissions and limitations under the + * License. When distributing the software, include this License Header + * Notice in each file and include the License file at + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the GPL Version 2 section of the License file that + * accompanied this code. If applicable, add the following below the + * License Header, with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * If you wish your version of this file to be governed by only the CDDL + * or only the GPL Version 2, indicate your decision by adding + * "[Contributor] elects to include this software in this distribution + * under the [CDDL or GPL Version 2] license." If you do not indicate a + * single choice of license, a recipient has the option to distribute + * your version of this file under either the CDDL, the GPL Version 2 or + * to extend the choice of license to its licensees as provided above. + * However, if you add GPL Version 2 code and therefore, elected the GPL + * Version 2 license, then the option applies only if the new code is + * made subject to such option by the copyright holder. + * + * Contributor(s): + * + * Portions Copyrighted 2011 Sun Microsystems, Inc. + */ +package org.netbeans.modules.jackpot30.resolve.api; + +import java.util.EnumSet; +import java.util.Set; +import javax.lang.model.element.ElementKind; +import org.netbeans.api.java.source.ElementHandle; +import org.netbeans.modules.java.source.ElementHandleAccessor; + +/** + * + * @author lahvac + */ +public class JavaUtils { + + public static final Set<ElementKind> SUPPORTED_KINDS = EnumSet.of(ElementKind.PACKAGE, ElementKind.CLASS, + ElementKind.INTERFACE, ElementKind.ENUM, ElementKind.ANNOTATION_TYPE, ElementKind.METHOD, + ElementKind.CONSTRUCTOR, ElementKind.INSTANCE_INIT, ElementKind.STATIC_INIT, + ElementKind.FIELD, ElementKind.ENUM_CONSTANT); + + public static String serialize(ElementHandle<?> h) { + StringBuilder result = new StringBuilder(); + + result.append(h.getKind()); + + //was: +// String[] signatures = SourceUtils.getJVMSignature(h); + //but that was forcing loading of UserTask from parsing.api + String[] signatures = ElementHandleAccessor.getInstance().getJVMSignature(h); + + for (String sig : signatures) { + result.append(":"); + result.append(sig); + } + + return result.toString(); + } + +} http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/Javac.java ---------------------------------------------------------------------- diff --git a/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/Javac.java b/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/Javac.java new file mode 100644 index 0000000..ec2dc80 --- /dev/null +++ b/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/Javac.java @@ -0,0 +1,361 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright 2012 Oracle and/or its affiliates. All rights reserved. + * + * Oracle and Java are registered trademarks of Oracle and/or its affiliates. + * Other names may be trademarks of their respective owners. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common + * Development and Distribution License("CDDL") (collectively, the + * "License"). You may not use this file except in compliance with the + * License. You can obtain a copy of the License at + * http://www.netbeans.org/cddl-gplv2.html + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the + * specific language governing permissions and limitations under the + * License. When distributing the software, include this License Header + * Notice in each file and include the License file at + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the GPL Version 2 section of the License file that + * accompanied this code. If applicable, add the following below the + * License Header, with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * If you wish your version of this file to be governed by only the CDDL + * or only the GPL Version 2, indicate your decision by adding + * "[Contributor] elects to include this software in this distribution + * under the [CDDL or GPL Version 2] license." If you do not indicate a + * single choice of license, a recipient has the option to distribute + * your version of this file under either the CDDL, the GPL Version 2 or + * to extend the choice of license to its licensees as provided above. + * However, if you add GPL Version 2 code and therefore, elected the GPL + * Version 2 license, then the option applies only if the new code is + * made subject to such option by the copyright holder. + * + * Contributor(s): + * + * Portions Copyrighted 2012 Sun Microsystems, Inc. + */ +package org.netbeans.modules.jackpot30.resolve.api; + +import com.sun.source.tree.CompilationUnitTree; +import com.sun.source.tree.Tree; +import com.sun.source.util.JavacTask; +import com.sun.tools.javac.api.JavacTaskImpl; +import com.sun.tools.javac.code.Symbol.ClassSymbol; +import com.sun.tools.javac.model.LazyTreeLoader; +import com.sun.tools.javac.util.Abort; +import com.sun.tools.javac.util.Context; +import com.sun.tools.javac.util.Context.Factory; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.Reader; +import java.io.Writer; +import java.lang.ref.Reference; +import java.lang.ref.SoftReference; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.WeakHashMap; +import java.util.concurrent.atomic.AtomicReference; +import javax.lang.model.element.Modifier; +import javax.lang.model.element.NestingKind; +import javax.tools.FileObject; +import javax.tools.JavaFileManager; +import javax.tools.JavaFileManager.Location; +import javax.tools.JavaFileObject; +import javax.tools.JavaFileObject.Kind; +import javax.tools.SimpleJavaFileObject; +import javax.tools.StandardLocation; +import org.netbeans.modules.jackpot30.backend.base.SourceRoot; + +/** + * + * @author lahvac + */ +public class Javac { + private static final Map<SourceRoot, Reference<Javac>> category2Javac = new WeakHashMap<SourceRoot, Reference<Javac>>(); + + static synchronized Javac get(SourceRoot sourceRoot) { + Reference<Javac> javacSR = category2Javac.get(sourceRoot); + Javac javac = javacSR != null ? javacSR.get() : null; + + if (javac == null) { + category2Javac.put(sourceRoot, new SoftReference<Javac>(javac = new Javac(sourceRoot))); + } + + return javac; + } + + private final SourceRoot sourceRoot; + private final AtomicReference<JavacTaskImpl> javacTask = new AtomicReference<JavacTaskImpl>(); + private final Map<String, CompilationInfo> path2CUT = new HashMap<String, CompilationInfo>(); + + private Javac(SourceRoot sourceRoot) { + this.sourceRoot = sourceRoot; + } + + public CompilationInfo parse(String relativePath) throws IOException, InterruptedException { + CompilationInfo result = path2CUT.get(relativePath); + + if (result == null) { + String content = org.netbeans.modules.jackpot30.source.api.API.readFileContent(sourceRoot.getCategory(), relativePath).replace("\r\n", "\n"); + CompilationUnitTree cut; + + try { + cut = doParse(relativePath, content); + } catch (ThreadDeath td) { + throw td; + } catch (Throwable ignore) { + javacTask.set(null); + cut = doParse(relativePath, content); + } + + path2CUT.put(relativePath, result = new CompilationInfo(this, cut, content)); + } + + return result; + } + + private CompilationUnitTree doParse(String relativePath, String content) throws IOException { + JavacTaskImpl javac = (JavacTaskImpl) getTask(); + Iterable<? extends CompilationUnitTree> cuts = javac.parse(new FileObjectImpl(relativePath, content)); + CompilationUnitTree cut = cuts.iterator().next(); + + javac.analyze(javac.enter(Collections.singletonList(cut))); + return cut; + } + + public JavacTask getTask() { + JavacTaskImpl jti = javacTask.get(); + + if (jti == null) { + FMImpl fm = new FMImpl(sourceRoot.getClassPath()); + javacTask.set(jti = JavacCreator.create(null, fm, null, Arrays.asList("-Xjcov", "-proc:none", "-XDshouldStopPolicy=FLOW"), null, Collections.<JavaFileObject>emptyList())); + TreeLoaderImpl.preRegister(jti.getContext()); + } + + return jti; + } + + private static class FileObjectImpl extends SimpleJavaFileObject { + private String text; + public FileObjectImpl(String relativePath, String text) { + super(URI.create("myfo:/" + relativePath), JavaFileObject.Kind.SOURCE); + this.text = text; + } + public CharSequence getCharContent(boolean ignoreEncodingErrors) { + return text; + } + } + + private static final Set<String> CLASSFILE_EXTENSIONS = new HashSet<String>(Arrays.asList("class", "sig")); + + private static final class FMImpl implements JavaFileManager { + + private final Collection<org.openide.filesystems.FileObject> classpath; + private final Map<org.openide.filesystems.FileObject, JFOImpl> files = new HashMap<org.openide.filesystems.FileObject, JFOImpl>(); + + public FMImpl(Collection<org.openide.filesystems.FileObject> classpath) { + this.classpath = classpath; + } + + @Override + public ClassLoader getClassLoader(Location location) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Iterable<JavaFileObject> list(Location location, String packageName, Set<Kind> kinds, boolean recurse) throws IOException { + assert !recurse; + if (!kinds.contains(Kind.CLASS) || location != StandardLocation.CLASS_PATH) return Collections.emptyList(); + + String dir = packageName.replace('.', '/'); + List<JavaFileObject> result = new ArrayList<JavaFileObject>(); + + for (org.openide.filesystems.FileObject root : classpath) { + org.openide.filesystems.FileObject dirFO = root.getFileObject(dir); + + if (dirFO != null) { + for (org.openide.filesystems.FileObject f : dirFO.getChildren()) { + if (!f.isData() || !CLASSFILE_EXTENSIONS.contains(f.getExt())) continue; + + JFOImpl jfo = files.get(f); + + if (jfo == null) { + files.put(f, jfo = new JFOImpl(f, packageName + "." + f.getName())); + } + + result.add(jfo); + } + } + } + + return result; + } + + @Override + public String inferBinaryName(Location location, JavaFileObject file) { + return ((JFOImpl) file).binaryName; + } + + @Override + public boolean isSameFile(FileObject a, FileObject b) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean handleOption(String current, Iterator<String> remaining) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean hasLocation(Location location) { + return StandardLocation.CLASS_PATH == location; + } + + @Override + public JavaFileObject getJavaFileForInput(Location location, String className, Kind kind) throws IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public JavaFileObject getJavaFileForOutput(Location location, String className, Kind kind, FileObject sibling) throws IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public FileObject getFileForInput(Location location, String packageName, String relativeName) throws IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public FileObject getFileForOutput(Location location, String packageName, String relativeName, FileObject sibling) throws IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void flush() throws IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void close() throws IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int isSupportedOption(String option) { + throw new UnsupportedOperationException("Not supported yet."); + } + } + + private static final class JFOImpl implements JavaFileObject { + + private final org.openide.filesystems.FileObject file; + private final String binaryName; + + public JFOImpl(org.openide.filesystems.FileObject file, String binaryName) { + this.file = file; + this.binaryName = binaryName; + } + + @Override + public Kind getKind() { + return Kind.CLASS; + } + + @Override + public boolean isNameCompatible(String simpleName, Kind kind) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public NestingKind getNestingKind() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Modifier getAccessLevel() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public URI toUri() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String getName() { + return file.getName(); + } + + @Override + public InputStream openInputStream() throws IOException { + return file.getInputStream(); + } + + @Override + public OutputStream openOutputStream() throws IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Reader openReader(boolean ignoreEncodingErrors) throws IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Writer openWriter() throws IOException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public long getLastModified() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean delete() { + throw new UnsupportedOperationException("Not supported yet."); + } + + } + + private static final class TreeLoaderImpl extends LazyTreeLoader { + public static void preRegister(Context ctx) { + ctx.put(lazyTreeLoaderKey, new Factory<LazyTreeLoader>() { + @Override public LazyTreeLoader make(Context ctx) { + return new TreeLoaderImpl(ctx); + } + }); + } + + public TreeLoaderImpl(Context ctx) { + ctx.put(lazyTreeLoaderKey, this); + } + + @Override + public void couplingError(ClassSymbol clazz, Tree t) { + //ignore... + } + + } +} http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/JavacCreator.java ---------------------------------------------------------------------- diff --git a/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/JavacCreator.java b/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/JavacCreator.java new file mode 100644 index 0000000..41dd325 --- /dev/null +++ b/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/JavacCreator.java @@ -0,0 +1,77 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright 2012 Oracle and/or its affiliates. All rights reserved. + * + * Oracle and Java are registered trademarks of Oracle and/or its affiliates. + * Other names may be trademarks of their respective owners. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common + * Development and Distribution License("CDDL") (collectively, the + * "License"). You may not use this file except in compliance with the + * License. You can obtain a copy of the License at + * http://www.netbeans.org/cddl-gplv2.html + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the + * specific language governing permissions and limitations under the + * License. When distributing the software, include this License Header + * Notice in each file and include the License file at + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the GPL Version 2 section of the License file that + * accompanied this code. If applicable, add the following below the + * License Header, with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * If you wish your version of this file to be governed by only the CDDL + * or only the GPL Version 2, indicate your decision by adding + * "[Contributor] elects to include this software in this distribution + * under the [CDDL or GPL Version 2] license." If you do not indicate a + * single choice of license, a recipient has the option to distribute + * your version of this file under either the CDDL, the GPL Version 2 or + * to extend the choice of license to its licensees as provided above. + * However, if you add GPL Version 2 code and therefore, elected the GPL + * Version 2 license, then the option applies only if the new code is + * made subject to such option by the copyright holder. + * + * Contributor(s): + * + * Portions Copyrighted 2012 Sun Microsystems, Inc. + */ +package org.netbeans.modules.jackpot30.resolve.api; + +import com.sun.tools.javac.api.JavacTaskImpl; +import java.io.Writer; +import javax.tools.DiagnosticListener; +import javax.tools.JavaFileManager; +import javax.tools.JavaFileObject; +import javax.tools.ToolProvider; +import org.openide.util.Lookup; + +/** + * + * @author lahvac + */ +public abstract class JavacCreator { + + public static JavacTaskImpl create(Writer out, + JavaFileManager fileManager, + DiagnosticListener<? super JavaFileObject> diagnosticListener, + Iterable<String> options, + Iterable<String> classes, + Iterable<? extends JavaFileObject> compilationUnits) { + JavacCreator c = Lookup.getDefault().lookup(JavacCreator.class); + + if (c != null) return c.doCreate(out, fileManager, diagnosticListener, options, classes, compilationUnits); + + return (JavacTaskImpl) ToolProvider.getSystemJavaCompiler().getTask(out, fileManager, diagnosticListener, options, classes, compilationUnits); + } + + protected abstract JavacTaskImpl doCreate(Writer out, + JavaFileManager fileManager, + DiagnosticListener<? super JavaFileObject> diagnosticListener, + Iterable<String> options, + Iterable<String> classes, + Iterable<? extends JavaFileObject> compilationUnits); +} http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/ResolveService.java ---------------------------------------------------------------------- diff --git a/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/ResolveService.java b/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/ResolveService.java new file mode 100644 index 0000000..6e329a7 --- /dev/null +++ b/remoting/server/web/resolve.web.api/src/org/netbeans/modules/jackpot30/resolve/api/ResolveService.java @@ -0,0 +1,296 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright 2012 Oracle and/or its affiliates. All rights reserved. + * + * Oracle and Java are registered trademarks of Oracle and/or its affiliates. + * Other names may be trademarks of their respective owners. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common + * Development and Distribution License("CDDL") (collectively, the + * "License"). You may not use this file except in compliance with the + * License. You can obtain a copy of the License at + * http://www.netbeans.org/cddl-gplv2.html + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the + * specific language governing permissions and limitations under the + * License. When distributing the software, include this License Header + * Notice in each file and include the License file at + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the GPL Version 2 section of the License file that + * accompanied this code. If applicable, add the following below the + * License Header, with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * If you wish your version of this file to be governed by only the CDDL + * or only the GPL Version 2, indicate your decision by adding + * "[Contributor] elects to include this software in this distribution + * under the [CDDL or GPL Version 2] license." If you do not indicate a + * single choice of license, a recipient has the option to distribute + * your version of this file under either the CDDL, the GPL Version 2 or + * to extend the choice of license to its licensees as provided above. + * However, if you add GPL Version 2 code and therefore, elected the GPL + * Version 2 license, then the option applies only if the new code is + * made subject to such option by the copyright holder. + * + * Contributor(s): + * + * Portions Copyrighted 2012 Sun Microsystems, Inc. + */ +package org.netbeans.modules.jackpot30.resolve.api; + +import com.sun.source.tree.ClassTree; +import com.sun.source.tree.IdentifierTree; +import com.sun.source.tree.MemberSelectTree; +import com.sun.source.tree.MethodTree; +import com.sun.source.tree.VariableTree; +import com.sun.source.util.TreePath; +import com.sun.source.util.TreePathScanner; +import com.sun.tools.javac.code.Flags; +import com.sun.tools.javac.tree.JCTree; +import com.sun.tools.javac.tree.JCTree.JCMethodDecl; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import javax.lang.model.element.Element; +import javax.lang.model.element.Name; +import org.netbeans.api.java.lexer.JavaTokenId; +import org.netbeans.api.java.source.ElementHandle; +import org.netbeans.api.lexer.TokenSequence; +import org.netbeans.modules.jackpot30.backend.base.CategoryStorage; +import org.netbeans.modules.jackpot30.backend.base.SourceRoot; +import org.netbeans.modules.java.source.indexing.JavaIndex; +import org.openide.filesystems.FileObject; + +/** + * + * @author lahvac + */ +public class ResolveService { + + static SourceRoot sourceRoot(CategoryStorage category, String relativePath) { + for (SourceRoot sr : category.getSourceRoots()) { + if (relativePath.startsWith(sr.getRelativePath())) { + return sr; + } + } + + throw new IllegalStateException(); + } + + Javac javacFor(String segment, String relative) throws IOException, InterruptedException { + CategoryStorage category = CategoryStorage.forId(segment); + return Javac.get(sourceRoot(category, relative)); + } + + public static CompilationInfo parse(String segment, String relative) throws IOException, InterruptedException { + CategoryStorage category = CategoryStorage.forId(segment); + Javac javac = Javac.get(sourceRoot(category, relative)); + return javac.parse(relative); + } + + public static String resolveSource(String segment, String relative, String signature) throws IOException, InterruptedException { + String fqn = topLevelClassFromSignature(signature); + SourceRoot sourceRoot = sourceRoot(CategoryStorage.forId(segment), relative); + List<String> classpathElements = new ArrayList<String>(); + + classpathElements.add(sourceRoot.getCode()); + + String classpath = sourceRoot.getClassPathString(); + + if (classpath != null) classpathElements.addAll(Arrays.asList(classpath.split(":"))); + + for (String element : classpathElements) { + if (element.endsWith(".jar")) continue; + + String file = fileForFQN(sourceRoot.getCategory(), element, fqn); + + if (file != null) { + return file; + } + } + + return null; + } + + public static Map<? extends CategoryStorage, ? extends Iterable<? extends String>> findSourcesContaining(String signature) throws IOException, InterruptedException { + Map<CategoryStorage, Iterable<? extends String>> result = new HashMap<CategoryStorage, Iterable<? extends String>>(); + String fqn = topLevelClassFromSignature(signature); + + for (CategoryStorage category : CategoryStorage.listCategories()) { + //would it be faster to check if the given class is in the current category? + + List<String> files = new ArrayList<String>(); + + for (SourceRoot sourceRoot : category.getSourceRoots()) { + String file = fileForFQN(category, sourceRoot.getCode(), fqn); + + if (file != null) { + files.add(file); + } + } + + if (!files.isEmpty()) { + result.put(category, files); + } + } + + return result; + } + + private static String fileForFQN(CategoryStorage category, String code, String fqn) throws IOException { + FileObject root = category.getEmbeddedJarRoot(code); + FileObject fqn2files = root != null ? root.getFileObject("java/" + JavaIndex.VERSION + "/fqn2files.properties") : null; + + if (fqn2files == null) return null; + + Properties props = new Properties(); + InputStream in = fqn2files.getInputStream(); + + try { + props.load(in); + } finally { + in.close(); + } + + String file = props.getProperty(fqn); + + if (file != null) { + return file.substring("rel:/".length()); + } + + return null; + } + + private static String topLevelClassFromSignature(String signature) { + String fqn = signature.split(":")[1]; + + if (fqn.indexOf('$') != (-1)) {//not fully correct + return fqn.substring(0, fqn.indexOf('$')); + } else { + return fqn; + } + } + + public static long[] nameSpan(CompilationInfo info, TreePath forTree) { + JCTree jcTree = (JCTree) forTree.getLeaf(); //XXX + Name name = null; + int pos = jcTree.pos; + + switch (forTree.getLeaf().getKind()) { + case IDENTIFIER: name = ((IdentifierTree) forTree.getLeaf()).getName(); break; + case MEMBER_SELECT: name = ((MemberSelectTree) forTree.getLeaf()).getIdentifier(); pos++; break; + case ANNOTATION_TYPE: case CLASS: + case ENUM: case INTERFACE: + name = ((ClassTree) forTree.getLeaf()).getSimpleName(); + + TokenSequence<JavaTokenId> ts = info.getTokenHierarchy().tokenSequence(JavaTokenId.language()); + + ts.move(pos); + + while (ts.moveNext()) { + if (ts.token().id() == JavaTokenId.IDENTIFIER) { + if (name.contentEquals(ts.token().text())) { + pos = ts.offset(); + } + break; + } + } + + break; + case METHOD: + if ((((JCMethodDecl) forTree.getLeaf()).getModifiers().flags & Flags.GENERATEDCONSTR) != 0) { + //no positions for generated constructors: + return new long[] {-1, -1, -1, -1}; + } + name = ((MethodTree) forTree.getLeaf()).getName(); + if (name.contentEquals("<init>")) { + name = ((ClassTree) forTree.getParentPath().getLeaf()).getSimpleName(); + } + break; + case VARIABLE: name = ((VariableTree) forTree.getLeaf()).getName(); break; + } + + if (name != null) { + return new long[] { + info.getTrees().getSourcePositions().getStartPosition(forTree.getCompilationUnit(), forTree.getLeaf()), + info.getTrees().getSourcePositions().getEndPosition(forTree.getCompilationUnit(), forTree.getLeaf()), + pos, + pos + name.length() + }; + } + + return new long[] { + info.getTrees().getSourcePositions().getStartPosition(forTree.getCompilationUnit(), forTree.getLeaf()), + info.getTrees().getSourcePositions().getEndPosition(forTree.getCompilationUnit(), forTree.getLeaf()), + info.getTrees().getSourcePositions().getStartPosition(forTree.getCompilationUnit(), forTree.getLeaf()), + info.getTrees().getSourcePositions().getEndPosition(forTree.getCompilationUnit(), forTree.getLeaf()) + }; + } + + public static long[] declarationSpans(final CompilationInfo info, final String signature) { + final long[][] result = new long[1][]; + + new TreePathScanner<Void, Void>() { + @Override public Void visitClass(ClassTree node, Void p) { + handleDeclaration(); + return super.visitClass(node, p); + } + @Override public Void visitMethod(MethodTree node, Void p) { + handleDeclaration(); + return super.visitMethod(node, p); + } + @Override public Void visitVariable(VariableTree node, Void p) { + handleDeclaration(); + return super.visitVariable(node, p); + } + private void handleDeclaration() { + Element el = info.getTrees().getElement(getCurrentPath()); + + if (el == null/*how?*/ || !JavaUtils.SUPPORTED_KINDS.contains(el.getKind())) return ; + + String thisSignature = JavaUtils.serialize(ElementHandle.create(el)); + + if (thisSignature.equals(signature)) { + result[0] = nameSpan(info, getCurrentPath()); + } + } + }.scan(info.getCompilationUnit(), null); + + return result[0]; + } + + public static List<long[]> usages(final CompilationInfo info, final String signature) { + final List<long[]> result = new ArrayList<long[]>(); + + new TreePathScanner<Void, Void>() { + @Override public Void visitIdentifier(IdentifierTree node, Void p) { + handle(); + return super.visitIdentifier(node, p); + } + @Override public Void visitMemberSelect(MemberSelectTree node, Void p) { + handle(); + return super.visitMemberSelect(node, p); + } + private void handle() { + Element el = info.getTrees().getElement(getCurrentPath()); + if (el == null || !JavaUtils.SUPPORTED_KINDS.contains(el.getKind())) return; + String thisSignature = JavaUtils.serialize(ElementHandle.create(el)); + + if (thisSignature.equals(signature)) { + result.add(ResolveService.nameSpan(info, getCurrentPath())); + } + } + }.scan(info.getCompilationUnit(), null); + + return result; + } + +} http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/web/source.web.api/build.xml ---------------------------------------------------------------------- diff --git a/remoting/server/web/source.web.api/build.xml b/remoting/server/web/source.web.api/build.xml new file mode 100644 index 0000000..f0495d7 --- /dev/null +++ b/remoting/server/web/source.web.api/build.xml @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + +Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved. + +Oracle and Java are registered trademarks of Oracle and/or its affiliates. +Other names may be trademarks of their respective owners. + +The contents of this file are subject to the terms of either the GNU +General Public License Version 2 only ("GPL") or the Common +Development and Distribution License("CDDL") (collectively, the +"License"). You may not use this file except in compliance with the +License. You can obtain a copy of the License at +http://www.netbeans.org/cddl-gplv2.html +or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the +specific language governing permissions and limitations under the +License. When distributing the software, include this License Header +Notice in each file and include the License file at +nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this +particular file as subject to the "Classpath" exception as provided +by Oracle in the GPL Version 2 section of the License file that +accompanied this code. If applicable, add the following below the +License Header, with the fields enclosed by brackets [] replaced by +your own identifying information: +"Portions Copyrighted [year] [name of copyright owner]" + +Contributor(s): + +The Original Software is NetBeans. The Initial Developer of the Original +Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun +Microsystems, Inc. All Rights Reserved. + +If you wish your version of this file to be governed by only the CDDL +or only the GPL Version 2, indicate your decision by adding +"[Contributor] elects to include this software in this distribution +under the [CDDL or GPL Version 2] license." If you do not indicate a +single choice of license, a recipient has the option to distribute +your version of this file under either the CDDL, the GPL Version 2 or +to extend the choice of license to its licensees as provided above. +However, if you add GPL Version 2 code and therefore, elected the GPL +Version 2 license, then the option applies only if the new code is +made subject to such option by the copyright holder. +--> +<!-- You may freely edit this file. See commented blocks below for --> +<!-- some examples of how to customize the build. --> +<!-- (If you delete it and reopen the project it will be recreated.) --> +<!-- By default, only the Clean and Build commands use this build script. --> +<!-- Commands such as Run, Debug, and Test only use this build script if --> +<!-- the Compile on Save feature is turned off for the project. --> +<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> +<!-- in the project's Project Properties dialog box.--> +<project name="source.web.api" default="default" basedir="."> + <description>Builds, tests, and runs the project source.web.api.</description> + <import file="nbproject/build-impl.xml"/> + <!-- + + There exist several targets which are by default empty and which can be + used for execution of your tasks. These targets are usually executed + before and after some main targets. They are: + + -pre-init: called before initialization of project properties + -post-init: called after initialization of project properties + -pre-compile: called before javac compilation + -post-compile: called after javac compilation + -pre-compile-single: called before javac compilation of single file + -post-compile-single: called after javac compilation of single file + -pre-compile-test: called before javac compilation of JUnit tests + -post-compile-test: called after javac compilation of JUnit tests + -pre-compile-test-single: called before javac compilation of single JUnit test + -post-compile-test-single: called after javac compilation of single JUunit test + -pre-jar: called before JAR building + -post-jar: called after JAR building + -post-clean: called after cleaning build products + + (Targets beginning with '-' are not intended to be called on their own.) + + Example of inserting an obfuscator after compilation could look like this: + + <target name="-post-compile"> + <obfuscate> + <fileset dir="${build.classes.dir}"/> + </obfuscate> + </target> + + For list of available properties check the imported + nbproject/build-impl.xml file. + + + Another way to customize the build is by overriding existing main targets. + The targets of interest are: + + -init-macrodef-javac: defines macro for javac compilation + -init-macrodef-junit: defines macro for junit execution + -init-macrodef-debug: defines macro for class debugging + -init-macrodef-java: defines macro for class execution + -do-jar: JAR building + run: execution of project + -javadoc-build: Javadoc generation + test-report: JUnit report generation + + An example of overriding the target for project execution could look like this: + + <target name="run" depends="source.web.api-impl.jar"> + <exec dir="bin" executable="launcher.exe"> + <arg file="${dist.jar}"/> + </exec> + </target> + + Notice that the overridden target depends on the jar target and not only on + the compile target as the regular run target does. Again, for a list of available + properties which you can use, check the target you are overriding in the + nbproject/build-impl.xml file. + + --> +</project> http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/web/source.web.api/manifest.mf ---------------------------------------------------------------------- diff --git a/remoting/server/web/source.web.api/manifest.mf b/remoting/server/web/source.web.api/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/remoting/server/web/source.web.api/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build +
