This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (c) 2015, Francis Galiegue (fgaliegue@gmail.com) | |
| * | |
| * This software is dual-licensed under: | |
| * | |
| * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any | |
| * later version; | |
| * - the Apache Software License (ASL) version 2.0. | |
| * | |
| * The text of both licenses is available under the src/resources/ directory of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (c) 2015, Francis Galiegue (fgaliegue@gmail.com) | |
| * | |
| * This software is dual-licensed under: | |
| * | |
| * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any | |
| * later version; | |
| * - the Apache Software License (ASL) version 2.0. | |
| * | |
| * The text of both licenses is available under the src/resources/ directory of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (c) 2015, Francis Galiegue (fgaliegue@gmail.com) | |
| * | |
| * This software is dual-licensed under: | |
| * | |
| * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any | |
| * later version; | |
| * - the Apache Software License (ASL) version 2.0. | |
| * | |
| * The text of both licenses is available under the src/resources/ directory of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| public void handleLoadFileTest() | |
| throws IOException, SQLException | |
| { | |
| final Path path = mock(Path.class); | |
| final CsvTraceModel model = mock(CsvTraceModel.class); | |
| final CsvTracePresenter tracePresenter | |
| = mock(CsvTracePresenter.class); | |
| when(view.chooseFile()).thenReturn(path); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| public void handleLoadFileNoFileTest() | |
| { | |
| when(view.chooseFile()).thenReturn(null); | |
| presenter.handleLoadFile(); | |
| final InOrder inOrder = inOrder(factory, view); | |
| inOrder.verify(view).chooseFile(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| compile(group: "org.jooq", name: "jooq", version: "3.5.1"); | |
| // Uncomment this when the code generation needs to be rerun | |
| //compile(group: "org.jooq", name: "jooq-meta", version: "3.5.1"); | |
| //compile(group: "org.jooq", name: "jooq-codegen", version: "3.5.1"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Run a task in the background producing a value; schedule a task consuming | |
| * that value to run on the UI thread | |
| * | |
| * @param supplier the background task producing a value | |
| * @param consumer the UI thread task consuming that value | |
| * @param <T> type parameter of the produced/consume value | |
| */ | |
| public <T> void compute( | |
| @OnBackgroundThread final Supplier<? extends T> supplier, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void doRefreshTabs() | |
| { | |
| final ThrowingConsumer<CountDownLatch> await = CountDownLatch::await; | |
| tabs.stream().map(TabPresenter::refresh).forEach(await.orDoNothing()); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| public Map<Integer, Integer> getDepthMap(final int startLine, | |
| final int wantedLines) | |
| throws GrappaDebuggerException | |
| { | |
| loadInputBuffer(); | |
| final List<IndexRange> ranges | |
| = IntStream.range(startLine, startLine + wantedLines) | |
| .mapToObj(inputBuffer::getLineRange) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.github.fge.grappa.debugger.mainwindow; | |
| import com.github.fge.grappa.debugger.common.GuiTaskRunner; | |
| import com.github.fge.grappa.debugger.javafx.AlertFactory; | |
| import javafx.stage.Stage; | |
| import org.testng.annotations.BeforeMethod; | |
| import org.testng.annotations.Test; | |
| import java.io.IOException; | |
| import java.util.concurrent.ExecutorService; |