Package org.netbeans.server.uihandler.statistics.Help

Examples of org.netbeans.server.uihandler.statistics.Help.Invocations


    public Help() {
        super("Help", 2);
    }
   
    protected Invocations newData() {
        return new Invocations(Collections.<String,Integer>emptyMap());
    }
View Full Code Here


    }

    protected Invocations process(LogRecord rec) {
        if ("LOG_SHOWING_HELP".equals(rec.getMessage())) { // NOI18N
            String id = (String)rec.getParameters()[0];
            return new Invocations(Collections.<String,Integer>singletonMap(id, 1));
        }
        return null;
    }
View Full Code Here

            return null;
        }
       
       
        if (d.amounts.isEmpty()) {
            return new Invocations(d.amounts, 1, 0);
        } else {
            return new Invocations(d.amounts, 1, 1);
        }
    }
View Full Code Here

        for (Map.Entry<String, Integer> en : two.amounts.entrySet()) {
            Integer prev = sum.get(en.getKey());
            int future = prev == null ? en.getValue() : prev + en.getValue();
            sum.put(en.getKey(), future);
        }
        return new Invocations(sum, one.allSessions + two.allSessions, one.thoseThatUsedHelp + two.thoseThatUsedHelp);
    }
View Full Code Here

            int cnt = pref.getInt(k, 0);
            if (cnt > 0) {
                amounts.put(k, cnt);
            }
        }
        return new Invocations(
            amounts,
            allSessions,
            pref.getInt("thoseThatUsedHelp", 0)
        );
    }
View Full Code Here

       
        Object o = png.getAttribute("globalHelp");
        assertNotNull("global statistics created", o);
        assertEquals("Right class", Invocations.class, o.getClass());
       
        Invocations inv = (Invocations)o;
        Set<Invocations.One> set = inv.getTopTen();
        assertEquals("Two " + set, 2, set.size());
       
        Invocations.One[] arr = new Invocations.One[2];
        set.toArray(arr);
       
View Full Code Here

TOP

Related Classes of org.netbeans.server.uihandler.statistics.Help.Invocations

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.