/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. * * 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. Sun designates this * particular file as subject to the "Classpath" exception as provided * by Sun 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 1997-2006 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. */ package org.netbeans.modules.javascript.editing; import java.io.File; import java.util.Collections; import java.util.EnumSet; import java.util.HashSet; import java.util.Set; import java.util.logging.Logger; import java.util.regex.Pattern; import javax.swing.Icon; import javax.swing.ImageIcon; import org.mozilla.nb.javascript.Node; import org.netbeans.modules.gsf.api.ElementHandle; import org.netbeans.modules.gsf.api.Index; import org.netbeans.modules.gsf.api.Index.SearchScope; import org.netbeans.modules.gsf.api.NameKind; import org.netbeans.modules.gsf.api.TypeSearcher; import org.netbeans.modules.gsf.api.TypeSearcher.GsfTypeDescriptor; import org.netbeans.api.project.FileOwnerQuery; import org.netbeans.api.project.Project; import org.netbeans.api.project.ProjectInformation; import org.netbeans.api.project.ProjectUtils; import org.netbeans.modules.gsf.api.CompilationInfo; import org.netbeans.modules.javascript.editing.lexer.JsTokenId; import org.netbeans.modules.javascript.editing.lexer.LexUtilities; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.DialogDisplayer; import org.openide.NotifyDescriptor; import org.openide.util.NbBundle; /** * * @todo Figure out why "base" searches gives me lower-case matches on "base" (which seems invalid) * * @author Tor Norbye */ public class JsTypeSearcher implements TypeSearcher { public JsTypeSearcher() { } private static boolean isAllUpper( String text ) { for( int i = 0; i < text.length(); i++ ) { char c = text.charAt(i); if (!Character.isUpperCase(c) && c != ':' ) { return false; } } return true; } private static Pattern camelCasePattern = Pattern.compile("(?:\\p{javaUpperCase}(?:\\p{javaLowerCase}|\\p{Digit}|\\:|\\.|\\$)*){2,}"); // NOI18N private static boolean isCamelCase(String text) { return camelCasePattern.matcher(text).matches(); } private NameKind cachedKind; private String cachedString = "/"; private NameKind adjustKind(NameKind kind, String text) { if (text.equals(cachedString)) { return cachedKind; } if (kind == NameKind.CASE_INSENSITIVE_PREFIX) { if ((isAllUpper(text) && text.length() > 1) || isCamelCase(text)) { kind = NameKind.CAMEL_CASE; } } cachedString = text; cachedKind = kind; return kind; } public Set getDeclaredTypes(Index gsfIndex, String textForQuery, NameKind kind, EnumSet scope, Helper helper) { // In addition to just computing the declared types here, we perform some additional // "second guessing" of the query. In particular, we want to allow double colons // to be part of the query names (to specify full module names), but since colon is // treated by the Open Type dialog as a regexp char, it will turn it into a regexp query // for example. Thus, I look at the query string and I might turn it into a different kind // of query. (We also allow #method suffixes which are handled here.) // if (textForQuery.endsWith("::")) { // textForQuery = textForQuery.substring(0, textForQuery.length()-2); // } else if (textForQuery.endsWith(":")) { // textForQuery = textForQuery.substring(0, textForQuery.length()-1); // } JsIndex index = JsIndex.get(gsfIndex); if (index == null) { return Collections.emptySet(); } kind = adjustKind(kind, textForQuery); if (kind == NameKind.CASE_INSENSITIVE_PREFIX /*|| kind == NameKind.CASE_INSENSITIVE_REGEXP*/) { textForQuery = textForQuery.toLowerCase(); } Set result = new HashSet(); Set elements; int dot = textForQuery.lastIndexOf('.'); if (dot != -1 && (kind == NameKind.PREFIX || kind == NameKind.CASE_INSENSITIVE_PREFIX)) { String prefix = textForQuery.substring(dot+1); String in = textForQuery.substring(0, dot); elements = index.getElements(prefix, in, kind, scope, null); } else { elements = index.getAllNames(textForQuery, kind, scope, null); } for (IndexedElement element : elements) { result.add(new JsTypeDescriptor(element, helper)); } // String method = null; // int methodIndex = textForQuery.indexOf('#'); // if (methodIndex != -1) { // method = textForQuery.substring(methodIndex+1); // textForQuery = textForQuery.substring(0, methodIndex); // } // // Set classes = null; // if (method == null || textForQuery.length() > 0) { // classes = index.getClasses(textForQuery, kind, true, false, false, scope, null); // } // // Set result = new HashSet(); // // if (method != null) { // // Query methods // Set methods = index.getMethods(method, null, kind, scope); // for (IndexedMethod m : methods) { // if (textForQuery.length() > 0 && m.getClz() != null) { // String in = m.getClz(); // switch (kind) { // case CASE_INSENSITIVE_REGEXP: // case REGEXP: // try { // if (in.indexOf("::") != -1 && textForQuery.indexOf("::") == -1) { // NOI18N // // Try matching each // boolean matches = false; // for (String c : in.split("::")) { // NOI18N // if (c.matches(textForQuery)) { // matches = true; // break; // } // } // // if (!matches) { // continue; // } // } else if (!in.matches(textForQuery)) { // continue; // } // } catch (Exception e) { // // Silently ignore errors in regexps since they can come from the user // } // break; // case CASE_INSENSITIVE_PREFIX: // if (!in.regionMatches(true, 0, textForQuery, 0, textForQuery.length())) { // continue; // } // break; // case PREFIX: // if (!in.regionMatches(false, 0, textForQuery, 0, textForQuery.length())) { // continue; // } // break; // case EXACT_NAME: // if (!in.equalsIgnoreCase(textForQuery)) { // continue; // } // } // } // result.add(new JsTypeDescriptor(m, helper)); // } // } else { // for (IndexedClass cls : classes) { // result.add(new JsTypeDescriptor(cls, helper)); // } // } return result; } public Set getSymbols(Index index, String textForQuery, NameKind kind, EnumSet scope, Helper helper) { // In addition to just computing the declared types here, we perform some additional // "second guessing" of the query. In particular, we want to allow double colons // to be part of the query names (to specify full module names), but since colon is // treated by the Open Type dialog as a regexp char, it will turn it into a regexp query // for example. Thus, I look at the query string and I might turn it into a different kind // of query. (We also allow #method suffixes which are handled here.) // if (textForQuery.endsWith("::")) { // textForQuery = textForQuery.substring(0, textForQuery.length()-2); // } else if (textForQuery.endsWith(":")) { // textForQuery = textForQuery.substring(0, textForQuery.length()-1); // } JsIndex index = JsIndex.get(gsfIndex); if (index == null) { return Collections.emptySet(); } kind = adjustKind(kind, textForQuery); if (kind == NameKind.CASE_INSENSITIVE_PREFIX /*|| kind == NameKind.CASE_INSENSITIVE_REGEXP*/) { textForQuery = textForQuery.toLowerCase(); } Set result = new HashSet(); Set elements; int dot = textForQuery.lastIndexOf('.'); if (dot != -1 && (kind == NameKind.PREFIX || kind == NameKind.CASE_INSENSITIVE_PREFIX)) { String prefix = textForQuery.substring(dot+1); String in = textForQuery.substring(0, dot); elements = index.getElements(prefix, in, kind, scope, null); } else { elements = index.getAllNames(textForQuery, kind, scope, null); } for (IndexedElement element : elements) { result.add(new JsTypeDescriptor(element, helper)); } // String method = null; // int methodIndex = textForQuery.indexOf('#'); // if (methodIndex != -1) { // method = textForQuery.substring(methodIndex+1); // textForQuery = textForQuery.substring(0, methodIndex); // } // // Set classes = null; // if (method == null || textForQuery.length() > 0) { // classes = index.getClasses(textForQuery, kind, true, false, false, scope, null); // } // // Set result = new HashSet(); // // if (method != null) { // // Query methods // Set methods = index.getMethods(method, null, kind, scope); // for (IndexedMethod m : methods) { // if (textForQuery.length() > 0 && m.getClz() != null) { // String in = m.getClz(); // switch (kind) { // case CASE_INSENSITIVE_REGEXP: // case REGEXP: // try { // if (in.indexOf("::") != -1 && textForQuery.indexOf("::") == -1) { // NOI18N // // Try matching each // boolean matches = false; // for (String c : in.split("::")) { // NOI18N // if (c.matches(textForQuery)) { // matches = true; // break; // } // } // // if (!matches) { // continue; // } // } else if (!in.matches(textForQuery)) { // continue; // } // } catch (Exception e) { // // Silently ignore errors in regexps since they can come from the user // } // break; // case CASE_INSENSITIVE_PREFIX: // if (!in.regionMatches(true, 0, textForQuery, 0, textForQuery.length())) { // continue; // } // break; // case PREFIX: // if (!in.regionMatches(false, 0, textForQuery, 0, textForQuery.length())) { // continue; // } // break; // case EXACT_NAME: // if (!in.equalsIgnoreCase(textForQuery)) { // continue; // } // } // } // result.add(new JsTypeDescriptor(m, helper)); // } // } else { // for (IndexedClass cls : classes) { // result.add(new JsTypeDescriptor(cls, helper)); // } // } return result; } private class JsTypeDescriptor extends GsfTypeDescriptor { private final IndexedElement element; private String projectName; private Icon projectIcon; private final Helper helper; private boolean isLibrary; private static final String ICON_PATH = "org/netbeans/modules/javascript/editing/javascript.png"; //NOI18N public JsTypeDescriptor(IndexedElement element, Helper helper) { this.element = element; this.helper = helper; } public Icon getIcon() { if (projectName == null) { initProjectInfo(); } //if (isLibrary) { // return new ImageIcon(org.openide.util.Utilities.loadImage(Js_KEYWORD)); //} return helper.getIcon(element); } public String getTypeName() { return element.getName(); } public String getProjectName() { if (projectName == null) { initProjectInfo(); } return projectName; } private void initProjectInfo() { FileObject fo = element.getFileObject(); if (fo != null) { File f = FileUtil.toFile(fo); Project p = FileOwnerQuery.getOwner(fo); if (p != null) { // JsPlatform platform = JsPlatform.platformFor(p); // if (platform != null) { // String lib = platform.getLib(); // if (lib != null && f.getPath().startsWith(lib)) { // projectName = "Js Library"; // isLibrary = true; // } // } else { ProjectInformation pi = ProjectUtils.getInformation(p); projectName = pi.getDisplayName(); projectIcon = pi.getIcon(); // } } } else { isLibrary = true; Logger.getLogger(JsTypeSearcher.class.getName()).fine("No fileobject for " + element.toString() + " with fileurl=" + element.getFilenameUrl()); } if (projectName == null) { projectName = ""; } } public Icon getProjectIcon() { if (projectName == null) { initProjectInfo(); } if (isLibrary) { return new ImageIcon(org.openide.util.Utilities.loadImage(ICON_PATH)); } return projectIcon; } public FileObject getFileObject() { return element.getFileObject(); } public void open() { CompilationInfo[] infoRet = new CompilationInfo[1]; Node node = AstUtilities.getForeignNode(element, infoRet); if (node != null) { int astOffset = AstUtilities.getRange(node).getStart(); int lexOffset = LexUtilities.getLexerOffset(infoRet[0], astOffset); if (lexOffset == -1) { lexOffset = 0; } NbUtilities.open(element.getFileObject(), lexOffset, element.getName()); return; } FileObject fileObject = element.getFileObject(); if (fileObject == null) { NotifyDescriptor nd = new NotifyDescriptor.Message(NbBundle.getMessage(JsTypeSearcher.class, "FileDeleted"), NotifyDescriptor.Message.ERROR_MESSAGE); DialogDisplayer.getDefault().notify(nd); // TODO: Try to remove the item from the index? Can't fix yet because the url is wiped // out by getFileObject (to avoid checking file existence multiple times; use a boolean // flag for that instead) return; } helper.open(fileObject, element); } public String getContextName() { // XXX This is lame - move formatting logic to the goto action! StringBuilder sb = new StringBuilder(); // String require = element.getRequire(); // String fqn = element.getFqn(); String fqn = element.getIn() != null ? element.getIn() + "." + element.getName() : element.getName(); if (element.getName().equals(fqn)) { fqn = null; } if (fqn != null/* || require != null*/) { sb.append(" ("); if (fqn != null) { sb.append(fqn); } // if (require != null) { // if (fqn != null) { // sb.append(" "); // } // sb.append("in "); // sb.append(require); // sb.append(".rb"); // } sb.append(")"); return sb.toString(); } else { return null; } } public ElementHandle getElement() { return element; } public int getOffset() { throw new UnsupportedOperationException("Not supported yet."); } public String getSimpleName() { return element.getName(); } public String getOuterName() { return null; } } private class JsTypeDescriptor extends GsfTypeDescriptor { private final IndexedElement element; private String projectName; private Icon projectIcon; private final Helper helper; private boolean isLibrary; private static final String ICON_PATH = "org/netbeans/modules/javascript/editing/javascript.png"; //NOI18N public JsTypeDescriptor(IndexedElement element, Helper helper) { this.element = element; this.helper = helper; } public Icon getIcon() { if (projectName == null) { initProjectInfo(); } //if (isLibrary) { // return new ImageIcon(org.openide.util.Utilities.loadImage(Js_KEYWORD)); //} return helper.getIcon(element); } public String getTypeName() { return element.getName(); } public String getProjectName() { if (projectName == null) { initProjectInfo(); } return projectName; } private void initProjectInfo() { FileObject fo = element.getFileObject(); if (fo != null) { File f = FileUtil.toFile(fo); Project p = FileOwnerQuery.getOwner(fo); if (p != null) { // JsPlatform platform = JsPlatform.platformFor(p); // if (platform != null) { // String lib = platform.getLib(); // if (lib != null && f.getPath().startsWith(lib)) { // projectName = "Js Library"; // isLibrary = true; // } // } else { ProjectInformation pi = ProjectUtils.getInformation(p); projectName = pi.getDisplayName(); projectIcon = pi.getIcon(); // } } } else { isLibrary = true; Logger.getLogger(JsTypeSearcher.class.getName()).fine("No fileobject for " + element.toString() + " with fileurl=" + element.getFilenameUrl()); } if (projectName == null) { projectName = ""; } } public Icon getProjectIcon() { if (projectName == null) { initProjectInfo(); } if (isLibrary) { return new ImageIcon(org.openide.util.Utilities.loadImage(ICON_PATH)); } return projectIcon; } public FileObject getFileObject() { return element.getFileObject(); } public void open() { CompilationInfo[] infoRet = new CompilationInfo[1]; Node node = AstUtilities.getForeignNode(element, infoRet); if (node != null) { int astOffset = AstUtilities.getRange(node).getStart(); int lexOffset = LexUtilities.getLexerOffset(infoRet[0], astOffset); if (lexOffset == -1) { lexOffset = 0; } NbUtilities.open(element.getFileObject(), lexOffset, element.getName()); return; } FileObject fileObject = element.getFileObject(); if (fileObject == null) { NotifyDescriptor nd = new NotifyDescriptor.Message(NbBundle.getMessage(JsTypeSearcher.class, "FileDeleted"), NotifyDescriptor.Message.ERROR_MESSAGE); DialogDisplayer.getDefault().notify(nd); // TODO: Try to remove the item from the index? Can't fix yet because the url is wiped // out by getFileObject (to avoid checking file existence multiple times; use a boolean // flag for that instead) return; } helper.open(fileObject, element); } public String getContextName() { // XXX This is lame - move formatting logic to the goto action! StringBuilder sb = new StringBuilder(); // String require = element.getRequire(); // String fqn = element.getFqn(); String fqn = element.getIn() != null ? element.getIn() + "." + element.getName() : element.getName(); if (element.getName().equals(fqn)) { fqn = null; } if (fqn != null/* || require != null*/) { sb.append(" ("); if (fqn != null) { sb.append(fqn); } // if (require != null) { // if (fqn != null) { // sb.append(" "); // } // sb.append("in "); // sb.append(require); // sb.append(".rb"); // } sb.append(")"); return sb.toString(); } else { return null; } } public ElementHandle getElement() { return element; } public int getOffset() { throw new UnsupportedOperationException("Not supported yet."); } public String getSimpleName() { return element.getName(); } public String getOuterName() { return null; } } public String getMimetype() { return JsTokenId.JAVASCRIPT_MIME_TYPE; } } ----- Classpath: --------------------------------------------- bootPath: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/laf.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/sunrsasign.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/charsets.jar:/System/Library/Java/Extensions/AppleScriptEngine.jar:/System/Library/Java/Extensions/CoreAudio.jar:/System/Library/Java/Extensions/dns_sd.jar:/System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/Extensions/j3dcore.jar:/System/Library/Java/Extensions/j3dutils.jar:/System/Library/Java/Extensions/jai_codec.jar:/System/Library/Java/Extensions/jai_core.jar:/System/Library/Java/Extensions/mlibwrapper_jai.jar:/System/Library/Java/Extensions/MRJToolkit.jar:/System/Library/Java/Extensions/QTJava.zip:/System/Library/Java/Extensions/vecmath.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/apple_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/dnsns.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/localedata.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/sunjce_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/sunpkcs11.jar classPath: /Users/tor/netbeans/hg/main/nbbuild/netbeans/gsf1/modules/org-mozilla-rhino-patched.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/gsf1/modules/org-netbeans-modules-gsf-api.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/gsf1/modules/org-netbeans-modules-html-editor.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/gsf1/modules/org-netbeans-modules-html-editor-lib.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/ide10/modules/org-netbeans-modules-editor-lib2.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/gsf1/modules/org-netbeans-modules-html-lexer.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/ide10/modules/org-netbeans-modules-editor-lib.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/platform9/modules/org-netbeans-modules-editor-mimelookup.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/ide10/modules/org-netbeans-modules-editor.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/ide10/modules/org-netbeans-modules-editor-settings.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/ide10/modules/org-netbeans-modules-jumpto.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/ide10/modules/org-netbeans-modules-lexer.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/platform9/modules/org-netbeans-modules-options-api.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/ide10/modules/org-netbeans-modules-projectapi.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/platform9/modules/org-openide-awt.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/platform9/modules/org-jdesktop-layout.jar:/Users/tor/netbeans/hg/main/o.jdesktop.layout/external/swing-layout-1.0.3.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/platform9/modules/org-openide-dialogs.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/platform9/core/org-openide-filesystems.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/platform9/modules/org-openide-loaders.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/platform9/lib/org-openide-modules.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/platform9/modules/org-openide-nodes.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/platform9/modules/org-openide-text.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/platform9/lib/org-openide-util.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/platform9/modules/org-openide-windows.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/platform9/modules/org-openide-io.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/ide10/modules/org-netbeans-modules-editor-deprecated-pre61settings.jar:/Users/tor/netbeans/hg/main/nbbuild/netbeans/java2/ant/lib/ant.jar sourcePath: /Users/tor/netbeans/hg/main/javascript.editing/src ----- Original exception --------------------------------------------- java.lang.NullPointerException at com.sun.tools.javac.comp.Flow.visitVarDef(Flow.java:746) at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:713) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow.scanStat(Flow.java:499) at com.sun.tools.javac.comp.Flow.scanDef(Flow.java:485) at com.sun.tools.javac.comp.Flow.visitClassDef(Flow.java:593) at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:588) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow.scanStat(Flow.java:499) at com.sun.tools.javac.comp.Flow.scanDef(Flow.java:485) at com.sun.tools.javac.comp.Flow.visitClassDef(Flow.java:632) at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:588) at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at com.sun.tools.javac.comp.Flow.analyzeTree(Flow.java:1300) at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1131) at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1094) at com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:445) at com.sun.tools.javac.api.JavacTaskImpl.analyze(JavacTaskImpl.java:425) at org.netbeans.api.java.source.JavaSource.moveToPhase(JavaSource.java:1317) at org.netbeans.api.java.source.JavaSource$CompilationJob.run(JavaSource.java:1659) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:613)