Package org.netbeans.modules.exceptions.entity

Examples of org.netbeans.modules.exceptions.entity.Exceptions$DupChangesLogger


        Logfile log = new Logfile(userId, session);
        DbInsertion insertion = new DbInsertion(rec, thrown, new TestLogFileTask(em, log));
        ExceptionsData insertionResult = getInsertionData(insertion);
        waitLogsParsed();
        Query q =  em.createQuery("SELECT e from Exceptions e where id = " + insertionResult.getSubmitId());
        Exceptions exc = (Exceptions) q.getSingleResult();
        assertNotNull(exc);
        q = em.createQuery("select c from Comment c where c.submitId = " + exc.getId());
        assertEquals("no comment should be added", 0, q.getResultList().size());
    }
View Full Code Here


        TestHandler hand = new TestHandler();
        InputStream is = new FileInputStream(log);
        LogRecords.scan(is, hand);
        EntityManager em = perUtils.createEntityManager();
        Nbversion nbVersion = PersistenceUtils.getAll(em, Nbversion.class).get(0);
        Exceptions exc = PersistenceUtils.getAll(em, Exceptions.class).get(0);
        Patch patch = new Patch(PatchName, ModuleName, "1.1", nbVersion);
        em.getTransaction().begin();
        em.persist(patch);
        em.getTransaction().commit();
        List<String> list = new DetailAction().getPatches(em, exc, hand.list);
View Full Code Here

        String userId = "user";
        ServletRequest request = page.getRequest();

        EntityManager em = perUtils.createEntityManager();
        em.getTransaction().begin();
        Exceptions exc = new Exceptions(exceptionId);
        Report report = new Report(exceptionId);
        exc.setReportId(report);
        Stacktrace stack = new Stacktrace(Utils.getNextId(Stacktrace.class));
        Logfile logfile = new Logfile(userId, 0);
        ProductVersion pVersion = new ProductVersion(Utils.getNextId(ProductVersion.class));
        pVersion.setProductVersion("pVersion");
        Nbversion version = new Nbversion(Utils.getNextId(Nbversion.class));
        version.setVersion("version");
        pVersion.setNbversionId(version);
        logfile.setProductVersionId(pVersion);
        exc.setLogfileId(logfile);
        exc.setStacktrace(stack);
        em.persist(version);
        em.persist(pVersion);
        em.persist(logfile);
        em.persist(report);
        em.persist(stack);
View Full Code Here

    }

    private Submit createNewSubmit(EntityManager em, int id) {
        Submit sbm;
        if (id%2 == 0){
             sbm = new Exceptions(id);
        }else{
            Slowness slown = new Slowness(id);
            Method m = new Method(id);
            m.setName("hallo" + id);
            em.persist(m);
View Full Code Here

    }

    private Submit createSubmit(Integer issueId, int reportId, int submitId){
        Report r1 = new Report(reportId);
        r1.setIssueId(issueId);
        Submit s1 = new Exceptions(submitId);
        s1.setReportId(r1);
        return s1;
    }
View Full Code Here

    protected Submit createSubmit() {
        return createSubmit(Utils.getNextId(Exceptions.class));
    }

    protected Submit createSubmit(int id) {
        return new Exceptions(id);
    }
View Full Code Here

        waitLog(log, "112.15.14.13");
        EntityManager em = perUtils.createEntityManager();
        em.getTransaction().begin();
        List<Exceptions> excs = PersistenceUtils.getAll(em, Exceptions.class);
        assertFalse("an exception was already reported", excs.isEmpty());
        Exceptions exc = excs.iterator().next();
        String delimiter = ":::delim:::";
        String str = Utils.getStacktraceLines(exc, 5, delimiter);
        assertTrue(str, str.contains("NullPointerException" + delimiter));
        assertTrue(str, str.contains("org.netbeans.modules.visualweb.insync.models.FacesConfigModel.isBusted"));
        assertTrue(str, str.contains(")" + delimiter));
View Full Code Here

        waitLog(log, "112.15.14.13");
        EntityManager em = perUtils.createEntityManager();
        em.getTransaction().begin();
        List<Exceptions> excs = PersistenceUtils.getAll(em, Exceptions.class);
        assertFalse(excs.isEmpty());
        Exceptions exc = excs.iterator().next();
        String str = Utils.getStacktraceLines(exc, 5, "");
        assertFalse(str.contains("org.openide.util.RequestProcessor$Item"));
        assertTrue(str.contains("org.netbeans.spi.project.support.ant.SourcesHelper.addPrincipalSourceRoot"));
        em.getTransaction().commit();
        em.close();
View Full Code Here

        em.close();
    }

    @Test
    public void testGetStacktraceLinesSimple(){
        Exceptions exc = new Exceptions(1);
        Stacktrace st = new Stacktrace(1);
        Stacktrace st2 = new Stacktrace(2);
        exc.setStacktrace(st);
        st.setAnnotation(st2);
        st.setMessage("st");
        st.setLineCollection(Collections.<Line>emptyList());
        Method m1 = new Method(1);
        m1.setName("test1");
View Full Code Here

            request.setAttribute("error", "Id is not set you have probably used incorrect or incomplete link");
            return mapping.findForward(ERROR);
        }
        final int id = requestId;
        EntityManager em = getEntityManager(request);
        Exceptions exceptions = em.find(Exceptions.class, id);
        request.setAttribute("exceptions", exceptions);

        ArrayList<Line> lines = new ArrayList<Line>();
        Enumeration en = request.getParameterNames();
        while (en.hasMoreElements()) {
View Full Code Here

TOP

Related Classes of org.netbeans.modules.exceptions.entity.Exceptions$DupChangesLogger

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.