◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class PreferenceModel extends HashStructureAdapter {
static final String KEY_CLEAR_SCREEN = "clearScreen"
static final String KEY_AUTO_EXECUTE = "autoExecute"
static final String KEY_CHECK_RUN_UTPLSQL_TEST = "checkRunUtplsqlTest"
static final String KEY_NUMBER_OF_RUNS_IN_HISTORY = "numberOfRunsInHistory"
static final String KEY_SHOW_DISABLED_COUNTER = "showDisabledCounter"
static final String KEY_SHOW_WARNINGS_COUNTER = "showWarningsCounter"
Expand Up @@ -110,6 +111,14 @@ class PreferenceModel extends HashStructureAdapter {
getHashStructure.putBoolean(PreferenceModel.KEY_CHECK_RUN_UTPLSQL_TEST, checkRunUtplsqlTest)
}

def getNumberOfRunsInHistory() {
return getHashStructure.getInt(PreferenceModel.KEY_NUMBER_OF_RUNS_IN_HISTORY, 10)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class UtplsqlRunner implements RealtimeReporterEventConsumer {

private def initGUI() {
var RunnerView dockable = null
if (runningInSqlDeveloper && (dockable = RunnerFactory.dockable as RunnerView) === null) {
logger.severe('''Error getting utPLSQL dockable. Cannot run utPLSQL test.''')
return false
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import java.awt.event.ActionEvent
import java.awt.event.ActionListener
import java.awt.event.MouseEvent
import java.awt.event.MouseListener
import java.text.DecimalFormat
import java.util.ArrayList
import java.util.regex.Pattern
import javax.swing.BorderFactory
Expand Down Expand Up @@ -75,6 +74,7 @@ class RunnerPanel implements ActionListener, MouseListener, HyperlinkListener {
static val INDICATOR_WIDTH = 20
static val OVERVIEW_TABLE_ROW_HEIGHT = 20
static val TEXTPANE_DIM = new Dimension(100, 100)
LimitedLinkedHashMap<String, Run> runs = new LimitedLinkedHashMap<String, Run>(10)
Run currentRun
JPanel basePanel
Expand Down Expand Up @@ -338,6 +338,7 @@ class RunnerPanel implements ActionListener, MouseListener, HyperlinkListener {
fixCheckBoxMenuItem(showInfoIndicatorCheckBoxMenuItem)
syncDetailTabCheckBoxMenuItem.selected = preferences.syncDetailTab
fixCheckBoxMenuItem(syncDetailTabCheckBoxMenuItem)
}

def setModel(Run run) {
Expand All @@ -349,7 +350,13 @@ class RunnerPanel implements ActionListener, MouseListener, HyperlinkListener {
private def setCurrentRun(Run run) {
if (run !== currentRun) {
currentRun = run
testOverviewTableModel.setModel(run.tests, showTestDescriptionCheckBoxMenuItem.selected)
resetDerived
val item = new ComboBoxItem<String, String>(currentRun.reporterId, currentRun.name)
runComboBox.selectedItem = item
Expand Down Expand Up @@ -640,12 +647,10 @@ class RunnerPanel implements ActionListener, MouseListener, HyperlinkListener {
}

static class TimeFormatRenderer extends DefaultTableCellRenderer {
static val DecimalFormat formatter = new DecimalFormat("#,##0.000")

override getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
int row, int col) {
val renderedValue = if (value === null) {null} else {formatter.format(value as Number)}
return super.getTableCellRendererComponent(table, renderedValue, isSelected, hasFocus, row, col)
}
}

Expand Down
72 changes: 72 additions & 0 deletions sqldev/src/main/java/org/utplsql/sqldev/ui/runner/SmartTime.xtend
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class TestOverviewTableModel extends DefaultTableModel {
String commonPrefix
boolean commonPrefixCalculated
boolean showDescription

new() {
super()
Expand All @@ -40,10 +41,11 @@ class TestOverviewTableModel extends DefaultTableModel {
}
}

def setModel(LinkedHashMap<String, Test> tests, boolean showDescription) {
commonPrefixCalculated = false
this.tests = tests
this.showDescription = showDescription
calcCommonPrefix
fireTableDataChanged()
}
Expand All @@ -70,6 +72,11 @@ class TestOverviewTableModel extends DefaultTableModel {
}
}

def getTest(int row) {
val entry = tests.entrySet.get(row)
val test = tests.get(entry.key)
Expand Down Expand Up @@ -120,7 +127,7 @@ class TestOverviewTableModel extends DefaultTableModel {

override getColumnName(int col) {
return #["", "", "", UtplsqlResources.getString(if (showDescription) {"RUNNER_DESCRIPTION_LABEL"} else {"RUNNER_TEST_ID_COLUMN"}),
UtplsqlResources.getString("RUNNER_TEST_EXECUTION_TIME_COLUMN")].get(col)
}

override isCellEditable(int row, int column) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ PREF_RESET_PACKAGE_LABEL=Reset package before running utPLSQL?
PREF_CLEAR_SCREEN_LABEL=Clear script output panel before running utPLSQL?
PREF_AUTO_EXECUTE_LABEL=Execute unit test automatically?
PREF_CHECK_RUN_UTPLSQL_TEST_LABEL=Check availability of menu option?
PREF_IMPORT_SNIPPETS_BUTTON_LABEL=Import Snippets
MENU_REALTIME_REPORTER_LABEL=Realtime Reporter
PREF_NUMBER_OF_RUNS_IN_HISTORY_LABEL=Number of runs in history
Expand Down Expand Up @@ -89,7 +90,7 @@ RUNNER_NO_TESTS_FOUND_TEXT=No tests found.
RUNNER_RUN_MENUITEM=Run test
RUNNER_RUN_WORKSHEET_MENUITEM=Run test in new worksheet
RUNNER_TEST_ID_COLUMN=Suitepath
RUNNER_TEST_EXECUTION_TIME_COLUMN=Time [s]
RUNNER_OWNER_LABEL=Owner
RUNNER_PACKAGE_LABEL=Package
RUNNER_PROCEDURE_LABEL=Procedure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ PREF_RESET_PACKAGE_LABEL=Package vor der Ausf
PREF_CLEAR_SCREEN_LABEL=Skriptausgabe-Fenster vor der Ausf�hrung von utPLSQL leeren?
PREF_AUTO_EXECUTE_LABEL=Unit Test automatisch ausf�hren?
PREF_CHECK_RUN_UTPLSQL_TEST_LABEL=Verf�gbarkeit der Men�option pr�fen?
PREF_IMPORT_SNIPPETS_BUTTON_LABEL=Code-Schnipsel importieren
MENU_REALTIME_REPORTER_LABEL=Realtime Reporter
PREF_NUMBER_OF_RUNS_IN_HISTORY_LABEL=Anzahl Ausf�hrungen in der Historie
Expand Down Expand Up @@ -66,7 +67,7 @@ RUNNER_NO_TESTS_FOUND_TEXT=Keine Tests gefunden.
RUNNER_RUN_MENUITEM=Run testTest ausf�hren
RUNNER_RUN_WORKSHEET_MENUITEM=Test in neuem Arbeitsblatt ausf�hruen
RUNNER_TEST_ID_COLUMN_NAME=Suitepath
RUNNER_TEST_EXECUTION_TIME_COLUMN_NAME=Zeit [s]
RUNNER_OWNER_LABEL=Besitzer
RUNNER_PACKAGE_LABEL=Paket
RUNNER_PROCEDURE_LABEL=Prozedur
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CodeCoverageReporterDialogTest extends AbstractJdbcTest{
val reporter = new CodeCoverageReporter(#["SCOTT"], #['a', 'b', 'c'], dataSource.connection)
reporter.showParameterWindow
Thread.sleep(4 * 1000)
reporter.frame.exit
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class RealtimeReporterFetchSizeTest extends AbstractJdbcTest {

@Test
def void delayFreeStreamingConsumtion() {
val long TOLERANCE_MS = 400
var ds = new SingleConnectionDataSource()
ds.driverClassName = "oracle.jdbc.OracleDriver"
ds.url = dataSource.url
Expand Down
Loading
Toggle all file notes Toggle all file annotations