Package com.mountainminds.eclemma.core

Examples of com.mountainminds.eclemma.core.ICoverageSession


    } catch (NullPointerException npe) {
    }
  }
 
  public void testRemoveSession1() {
    ICoverageSession s0 = new DummySession();
    manager.addSession(s0, true, null);
    manager.removeSession(s0);
    assertEquals(0, manager.getSessions().length);
    assertNull(manager.getActiveSession());
    reflistener.sessionAdded(s0);
View Full Code Here


    reflistener.sessionActivated(null);
    assertEquals(reflistener, listener);
  }

  public void testRemoveSession2() {
    ICoverageSession s0 = new DummySession();
    ICoverageSession s1 = new DummySession();
    manager.addSession(s0, false, null);
    manager.addSession(s1, true, null);
    manager.removeSession(s1);
    ICoverageSession[] sessions = manager.getSessions();
    assertEquals(1, sessions.length);
View Full Code Here

  }
 
  public void testRemoveSession3() {
    Object key0 = new Object();
    Object key1 = new Object();
    ICoverageSession s0 = new DummySession();
    ICoverageSession s1 = new DummySession();
    manager.addSession(s0, false, key0);
    manager.addSession(s1, true, key1);
    manager.removeSession(key1);
    ICoverageSession[] sessions = manager.getSessions();
    assertEquals(1, sessions.length);
View Full Code Here

 
  public void testRemoveSession4() {
    Object key0 = new Object();
    Object key1 = new Object();
    Object key2 = new Object();
    ICoverageSession s0 = new DummySession();
    ICoverageSession s1 = new DummySession();
    manager.addSession(s0, false, key0);
    manager.addSession(s1, true, key1);
    manager.removeSession(key2);
    assertEquals(2, manager.getSessions().length);
  }
View Full Code Here

    manager.removeSession(key2);
    assertEquals(2, manager.getSessions().length);
  }
 
  public void testRemoveAllSessions1() {
    ICoverageSession s0 = new DummySession();
    ICoverageSession s1 = new DummySession();
    manager.addSession(s0, false, null);
    manager.addSession(s1, true, null);
    manager.removeAllSessions();
    assertEquals(0, manager.getSessions().length);
    assertNull(manager.getActiveSession());
View Full Code Here

  public void testGetSession1() {
    Object key0 = new Object();
    Object key1 = new Object();
    Object key2 = new Object();
    ICoverageSession s0 = new DummySession();
    ICoverageSession s1 = new DummySession();
    manager.addSession(s0, false, key0);
    manager.addSession(s1, false, key1);
    assertEquals(s0, manager.getSession(key0));
    assertEquals(s1, manager.getSession(key1));
    assertNull(manager.getSession(key2));
View Full Code Here

  public void importSession(IProgressMonitor monitor) throws CoreException {
    monitor.beginTask(CoreMessages.ImportingSession_task, 2);
    IInstrumentation[] instr = instrument(new SubProgressMonitor(monitor, 1));
    IPath[] cfiles = new IPath[1];
    cfiles[0] = createCopy(new SubProgressMonitor(monitor, 1));
    ICoverageSession s = CoverageTools.createCoverageSession(description, instr, cfiles, null);
    CoverageTools.getSessionManager().addSession(s, true, null);
    monitor.done();
  }
View Full Code Here

    removeSession(getSession(key));
  }

  public void removeAllSessions() {
    while (!sessions.isEmpty()) {
      ICoverageSession session = (ICoverageSession) sessions.remove(0);
      keymap.values().remove(session);
      fireSessionRemoved(session);
    }
    if (activeSession != null) {
      activeSession = null;
View Full Code Here

  }
 
  protected void updateActions() {
    tree.getDisplay().asyncExec(new Runnable() {
      public void run() {
        ICoverageSession active = CoverageTools.getSessionManager().getActiveSession();
        setContentDescription(active == null ? "" : active.getDescription()); //$NON-NLS-1$
        relaunchSessionAction.setEnabled(active != null && active.getLaunchConfiguration() != null);
        ICoverageSession[] sessions = CoverageTools.getSessionManager().getSessions();
        boolean atLeastOne = sessions.length >= 1;
        removeActiveSessionAction.setEnabled(atLeastOne);
        removeAllSessionsAction.setEnabled(atLeastOne);
        exportAction.setEnabled(atLeastOne);
View Full Code Here

  }
 
  protected void updateActions() {
    tree.getDisplay().asyncExec(new Runnable() {
      public void run() {
        ICoverageSession active = CoverageTools.getSessionManager().getActiveSession();
        setContentDescription(active == null ? "" : active.getDescription()); //$NON-NLS-1$
        relaunchSessionAction.setEnabled(active != null && active.getLaunchConfiguration() != null);
        ICoverageSession[] sessions = CoverageTools.getSessionManager().getSessions();
        boolean atLeastOne = sessions.length >= 1;
        removeActiveSessionAction.setEnabled(atLeastOne);
        removeAllSessionsAction.setEnabled(atLeastOne);
        exportAction.setEnabled(atLeastOne);
View Full Code Here

TOP

Related Classes of com.mountainminds.eclemma.core.ICoverageSession

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.