Package org.netbeans.server.componentsmatch

Examples of org.netbeans.server.componentsmatch.Component


        setUp("res/issue169810.nps");
        perUtils.persist(new InnocentClass("org.netbeans.core.TimableEventQueue"));
        Matcher.getDefault().reload();
        EntityManager em = perUtils.createEntityManager();
        em.getTransaction().begin();
        Component comp = sm.getComponent(em);
        em.getTransaction().commit();
        em.close();
        assertEquals("java and loader classes are ignored", new Component("logger", "uigestures"), comp);
    }
View Full Code Here


        setUp("res/cloneable_editor.nps");
        perUtils.persist(new InnocentClass("org.openide.text.CloneableEditor"));
        Matcher.getDefault().reload();
        EntityManager em = perUtils.createEntityManager();
        em.getTransaction().begin();
        Component comp = sm.getComponent(em);
        em.getTransaction().commit();
        em.close();
        assertEquals("CloneableEditor classes are ignored", new Component("qa", "Test Tools"), comp);
    }
View Full Code Here

            Utils.processPersistable(new Persistable.Query() {

                public TransactionResult runQuery(EntityManager em) {
                    StackTraceElement element = new StackTraceElement(className, methodName, null, 0);
                    Matcher matcher = Matcher.getDefault();
                    Component comp = matcher.match(em, new StackTraceElement[]{element});
                    register(request, comp);
                    return TransactionResult.NONE;
                }
            });
        }
        final String issueIdStr = request.getParameter("issue_id");
        if (issueIdStr != null){
            Utils.processPersistable(new Persistable.Query() {

                public TransactionResult runQuery(EntityManager em) {
                    Integer issueId = Integer.parseInt(issueIdStr);
                    Matcher match = Matcher.getDefault();
                    Submit sbm = Submit.getById(em, issueId);
                    if(sbm == null){
                        register(request, new Component("non existing submit with id", issueId.toString()));
                    }else{
                        Component comp;
                        if (sbm instanceof Exceptions) {
                            comp = match.match(em, ((Exceptions)sbm).getMockThrowable());
                        }else{
                            SlownessChecker checker = new SlownessChecker(em, null, sbm.getLogfileId());
                            comp = checker.getComponentForSlowness();
View Full Code Here

    private void register(HttpServletRequest request, Component comp){
        Logger.getLogger(ComponentMappingTest.class.getName()).info("registering component");
        if (comp != null){
            request.setAttribute("comp", comp);
        }else{
            request.setAttribute("comp", new Component("null", "null"));
        }
    }
View Full Code Here

TOP

Related Classes of org.netbeans.server.componentsmatch.Component

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.