Package org.netbeans.server.uihandler.statistics.ProjectSize

Examples of org.netbeans.server.uihandler.statistics.ProjectSize.ProjectSizeBean


    @Override
    protected ProjectSizeBean process(LogRecord rec) {
        if (MESSAGE.equals(rec.getMessage())) {
            Object[] params = rec.getParameters();
            if ((params != null) && (params.length > 1)) {
                return new ProjectSizeBean(params);
            }
        }
        return newData();
    }
View Full Code Here


        }
        if (EMPTY.equals(two)) {
            return one;
        }
        assert (one.isStandardized() == two.isStandardized());
        ProjectSizeBean result = new ProjectSizeBean();
        if (one.isStandardized()) {
            result.javaFilesCounts = new HashMap<Integer, Integer>(one.javaFilesCounts);
            result.virtFilesCounts = new HashMap<Integer, Integer>(one.virtFilesCounts);
            result.userLogJavaFilesCounts = new HashMap<Integer, Integer>(one.userLogJavaFilesCounts);
            result.userLogVirtFilesCounts = new HashMap<Integer, Integer>(one.userLogVirtFilesCounts);
View Full Code Here

    protected ProjectSizeBean finishSessionUpload(String userId, int sessionNumber, boolean initialParse, ProjectSizeBean bean) {
        if (bean.equals(EMPTY)){
            return bean;
        }
        assert (!bean.isStandardized());
        ProjectSizeBean result = new ProjectSizeBean();
        result.javaFilesCounts = new HashMap<Integer, Integer>();
        result.virtFilesCounts = new HashMap<Integer, Integer>();
        int jfAll = 0;
        for (Map.Entry<String, Integer> entry : bean.sRootJavaFile.entrySet()) {
            add(result.javaFilesCounts, entry.getValue());
            jfAll += entry.getValue();
        }
        if (jfAll != 0){
            result.userLogJavaFilesCounts = Collections.singletonMap(jfAll, 1);
        }else{
            result.userLogJavaFilesCounts = Collections.emptyMap();
        }
        int vfAll = 0;
        for (Map.Entry<String, Integer> entry : bean.sRootVirtualFile.entrySet()) {
            add(result.virtFilesCounts, entry.getValue());
            vfAll += entry.getValue();
        }
        if (vfAll != 0){
            result.userLogVirtFilesCounts = Collections.singletonMap(vfAll, 1);
        }else{
            result.userLogVirtFilesCounts = Collections.emptyMap();
        }
        assert (result.isStandardized());
        return result;
    }
View Full Code Here

        writeMap(pref.node(USER_LOG_VIRTUAL_FILES), data.userLogVirtFilesCounts);
    }

    @Override
    protected ProjectSizeBean read(Preferences pref) throws BackingStoreException {
        ProjectSizeBean bean = new ProjectSizeBean();
        bean.javaFilesCounts = readCounts(pref.node(JAVA_FILES));
        bean.userLogJavaFilesCounts = readCounts(pref.node(USER_LOG_JAVA_FILES));
        bean.virtFilesCounts = readCounts(pref.node(VIRTUAL_FILES));
        bean.userLogVirtFilesCounts = readCounts(pref.node(USER_LOG_VIRTUAL_FILES));
        return bean;
View Full Code Here

TOP

Related Classes of org.netbeans.server.uihandler.statistics.ProjectSize.ProjectSizeBean

Copyright © 2018 www.massapicom. 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.