Examples of UserPreferences


Examples of com.salas.bb.domain.prefs.UserPreferences

     *
     * @param prefs preferences map.
     */
    private void storeFeedsPreferences(Map prefs)
    {
        UserPreferences up = model.getUserPreferences();
        FeedRenderingSettings frs = model.getGlobalRenderingSettings();

        setBoolean(prefs, "showStarz", frs.isShowStarz());
        setBoolean(prefs, "showUnreadInFeeds", frs.isShowUnreadInFeeds());
        setBoolean(prefs, "showActivityChart", frs.isShowActivityChart());

        setFilterColor(prefs, FeedClass.DISABLED);
        setFilterColor(prefs, FeedClass.INVALID);
        setFilterColor(prefs, FeedClass.LOW_RATED);
        setFilterColor(prefs, FeedClass.READ);
        setFilterColor(prefs, FeedClass.UNDISCOVERED);

        setBoolean(prefs, UserPreferences.PROP_SORTING_ENABLED, up.isSortingEnabled());
        setInt(prefs, UserPreferences.PROP_SORT_BY_CLASS_1, up.getSortByClass1());
        setInt(prefs, UserPreferences.PROP_SORT_BY_CLASS_2, up.getSortByClass2());
        setBoolean(prefs, UserPreferences.PROP_REVERSED_SORT_BY_CLASS_1,
            up.isReversedSortByClass1());
        setBoolean(prefs, UserPreferences.PROP_REVERSED_SORT_BY_CLASS_2,
            up.isReversedSortByClass2());
    }
View Full Code Here

Examples of com.socrata.datasync.config.userpreferences.UserPreferences

    @Test
    public void testConfiguration() throws ParseException {
        String[] args = {"-c", "src/test/resources/basic_test_config.json"};
        job.configure(parser.parse(cmd.options, args));

        UserPreferences userPrefs = job.getUserPrefs();

        TestCase.assertEquals("https://sandbox.demo.socrata.com", userPrefs.getDomain());
        TestCase.assertEquals("testuser@gmail.com", userPrefs.getUsername());
        TestCase.assertEquals("OpenData", userPrefs.getPassword());
        TestCase.assertEquals("D8Atrg62F2j017ZTdkMpuZ9vY", userPrefs.getAPIKey());
        TestCase.assertEquals("admin@something.com", userPrefs.getAdminEmail());
        TestCase.assertFalse(userPrefs.emailUponError());
        TestCase.assertEquals("smtp.something.com", userPrefs.getOutgoingMailServer());
        TestCase.assertEquals("21", userPrefs.getSmtpPort());
        TestCase.assertEquals("47", userPrefs.getSslPort());
        TestCase.assertEquals("test@something.com", userPrefs.getSmtpUsername());
        TestCase.assertEquals("smtppass", userPrefs.getSmtpPassword());
        TestCase.assertEquals("10", userPrefs.getFilesizeChunkingCutoffMB());
        TestCase.assertEquals("10000", userPrefs.getNumRowsPerChunk());
    }
View Full Code Here

Examples of com.svanloon.game.wizard.human.dialog.UserPreferences

    }
    return -1;
  }

  private String getIp() {
    UserPreferences up = new UserPreferencesManager().load();
    PromptDialog dialog = new PromptDialog(LanguageFactory.getInstance().getString(MessageId.ip), LanguageFactory.getInstance().getString(MessageId.whatIpDoYouWantToConnectTo), up.getIp(), false, 0, 255, -1);

    Point location = new Point(0,0);
    Dimension size = new Dimension(900,720);
    Dimension dialogSize = dialog.getSize();
    dialog.setLocation((int)(location.getX() + size.getWidth() / 2.0 - dialogSize.getWidth() / 2.0), (int)(location.getY() + size.getHeight()/2.0 - dialogSize.getHeight()/2.0));

    dialog.prompt();
    String ip = dialog.getValue();
    up.setIp(ip);
    new UserPreferencesManager().persist(up);
    return ip;
  }
View Full Code Here

Examples of edu.umd.cs.findbugs.config.UserPreferences

    preferences.clear();
    if (loadPlugins) {
      preferences.loadPlugins(project, plugins, enabledUserPluginIds, disabledUserPluginIds, enabledBundledPluginIds, disabledBundledPluginIds, detectors);
    }

    final UserPreferences userPrefs = UserPreferences.createDefaultUserPreferences();
    final ProjectFilterSettings filterSettings = userPrefs.getFilterSettings();
    preferences.setUserPreferences(userPrefs);
    preferences.setProperty(FindBugsPreferences.RUN_ANALYSIS_IN_BACKGROUND, false);
    //_preferences.setProperty(FindBugsPreferences.ANALYSIS_EFFORT_LEVEL, AnalysisEffort.valueOfLevel(AnalysisEffort.DEFAULT.getMessage()).getEffortLevel());
    preferences.setProperty(FindBugsPreferences.ANALYSIS_EFFORT_LEVEL, userPrefs.getEffort());
    //_preferences.setProperty(FindBugsPreferences.MIN_PRIORITY_TO_REPORT, ReportConfiguration.DEFAULT_PRIORITY);
    preferences.setProperty(FindBugsPreferences.MIN_PRIORITY_TO_REPORT, filterSettings.getMinPriority());
    preferences.setProperty(FindBugsPreferences.SHOW_HIDDEN_DETECTORS, false);
    preferences.setProperty(FindBugsPreferences.TOOLWINDOW_TO_FRONT, true);
    preferences.setProperty(FindBugsPreferences.ANALYZE_AFTER_COMPILE, false);
View Full Code Here

Examples of edu.umd.cs.findbugs.config.UserPreferences

            StringTokenizer tok = new StringTokenizer(argument, File.pathSeparator);
            while (tok.hasMoreTokens()) {
                project.addSourceDir(new File(tok.nextToken()).getAbsolutePath());
            }
        } else if(option.equals("-userPrefs")){
            UserPreferences prefs = UserPreferences.createDefaultUserPreferences();
            prefs.read(new FileInputStream(argument));
            project.setConfiguration(prefs);
        } else {
            super.handleOptionWithArgument(option, argument);
        }
    }
View Full Code Here

Examples of edu.umd.cs.findbugs.config.UserPreferences

        bugReporter = new BugCollectionBugReporter(project);
        bugReporter.setPriorityThreshold(Priorities.LOW_PRIORITY);
        bugReporter.setRankThreshold(BugRanker.VISIBLE_RANK_MAX);

        engine.setBugReporter(this.bugReporter);
        UserPreferences preferences = UserPreferences.createDefaultUserPreferences();
        for (String factory : enabledDetectors) {
            DetectorFactory detFactory = detectorFactoryCollection.getFactory(factory);
            preferences.enableDetector(detFactory, true);
        }
        preferences.getFilterSettings().clearAllCategories();
        this.engine.setUserPreferences(preferences);

        for (String s : analyzeMe) {
            project.addFile(getFindbugsTestCasesFile(s).getPath());
            if(s.indexOf("Eclipse") >= 0){
View Full Code Here

Examples of edu.umd.cs.findbugs.config.UserPreferences

        }
        customDetectorsInitialized = true;
        DetectorValidator validator = new DetectorValidator();
        final SortedSet<String> detectorPaths = new TreeSet<String>();
        SortedMap<String, String> contributedDetectors = DetectorsExtensionHelper.getContributedDetectors();
        UserPreferences corePreferences = getCorePreferences(null, false);
        detectorPaths.addAll(corePreferences.getCustomPlugins(true));
        if(DEBUG) {
            dumpClassLoader(FindbugsPlugin.class);
            dumpClassLoader(Plugin.class);
            System.out.println("applyCustomDetectors - going to add " + detectorPaths.size() + " plugin urls...");
            for (String url : detectorPaths) {
                System.out.println("\t" + url);
            }
        }

        // disable custom plugins configured via properties, if they are already loaded
        Set<String> disabledPlugins = corePreferences.getCustomPlugins(false);
        Map<URI, Plugin> allPlugins = Plugin.getAllPluginsMap();
        for (Entry<URI, Plugin> entry : allPlugins.entrySet()) {
            Plugin fbPlugin = entry.getValue();
            String pluginId = fbPlugin.getPluginId();
            // ignore all custom plugins with the same plugin id as already loaded
View Full Code Here

Examples of edu.umd.cs.findbugs.config.UserPreferences

    private static SortedBugCollection createDefaultEmptyBugCollection(IProject project) throws CoreException {
        SortedBugCollection bugCollection = new SortedBugCollection();
        Project fbProject = bugCollection.getProject();

        UserPreferences userPrefs = getUserPreferences(project);

        String cloudId = userPrefs.getCloudId();
        if (cloudId != null) {
            fbProject.setCloudId(cloudId);
        }
        cacheBugCollectionAndProject(project, bugCollection, fbProject);
        return bugCollection;
View Full Code Here

Examples of edu.umd.cs.findbugs.config.UserPreferences

            // throw, have to do this
            // here
            return;
        }

        UserPreferences prefs = getUserPreferences(project);
        bugCollection = new SortedBugCollection();
        bugCollection.getProject().setGuiCallback(new EclipseGuiCallback(project));
        bugCollection.setDoNotUseCloud(!useCloud);

        bugCollection.readXML(bugCollectionFile);
        if (useCloud) {
            String cloudId = prefs.getCloudId();
            if (cloudId != null) {
                bugCollection.getProject().setCloudId(cloudId);
            }
        }
View Full Code Here

Examples of edu.umd.cs.findbugs.config.UserPreferences

     * @return current project preferences, independently if project preferences
     *         are enabled or disabled for given project.
     */
    public static UserPreferences getProjectPreferences(IProject project, boolean forceRead) {
        try {
            UserPreferences prefs = (UserPreferences) project.getSessionProperty(SESSION_PROPERTY_USERPREFS);
            if (prefs == null || forceRead) {
                prefs = readUserPreferences(project);
                if (prefs == null) {
                    prefs = getWorkspacePreferences().clone();
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.