/** * @return Returns the userPreferences. */ private UserPreferences getUserPreferences() { return project.getConfiguration(); } }
/** * Load given project file. * * @param arg * name of project file * @throws java.io.IOException */ public void loadProject(String arg) throws IOException { Project newProject = Project.readProject(arg); newProject.setConfiguration(project.getConfiguration()); project = newProject; projectLoadedFromFile = true; } }
@Override protected void handleOptionWithArgument(String option, String argument) throws IOException { if ("-pluginList".equals(option)) { String pluginListStr = argument; Map<String, Boolean> customPlugins = getProject().getConfiguration().getCustomPlugins(); StringTokenizer tok = new StringTokenizer(pluginListStr, File.pathSeparator); while (tok.hasMoreTokens()) { File file = new File(tok.nextToken()); Boolean enabled = Boolean.valueOf(file.isFile()); customPlugins.put(file.getAbsolutePath(), enabled); if(enabled.booleanValue()) { try { Plugin.loadCustomPlugin(file, getProject()); } catch (PluginException e) { throw new IllegalStateException("Failed to load plugin " + "specified by the '-pluginList', file: " + file, e); } } } } else if ("-maxRank".equals(option)) { maxRank = Integer.parseInt(argument); } else if ("-summarizeMaxRank".equals(option)) { summarizeMaxRank = Integer.parseInt(argument); } else { throw new IllegalStateException(); } } }
@Override protected void handleOptionWithArgument(String option, String argument) throws IOException { if ("-home".equals(option)) { FindBugs.setHome(argument); } else if ("-pluginList".equals(option)) { String pluginListStr = argument; Map<String, Boolean> customPlugins = getProject().getConfiguration().getCustomPlugins(); StringTokenizer tok = new StringTokenizer(pluginListStr, File.pathSeparator); while (tok.hasMoreTokens()) { File file = new File(tok.nextToken()); Boolean enabled = Boolean.valueOf(file.isFile()); customPlugins.put(file.getAbsolutePath(), enabled); if(enabled.booleanValue()) { try { Plugin.loadCustomPlugin(file, getProject()); } catch (PluginException e) { throw new IllegalStateException("Failed to load plugin " + "specified by the '-pluginList', file: " + file, e); } } } } else if ("-project".equals(option)) { loadProject(argument); } else { throw new IllegalStateException(); } }
project.getConfiguration().getExcludeFilterFiles().put(argument, true); } else if ("-excludeBugs".equals(option)) { project.getConfiguration().getExcludeBugsFiles().put(argument, true); } else if ("-include".equals(option)) { project.getConfiguration().getIncludeFilterFiles().put(argument, true); } else if ("-auxclasspathFromFile".equals(option)) { handleAuxClassPathFromFile(argument);
/** * @return Returns the userPreferences. */ private UserPreferences getUserPreferences() { return project.getConfiguration(); } }
@Override protected void handleOptionWithArgument(String option, String argument) throws IOException { if ("-pluginList".equals(option)) { String pluginListStr = argument; Map<String, Boolean> customPlugins = getProject().getConfiguration().getCustomPlugins(); StringTokenizer tok = new StringTokenizer(pluginListStr, File.pathSeparator); while (tok.hasMoreTokens()) { File file = new File(tok.nextToken()); Boolean enabled = Boolean.valueOf(file.isFile()); customPlugins.put(file.getAbsolutePath(), enabled); if(enabled.booleanValue()) { try { Plugin.loadCustomPlugin(file, getProject()); } catch (PluginException e) { throw new IllegalStateException("Failed to load plugin " + "specified by the '-pluginList', file: " + file, e); } } } } else if ("-maxRank".equals(option)) { maxRank = Integer.parseInt(argument); } else if ("-summarizeMaxRank".equals(option)) { summarizeMaxRank = Integer.parseInt(argument); } else { throw new IllegalStateException(); } } }
/** * Load given project file. * * @param arg * name of project file * @throws java.io.IOException */ public void loadProject(String arg) throws IOException { Project newProject = Project.readProject(arg); newProject.setConfiguration(project.getConfiguration()); project = newProject; projectLoadedFromFile = true; } }
@Override protected void handleOptionWithArgument(String option, String argument) throws IOException { if ("-home".equals(option)) { FindBugs.setHome(argument); } else if ("-pluginList".equals(option)) { String pluginListStr = argument; Map<String, Boolean> customPlugins = getProject().getConfiguration().getCustomPlugins(); StringTokenizer tok = new StringTokenizer(pluginListStr, File.pathSeparator); while (tok.hasMoreTokens()) { File file = new File(tok.nextToken()); Boolean enabled = Boolean.valueOf(file.isFile()); customPlugins.put(file.getAbsolutePath(), enabled); if(enabled.booleanValue()) { try { Plugin.loadCustomPlugin(file, getProject()); } catch (PluginException e) { throw new IllegalStateException("Failed to load plugin " + "specified by the '-pluginList', file: " + file, e); } } } } else if ("-project".equals(option)) { loadProject(argument); } else { throw new IllegalStateException(); } }
project.getConfiguration().getExcludeFilterFiles().put(argument, true); } else if ("-excludeBugs".equals(option)) { project.getConfiguration().getExcludeBugsFiles().put(argument, true); } else if ("-include".equals(option)) { project.getConfiguration().getIncludeFilterFiles().put(argument, true); } else if ("-auxclasspathFromFile".equals(option)) { handleAuxClassPathFromFile(argument);