Skip to content

Commit 454d6a9

Browse files
authored
Merge pull request #131 from kdbinsidebrains/improvements
improvements
2 parents 920c31a + 65f0145 commit 454d6a9

20 files changed

+1168
-692
lines changed

CHANGELOG.md

Lines changed: 81 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# KdbInsideBrains Changelog
22

3+
## 6.4.0
4+
5+
### Added
6+
7+
- IDEA 2025.2 supporting added and used by default
8+
- Column type tooltip shown in TableResult view
9+
- Column type tooltip shown in Columns Filter panel of TableResult view
10+
- Sorting of primitive list columns: comparing by each list's item. The shortest list of all other items being equal.
11+
- Columns order, visibility and sorting are not reset if the schema is the same after reload
12+
13+
### Fixed
14+
15+
- Issue 130: Flip rows in Points Collector of Chart View causes NPE
16+
17+
### Changed
18+
19+
- Key column in dark mode is more visible now
20+
- TableView internal code redesigned for better supporting
21+
322
## 6.3.3
423

524
### Fixed
@@ -58,9 +77,9 @@ Technical release:
5877
### Changed
5978

6079
- Charting View tools redesigned:
61-
- Crosshair tool supports multiple range axes as well as candlestick
62-
- Values tools supports candlestick
63-
- Enabled tools stored in new optimized format
80+
- Crosshair tool supports multiple range axes as well as candlestick
81+
- Values tools supports candlestick
82+
- Enabled tools stored in new optimized format
6483

6584
### Fixed
6685

@@ -77,10 +96,10 @@ Technical release:
7796
### Added
7897

7998
- KDB 4.1 Syntax added: major code redesign to support new language features including:
80-
- Working with icons was fully redesigned as well
81-
- New type Dict has been introduced with a set of new formatting rules
82-
- New type TypeVariable introduced with a set of new formatting rules
83-
- Indexing redesigned to support new types
99+
- Working with icons was fully redesigned as well
100+
- New type Dict has been introduced with a set of new formatting rules
101+
- New type TypeVariable introduced with a set of new formatting rules
102+
- Indexing redesigned to support new types
84103
- Select/Deselect all Values in Charting added
85104

86105
### Changed
@@ -112,8 +131,8 @@ Technical release:
112131
### Changed
113132

114133
- Function docs logic changed:
115-
- if there is more than one definition with the same semantic - the longest description is shown
116-
- if there is more than one definition with differing semantics - list of all definitions is shown
134+
- if there is more than one definition with the same semantic - the longest description is shown
135+
- if there is more than one definition with differing semantics - list of all definitions is shown
117136

118137
## 5.15.1
119138

@@ -130,10 +149,10 @@ Technical release:
130149
### Added
131150

132151
- QSpec Testing Framework added for Unit-Testing (https://www.kdbinsidebrains.dev/testing):
133-
- Downloading the lib from GitHub that is attached a synthetic library to any project with KDB code
134-
- Running an expectation, a description or even a directory
135-
- Test cases code analysis, suggestions, and completion
136-
- Quick generate actions for: description, before, after and expectations
152+
- Downloading the lib from GitHub that is attached a synthetic library to any project with KDB code
153+
- Running an expectation, a description or even a directory
154+
- Test cases code analysis, suggestions, and completion
155+
- Quick generate actions for: description, before, after and expectations
137156
- Run local KDB Instance functionality was redesigned to support QSpec Testing Framework
138157
- Exclusion list of undefined variables has been added: any undefined variable can be added to the list, and will be
139158
undefined inspection will be disabled for the variable.
@@ -162,10 +181,10 @@ Technical release:
162181
### Changed
163182

164183
- Charting is fully redesigned (https://www.kdbinsidebrains.dev/features/charting):
165-
- Issue with dropping grouped data is fixed: new Operation term (_sum, count, avg, min, max_) was introduced
166-
- Added an ability to ungroup data by any symbol/text field and show as a separate line
167-
- Line style can be changed (color, width and so on) by clicking on the legend title now: settings are not stored
168-
over restarts yet
184+
- Issue with dropping grouped data is fixed: new Operation term (_sum, count, avg, min, max_) was introduced
185+
- Added an ability to ungroup data by any symbol/text field and show as a separate line
186+
- Line style can be changed (color, width and so on) by clicking on the legend title now: settings are not stored
187+
over restarts yet
169188
- Charting templates are not backward compatible and will be removed after the upgrade due to significant changes
170189

171190
## 5.13.1
@@ -179,9 +198,9 @@ Technical release:
179198
### Changed
180199

181200
- Credential functionality was redesigned to support easier IDEA versions migration:
182-
- the plugins folder changed from <IdeaSystem>/KdbInsideBrains to <user.home>/.kdbinb
183-
- the plugin file can be copied to <user.home>/.kdbinb for auto-installation alongside UI settings
184-
- Connection Settings dialog supports dynamic plugins reloading (by "Apply" button) now
201+
- the plugins folder changed from <IdeaSystem>/KdbInsideBrains to <user.home>/.kdbinb
202+
- the plugin file can be copied to <user.home>/.kdbinb for auto-installation alongside UI settings
203+
- Connection Settings dialog supports dynamic plugins reloading (by "Apply" button) now
185204

186205
## 5.12.0
187206

@@ -612,9 +631,9 @@ Technical release:
612631
### Added
613632

614633
- Charting templates have been introduced: https://www.kdbinsidebrains.dev/features/charting#templates:
615-
- Save/Restore a chart configuration
616-
- Quick charting by template
617-
- Templates manager
634+
- Save/Restore a chart configuration
635+
- Quick charting by template
636+
- Templates manager
618637

619638
### Fixed
620639

@@ -625,15 +644,15 @@ Technical release:
625644
### Added
626645

627646
- Dedicated Live Templates context (KDB+ Q) added with a few templates:
628-
- sel - create a simple select query: select ... from ... where
629-
- td - today: .z.d
630-
- yd - yesterday: .z.d-1
631-
- l10s - time within the last 10 seconds by time column
632-
- l5m - time within the last 5 minutes by time column
647+
- sel - create a simple select query: select ... from ... where
648+
- td - today: .z.d
649+
- yd - yesterday: .z.d-1
650+
- l10s - time within the last 10 seconds by time column
651+
- l5m - time within the last 5 minutes by time column
633652
- Code Completion improved for queries:
634-
- suggest a table name after 'from' keyword
635-
- the selection from a table, when columns are extracted and suggested in 'select', 'be' and 'where' sections
636-
- completion works for defined tables as well as loaded from the Inspector
653+
- suggest a table name after 'from' keyword
654+
- the selection from a table, when columns are extracted and suggested in 'select', 'be' and 'where' sections
655+
- completion works for defined tables as well as loaded from the Inspector
637656
- Keys are loaded from KDB Instance at inspection time, NOTE: The Inspector query was changed
638657

639658
### Fixed
@@ -661,9 +680,9 @@ Technical release:
661680
### Added
662681

663682
- Inspector has been improved and more functionality added:
664-
- Scroll to source
665-
- Diff with the source for a function
666-
- Restore expanded/selected item between connection change/refresh
683+
- Scroll to source
684+
- Diff with the source for a function
685+
- Restore expanded/selected item between connection change/refresh
667686

668687
### Fixed
669688

@@ -690,9 +709,9 @@ Technical release:
690709
in
691710
the
692711
plugin:
693-
- Split logs by months introduced: https://www.kdbinsidebrains.dev/settings/options#log-queries
694-
- Ability to change the background of the console for colored
695-
instances: https://www.kdbinsidebrains.dev/features/instances#highlighting-severity
712+
- Split logs by months introduced: https://www.kdbinsidebrains.dev/settings/options#log-queries
713+
- Ability to change the background of the console for colored
714+
instances: https://www.kdbinsidebrains.dev/features/instances#highlighting-severity
696715
- IDEA 2022.3 supporting added
697716

698717
### Fixed
@@ -767,9 +786,9 @@ Technical release:
767786
### Added
768787

769788
- Table declaration annotations added:
770-
- tailing semicolon marked as an error
771-
- set of semicolon (empty declarations) marked as an error
772-
- even expressions are allowed without column names, they are marked as a warning if it's not declaration
789+
- tailing semicolon marked as an error
790+
- set of semicolon (empty declarations) marked as an error
791+
- even expressions are allowed without column names, they are marked as a warning if it's not declaration
773792

774793
### Fixed
775794

@@ -871,9 +890,9 @@ Technical release:
871890
### Added
872891

873892
- CredentialsPlugin functionality redesigned:
874-
- plugins copied into Idea System folder (current approach will be auto-migrated)
875-
- duplicate plugins are not allowed and adding a new version replaces exist one
876-
- plugin version and description added (plugins must be recompiled)
893+
- plugins copied into Idea System folder (current approach will be auto-migrated)
894+
- duplicate plugins are not allowed and adding a new version replaces exist one
895+
- plugin version and description added (plugins must be recompiled)
877896

878897
## 1.5.0
879898

@@ -1003,9 +1022,9 @@ Technical release:
10031022

10041023
- Dark icons set added with IntelliJ Idea colors
10051024
- Charting is ready now:
1006-
- A New Magnet/Snap tool has been added with the ability to snap to line, vertex or disable the tool (default)
1007-
- The Values Tool shows only series values and no range values anymore
1008-
- Measure Tool has a context menu with remove/clear ability
1025+
- A New Magnet/Snap tool has been added with the ability to snap to line, vertex or disable the tool (default)
1026+
- The Values Tool shows only series values and no range values anymore
1027+
- Measure Tool has a context menu with remove/clear ability
10091028

10101029
## 0.20.0
10111030

@@ -1018,9 +1037,9 @@ Technical release:
10181037
### Changed
10191038

10201039
- Console behaviours changed:
1021-
- Closing a console tab closes the connection as well now
1022-
- Changing active console tab changes active connection, so it's the same as select active connection from the
1023-
toolbar
1040+
- Closing a console tab closes the connection as well now
1041+
- Changing active console tab changes active connection, so it's the same as select active connection from the
1042+
toolbar
10241043

10251044
## 0.19.0
10261045

@@ -1034,14 +1053,14 @@ Technical release:
10341053
- Table Result supports search by words and regex with or without case match
10351054
- Right side toolbar in charts view has been added instead of the context menu
10361055
- Charting tools have been introduced:
1037-
- **Crosshair tool** - to show current values for the mouse position
1038-
- **Measure tool** - draw measuring rectangles on the chart with values diff: left mouse click to start, move, left
1039-
mouse click to finish.
1040-
Esc to cancel current drawing.
1041-
- **Points collector** - save any chart clicked values into the points' collector table with the ability to export
1042-
or
1043-
send
1044-
into another KDB instance.
1056+
- **Crosshair tool** - to show current values for the mouse position
1057+
- **Measure tool** - draw measuring rectangles on the chart with values diff: left mouse click to start, move, left
1058+
mouse click to finish.
1059+
Esc to cancel current drawing.
1060+
- **Points collector** - save any chart clicked values into the points' collector table with the ability to export
1061+
or
1062+
send
1063+
into another KDB instance.
10451064

10461065
## 0.18.1
10471066

@@ -1056,9 +1075,9 @@ Technical release:
10561075
- Charting configuration has been redesigned
10571076
- Candlestick chart has been added
10581077
- Line charts have been updated:
1059-
- Spline, Steps, Bar, Area, Diff and Scatter line charts have been added
1060-
- Ability to change line width and show shapes added
1061-
- Transparent colors and axes orders added
1078+
- Spline, Steps, Bar, Area, Diff and Scatter line charts have been added
1079+
- Ability to change line width and show shapes added
1080+
- Transparent colors and axes orders added
10621081

10631082
## 0.17.1
10641083

@@ -1084,8 +1103,8 @@ Technical release:
10841103
### Changed
10851104

10861105
- Excel exporting format changed to xlsx (Excel 2007) instead of xls (Excel 95)
1087-
- 1,048,576 rows instead of 65,536 and 16,384 cols instead of 256
1088-
- Streams worksheet is used to reduce memory footprint
1106+
- 1,048,576 rows instead of 65,536 and 16,384 cols instead of 256
1107+
- Streams worksheet is used to reduce memory footprint
10891108
- Export actions run as a background task to reduce UI freeze
10901109

10911110
## 0.15.0

gradle.properties

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ pluginUntilBuild=243.*
1414
# or https://jb.gg/intellij-platform-builds-list
1515
# or https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html - check Releases and Snapshor for EAP
1616
#pluginVerifierVersions=2022.3, 2022.3.3, 2023.3.7, 2024.1.5, 2024.3
17-
pluginVerifierVersions=IC-2022.3, IC-2023.3, IC-2024.3.5, IC-2025.1.3
17+
pluginVerifierVersions=IC-2022.3, IC-2023.3, IC-2024.3.5, IC-2025.1.3, IC-2025.2
1818

1919
# IDEA Options
2020
platformType=IC
21-
platformVersion=2025.1.3
22-
platformPlugins=PsiViewer:251.175
21+
platformVersion=2025.2
22+
platformPlugins=PsiViewer:252.23892.248
23+
#platformVersion=2025.1.3
24+
#platformPlugins=PsiViewer:251.175
2325
#platformVersion=2024.3.5
2426
#platformPlugins=PsiViewer:243.7768
2527
#platformPlugins=com.jetbrains.hackathon.indices.viewer:1.29, PsiViewer:243.7768

src/main/java/org/kdb/inside/brains/UIUtils.java

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
import java.awt.image.BufferedImage;
3838
import java.nio.file.Files;
3939
import java.nio.file.Path;
40+
import java.util.HashMap;
41+
import java.util.Map;
4042
import java.util.function.Consumer;
4143
import java.util.function.Function;
4244
import java.util.function.Predicate;
@@ -47,6 +49,8 @@ public final class UIUtils {
4749

4850
public static final String KEY_COLUMN_PREFIX_XMAS = "\uD83C\uDF84";
4951

52+
private static final Map<Color, Color> KEY_COLUMN_COLORS = new HashMap<>();
53+
5054
private UIUtils() {
5155
}
5256

@@ -79,11 +83,20 @@ public static Color decodeColor(String hexColor) {
7983
return Color.decode(hexColor);
8084
}
8185

82-
public static Color getKeyColumnColor(Color c) {
83-
if (c == null) {
86+
public static Color getKeyColumnColor(Color color) {
87+
if (color == null) {
8488
return null;
8589
}
86-
return new Color(Math.max((int) (c.getRed() * 0.85), 0), Math.max((int) (c.getGreen() * 0.9), 0), Math.max((int) (c.getBlue() * 0.85), 0), c.getAlpha());
90+
return KEY_COLUMN_COLORS.computeIfAbsent(color, c -> {
91+
int r = c.getRed();
92+
int g = c.getGreen();
93+
int b = c.getBlue();
94+
int a = c.getAlpha();
95+
if (r < 125 && g < 125 && b < 125) { // dark
96+
return new Color(Math.min((int) (r * 1.15), 255), Math.min((int) (g * 1.3), 255), Math.min((int) (b * 1.15), 255), a);
97+
}
98+
return new Color(Math.max((int) (r * 0.85), 0), Math.max((int) (g * 0.9), 0), Math.max((int) (b * 0.85), 0), a);
99+
});
87100
}
88101

89102
// Taken from https://stackoverflow.com/questions/1126227/indexof-case-sensitive

src/main/java/org/kdb/inside/brains/view/QSearchSession.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@
2020
import java.util.regex.Pattern;
2121

2222
public class QSearchSession implements SearchSession {
23-
protected static final RangeExtractor[] NO_EXTRACTORS = new RangeExtractor[0];
2423
private final FindModel findModel;
2524
private final SearchReplaceComponent searchComponent;
25+
2626
private boolean internalChangeFlag;
2727

28-
public QSearchSession(@Nullable Project project, @NotNull JComponent component, @NotNull FindModel findModel) {
29-
this.findModel = findModel;
28+
protected static final RangeExtractor[] NO_EXTRACTORS = new RangeExtractor[0];
29+
30+
public QSearchSession(@Nullable Project project, @NotNull JComponent component) {
31+
this.findModel = new FindModel();
32+
findModel.setFindAll(true);
3033

3134
searchComponent = initializeComponent(SearchReplaceComponent.buildFor(project, component))
3235
.withDataProvider(dataId -> SearchSession.KEY.is(dataId) ? QSearchSession.this : null)

src/main/java/org/kdb/inside/brains/view/chart/ChartColumn.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import org.jdom.Element;
44
import org.kdb.inside.brains.KdbType;
5-
import org.kdb.inside.brains.view.console.table.QTableModel;
5+
import org.kdb.inside.brains.view.console.table.QColumnInfo;
66

77
import javax.swing.*;
88
import javax.swing.table.DefaultTableCellRenderer;
@@ -17,7 +17,7 @@ public record ChartColumn(String name, KdbType type) {
1717

1818
static final Set<KdbType> TEMPORAL_TYPES = Set.of(KdbType.SECOND, KdbType.MINUTE, KdbType.MONTH, KdbType.TIME, KdbType.DATE, KdbType.DATETIME, KdbType.TIMESPAN, KdbType.TIMESTAMP);
1919

20-
public ChartColumn(QTableModel.QColumnInfo info) {
20+
public ChartColumn(QColumnInfo info) {
2121
this(info.getName(), KdbType.typeOf(info.getColumnClass()));
2222
}
2323

src/main/java/org/kdb/inside/brains/view/chart/ChartDataProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import kx.c;
55
import org.jfree.data.time.*;
66
import org.kdb.inside.brains.KdbType;
7+
import org.kdb.inside.brains.view.console.table.QColumnInfo;
78
import org.kdb.inside.brains.view.console.table.QTableModel;
89
import org.kdb.inside.brains.view.console.table.TableResult;
910

@@ -30,7 +31,7 @@ static ChartDataProvider of(QTableModel model) {
3031

3132
final Map<ChartColumn, Object[]> cache = new HashMap<>();
3233

33-
final QTableModel.QColumnInfo[] modelCols = model.getColumns();
34+
final QColumnInfo[] modelCols = model.getColumnInfos();
3435
final List<ChartColumn> columns = Stream.of(modelCols).map(ChartColumn::new).toList();
3536

3637
return new ChartDataProvider() {

0 commit comments

Comments
 (0)