/** * Parse the argument as auxclasspath entries and add them * * @param argument */ private void addAuxClassPathEntries(String argument) { StringTokenizer tok = new StringTokenizer(argument, File.pathSeparator); while (tok.hasMoreTokens()) { project.addAuxClasspathEntry(tok.nextToken()); } }
/** * Handle -readAuxFromFile command line option by reading classpath entries * from a file and adding them to the project. * * @throws IOException */ private void handleAuxClassPathFromFile(String filePath) throws IOException { try (BufferedReader in = new BufferedReader(UTF8.fileReader(filePath))) { while (true) { String s = in.readLine(); if (s == null) { break; } project.addAuxClasspathEntry(s); } } }
@CheckReturnValue private Project createProject(Path[] files) { final Project project = new Project(); project.setProjectName(getClass().getSimpleName()); if (PLUGIN_JAR != null) { try { String pluginId = Plugin.addCustomPlugin(PLUGIN_JAR.toURI()).getPluginId(); project.setPluginStatusTrinary(pluginId, Boolean.TRUE); } catch (PluginException e) { throw new AssertionError("Failed to load plugin", e); } } for (Path file : files) { project.addFile(file.toAbsolutePath().toString()); } for (Path auxClasspathEntry : auxClasspathEntries) { project.addAuxClasspathEntry(auxClasspathEntry.toAbsolutePath().toString()); } return project; }
sourceDirs.add(makeAbsolute(getTextContents())); } else if ("AuxClasspathEntry".equals(qName)) { project.addAuxClasspathEntry(makeAbsolute(getTextContents()));
String path = f.getPath(); if (f.canRead() && path.endsWith(".jar")) { project.addAuxClasspathEntry(path); throw new RuntimeException(e); project.addAuxClasspathEntry(rootDirectory); } else { String[] cpParts = classpath.split(File.pathSeparator); File file = new File(cpStr); if (file.exists()) { project.addAuxClasspathEntry(file.getCanonicalPath());
project.addAuxClasspathEntry(classpath);
/** * Parse the argument as auxclasspath entries and add them * * @param argument */ private void addAuxClassPathEntries(String argument) { StringTokenizer tok = new StringTokenizer(argument, File.pathSeparator); while (tok.hasMoreTokens()) { project.addAuxClasspathEntry(tok.nextToken()); } }
/** * Handle -readAuxFromFile command line option by reading classpath entries * from a file and adding them to the project. * * @throws IOException */ private void handleAuxClassPathFromFile(String filePath) throws IOException { BufferedReader in = new BufferedReader(UTF8.fileReader(filePath)); try { while (true) { String s = in.readLine(); if (s == null) { break; } project.addAuxClasspathEntry(s); } } finally { Util.closeSilently(in); } }
/** * Create project. * @param basedir Base dir * @param outdir Output dir (with classes) * @param paths Paths of a classpath * @return The project */ private static Project project(final String basedir, final String outdir, final String... paths) { final Project project = new Project(); for (final String jar : paths) { if (!jar.equals(outdir)) { project.addAuxClasspathEntry(jar); } } project.addFile(outdir); project.addSourceDir(new File(basedir, "src/main/java").getPath()); return project; }
/** * Create project. * @param basedir Base dir * @param outdir Output dir (with classes) * @param paths Paths of a classpath * @return The project */ private static Project project(final String basedir, final String outdir, final String... paths) { final Project project = new Project(); for (final String jar : paths) { if (!jar.equals(outdir)) { project.addAuxClasspathEntry(jar); } } project.addFile(outdir); project.addSourceDir(new File(basedir, "src/main/java").getPath()); return project; }
private Project createProject() { final Project project = new Project(); PluginLoader.addPluginsTo(project); for (final AnalyzerConfig.Path clazz : config.getClassPaths()) { project.addFile(clazz.getPath()); } project.addSourceDirs(config.getSourcePaths().stream().map(AnalyzerConfig.Path::getPath).collect(toList())); final String pathSeparator = System.getProperty("path.separator"); final String classPath = System.getProperty("java.class.path"); for (final String entry : classPath.split(pathSeparator)) { project.addAuxClasspathEntry(entry); } return project; }
private Project createProject() { final Project project = new Project(); PluginLoader.addPluginsTo(project); for (final AnalyzerConfig.Path clazz : config.getClassPaths()) { project.addFile(clazz.getPath()); } project.addSourceDirs(config.getSourcePaths().stream().map(AnalyzerConfig.Path::getPath).collect(toList())); final String pathSeparator = System.getProperty("path.separator"); final String classPath = System.getProperty("java.class.path"); for (final String entry : classPath.split(pathSeparator)) { project.addAuxClasspathEntry(entry); } return project; }
findbugsProject.addAuxClasspathEntry(file.getCanonicalPath()); if (annotationsLib != null) { findbugsProject.addAuxClasspathEntry(annotationsLib.getCanonicalPath()); findbugsProject.addAuxClasspathEntry(jsr305Lib.getCanonicalPath());
project.addSourceDir(makeAbsolute(getTextContents())); } else if ("AuxClasspathEntry".equals(qName)) { project.addAuxClasspathEntry(makeAbsolute(getTextContents()));
@Override public void actionPerformed(ActionEvent evt) { final Project tempProject = new Project(); for (int i = 0; i < analyzeModel.getSize(); i++) { tempProject.addFile(analyzeModel.get(i)); } for (int i = 0; i < auxModel.getSize(); i++) { tempProject.addAuxClasspathEntry(auxModel.get(i)); } java.awt.EventQueue.invokeLater(new Runnable() { @Override public void run() { final SourceDirectoryWizard dialog = new SourceDirectoryWizard(new javax.swing.JFrame(), true, tempProject, thisGUI); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { if (dialog.discover != null && dialog.discover.isAlive()) { dialog.discover.interrupt(); } } }); dialog.setVisible(true); } }); } });
p.addAuxClasspathEntry(auxModel.get(i));