Skip to content

Commit c93c358

Browse files
committed
Release 11.0.0
1 parent 266881f commit c93c358

11 files changed

Lines changed: 161 additions & 17 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,11 @@ jobs:
127127
128128
## What's Changed
129129
130-
- Supersedes 9.0.0 as the current stable release.
131-
- Added localized action names, menu text, dialogs, and user messages for 20 popular locales.
132-
- Improved large-table performance by reducing table parsing, display-width, and formatting overhead.
133-
- Added release-blocking Java/C++ core performance benchmarks to CI.
134-
- Preserved Java/C++ core parity for trimmed pipe rows, escaped pipes, Unicode/CJK width, CSV/TSV conversion, sorting, and row/column edits.
135-
- Kept the non-conflicting Tab plus Ctrl+Alt+Shift shortcut scheme from 9.0.0.
130+
- Added Narrow Column and Widen Column commands with Ctrl+Alt+Shift+, and Ctrl+Alt+Shift+. shortcuts.
131+
- Kept Java/C++ wrapping behavior in sync for manual column resizing, long-cell continuation rows, protected Markdown links, code spans, and narrow-width hard wrapping.
132+
- Improved table fitting so continuation rows are rejoined before a table is fitted to a wider editor window.
133+
- Added bottom-left IDE status bar buttons for Light Auto Align and Power Auto Fit modes.
134+
- Preserved alignment, sorting, CSV/TSV conversion, escaped pipes, UTF-8/CJK width handling, caret placement, and row/column edits.
136135
- Built the JetBrains IDE plugin package on GitHub Actions.
137136
- Included SHA-256 sums for release verification.
138137

‎MARKETPLACE_SUBMISSION.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ Status: release metadata for version `@PLUGIN_VERSION@`; generated from Gradle's
3131

3232
## Short description
3333

34-
Edit Markdown pipe tables directly in JetBrains IDEs: align with Tab, sort rows, convert CSV/TSV, insert tables by size, and manage rows or columns without leaving the editor.
34+
Edit Markdown pipe tables directly in JetBrains IDEs: align with Tab, fit table width, narrow or widen columns, sort rows, convert CSV/TSV, insert tables by size, and manage rows or columns without leaving the editor.
3535

3636
## Marketplace update text
3737

3838
Use this for the JetBrains Marketplace version notes for `@PLUGIN_VERSION@` if the upload flow asks for release text:
3939

4040
```html
4141
<ul>
42-
<li>Added localized action names, menu text, dialogs, and user messages for 20 popular locales.</li>
43-
<li>Improved large-table performance by reducing table parsing, display-width, and formatting overhead.</li>
44-
<li>Added release-blocking Java/C++ core performance benchmarks to CI.</li>
45-
<li>Preserved Java/C++ core parity for trimmed pipe rows, escaped pipes, Unicode/CJK width, CSV/TSV conversion, sorting, and row/column edits.</li>
46-
<li>Kept the non-conflicting Tab plus Ctrl+Alt+Shift shortcut scheme from 9.0.0.</li>
42+
<li>Added Narrow Column and Widen Column commands with Ctrl+Alt+Shift+, and Ctrl+Alt+Shift+. shortcuts.</li>
43+
<li>Kept Java/C++ wrapping behavior in sync for manual column resizing, long-cell continuation rows, protected Markdown links, code spans, and narrow-width hard wrapping.</li>
44+
<li>Improved table fitting so continuation rows are rejoined before a table is fitted to a wider editor window.</li>
45+
<li>Added bottom-left IDE status bar buttons for Light Auto Align and Power Auto Fit modes.</li>
46+
<li>Preserved alignment, sorting, CSV/TSV conversion, escaped pipes, UTF-8/CJK width handling, caret placement, and row/column edits.</li>
4747
</ul>
4848
```
4949

‎README.en.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ The GIF is built from real JetBrains IDE screenshots on Windows: a regular `.md`
4242
- Move to the next or previous cell.
4343
- Insert, delete, and move rows.
4444
- Insert, delete, and move columns.
45+
- Narrow or widen the current column by one display column.
4546
- Sort rows by the current column in ascending or descending order.
4647
- Fit wide Markdown tables to the visible editor width, once or automatically.
4748
- Automatically align tables after edits without changing width.
@@ -107,6 +108,7 @@ Automatic modes can also be toggled from two buttons in the IDE status bar, at t
107108
| `Next Cell` / `Previous Cell` | Moves the caret between cells |
108109
| `Insert Row Below` / `Delete Row` | Adds or deletes a row |
109110
| `Insert Column Right` / `Delete Column` | Adds or deletes a column |
111+
| `Narrow Column` / `Widen Column` | Narrows or widens the current column by one display column |
110112
| `Move Row Up` / `Move Row Down` | Moves the current row |
111113
| `Move Column Left` / `Move Column Right` | Moves the current column |
112114
| `Sort Rows Ascending` / `Sort Rows Descending` | Sorts rows by the current column |
@@ -132,6 +134,8 @@ Except for the contextual `Tab`, commands use `Ctrl+Alt+Shift` with the top numb
132134
| `Delete Row` | `Ctrl+Alt+Shift+5` |
133135
| `Insert Column Right` | `Ctrl+Alt+Shift+6` |
134136
| `Delete Column` | `Ctrl+Alt+Shift+7` |
137+
| `Narrow Column` | `Ctrl+Alt+Shift+,` |
138+
| `Widen Column` | `Ctrl+Alt+Shift+.` |
135139
| `Move Row Up` | `Ctrl+Alt+Shift+8` |
136140
| `Move Row Down` | `Ctrl+Alt+Shift+9` |
137141
| `Move Column Left` | `Ctrl+Alt+Shift+[` |

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ GIF собран из реальных скриншотов IDE JetBrains под
4242
- Переход к следующей или предыдущей ячейке.
4343
- Вставка, удаление и перемещение строк.
4444
- Вставка, удаление и перемещение колонок.
45+
- Сужение или расширение текущей колонки на одну экранную позицию.
4546
- Сортировка строк по текущей колонке по возрастанию или убыванию.
4647
- Разовая и автоматическая подгонка ширины Markdown-таблицы под видимую ширину редактора.
4748
- Light автовыравнивание таблицы после правки без изменения ширины.
@@ -107,6 +108,7 @@ Marketplace вычисляет конкретные версии продукт
107108
| `Next Cell` / `Previous Cell` | Перемещает курсор между ячейками |
108109
| `Insert Row Below` / `Delete Row` | Добавляет или удаляет строку |
109110
| `Insert Column Right` / `Delete Column` | Добавляет или удаляет колонку |
111+
| `Narrow Column` / `Widen Column` | Сужает или расширяет текущую колонку на одну экранную позицию |
110112
| `Move Row Up` / `Move Row Down` | Перемещает текущую строку |
111113
| `Move Column Left` / `Move Column Right` | Перемещает текущую колонку |
112114
| `Sort Rows Ascending` / `Sort Rows Descending` | Сортирует строки по текущей колонке |
@@ -134,6 +136,8 @@ Marketplace вычисляет конкретные версии продукт
134136
| `Delete Row` | `Ctrl+Alt+Shift+5` |
135137
| `Insert Column Right` | `Ctrl+Alt+Shift+6` |
136138
| `Delete Column` | `Ctrl+Alt+Shift+7` |
139+
| `Narrow Column` | `Ctrl+Alt+Shift+,` |
140+
| `Widen Column` | `Ctrl+Alt+Shift+.` |
137141
| `Move Row Up` | `Ctrl+Alt+Shift+8` |
138142
| `Move Row Down` | `Ctrl+Alt+Shift+9` |
139143
| `Move Column Left` | `Ctrl+Alt+Shift+[` |

‎VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.4.1
1+
11.0.0

‎src/main/java/name/krot/markdowntableidea/MarkdownTableActions.java‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,18 @@ public DeleteColumn() {
140140
}
141141
}
142142

143+
public static final class NarrowColumn extends Base {
144+
public NarrowColumn() {
145+
super(MarkdownTableCore.Action.NARROW_COLUMN);
146+
}
147+
}
148+
149+
public static final class WidenColumn extends Base {
150+
public WidenColumn() {
151+
super(MarkdownTableCore.Action.WIDEN_COLUMN);
152+
}
153+
}
154+
143155
public static final class MoveRowUp extends Base {
144156
public MoveRowUp() {
145157
super(MarkdownTableCore.Action.MOVE_ROW_UP);

‎src/main/java/name/krot/markdowntableidea/core/MarkdownTableCore.java‎

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ public enum Action {
1717
DELETE_ROW,
1818
INSERT_COLUMN_RIGHT,
1919
DELETE_COLUMN,
20+
NARROW_COLUMN,
21+
WIDEN_COLUMN,
2022
MOVE_ROW_UP,
2123
MOVE_ROW_DOWN,
2224
MOVE_COLUMN_LEFT,
@@ -203,6 +205,7 @@ public static EditResult apply(List<String> lines, int row, int column, Action a
203205
int targetRow = row;
204206
int targetColumn = column;
205207
int currentRowId = table.rows.get(row).id;
208+
List<Integer> minimumWidths = null;
206209

207210
switch (action) {
208211
case NEXT_CELL:
@@ -245,6 +248,14 @@ public static EditResult apply(List<String> lines, int row, int column, Action a
245248
removeColumn(table, column);
246249
targetColumn = column >= table.columns ? table.columns - 1 : column;
247250
break;
251+
case NARROW_COLUMN:
252+
minimumWidths = new ArrayList<>();
253+
targetRow = resizeColumnWidth(table, row, column, false, minimumWidths);
254+
break;
255+
case WIDEN_COLUMN:
256+
minimumWidths = new ArrayList<>();
257+
targetRow = resizeColumnWidth(table, row, column, true, minimumWidths);
258+
break;
248259
case MOVE_ROW_UP:
249260
if (row > 0 && !table.rows.get(row).separator && !table.rows.get(row - 1).separator) {
250261
Collections.swap(table.rows, row, row - 1);
@@ -282,7 +293,7 @@ public static EditResult apply(List<String> lines, int row, int column, Action a
282293
break;
283294
}
284295

285-
FormatResult formatted = formatTable(table, targetRow, targetColumn);
296+
FormatResult formatted = formatTable(table, targetRow, targetColumn, minimumWidths);
286297
setResultFromFormat(result, formatted);
287298
result.ok = true;
288299
result.changed = true;
@@ -1217,6 +1228,20 @@ private static List<Integer> naturalColumnWidths(Table table) {
12171228
return widths;
12181229
}
12191230

1231+
private static List<Integer> currentColumnWidths(Table table) {
1232+
List<Integer> widths = new ArrayList<>();
1233+
for (int i = 0; i < table.columns; i++) {
1234+
widths.add(1);
1235+
}
1236+
1237+
for (Row row : table.rows) {
1238+
for (int column = 0; column < table.columns && column < row.cells.size(); column++) {
1239+
widths.set(column, Math.max(widths.get(column), displayWidth(row.cells.get(column))));
1240+
}
1241+
}
1242+
return widths;
1243+
}
1244+
12201245
private static List<Integer> headerColumnWidths(Table table) {
12211246
List<Integer> widths = new ArrayList<>();
12221247
for (int i = 0; i < table.columns; i++) {
@@ -1432,6 +1457,38 @@ private static int wrapCellsToColumnWidths(Table table, int originalTargetRow, L
14321457
return wrappedTargetRow;
14331458
}
14341459

1460+
private static int minimumManualColumnWidth(Table table, int column, List<Integer> naturalWidths) {
1461+
List<Integer> headerWidths = headerColumnWidths(table);
1462+
int headerWidth = column < headerWidths.size() ? headerWidths.get(column) : 3;
1463+
int naturalWidth = column < naturalWidths.size() ? naturalWidths.get(column) : headerWidth;
1464+
return Math.min(naturalWidth, Math.max(headerWidth, 3));
1465+
}
1466+
1467+
private static int resizeColumnWidth(Table table, int originalTargetRow, int column, boolean widen, List<Integer> columnWidths) {
1468+
if (table.separatorRow == -1 || column >= table.columns) {
1469+
return originalTargetRow;
1470+
}
1471+
1472+
columnWidths.clear();
1473+
columnWidths.addAll(currentColumnWidths(table));
1474+
originalTargetRow = unwrapContinuationRows(table, originalTargetRow);
1475+
if (column >= columnWidths.size()) {
1476+
return originalTargetRow;
1477+
}
1478+
1479+
List<Integer> naturalWidths = naturalColumnWidths(table);
1480+
if (widen) {
1481+
columnWidths.set(column, columnWidths.get(column) + 1);
1482+
} else {
1483+
int minimumWidth = minimumManualColumnWidth(table, column, naturalWidths);
1484+
if (columnWidths.get(column) > minimumWidth) {
1485+
columnWidths.set(column, columnWidths.get(column) - 1);
1486+
}
1487+
}
1488+
1489+
return wrapCellsToColumnWidths(table, originalTargetRow, columnWidths);
1490+
}
1491+
14351492
private static boolean cellHasText(String cell) {
14361493
return !trim(cell).isEmpty();
14371494
}

‎src/main/resources/META-INF/plugin.xml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<li>Align Markdown tables with Tab.</li>
1313
<li>Automatically align tables after edits.</li>
1414
<li>Fit wide tables to the visible editor width.</li>
15+
<li>Narrow or widen the current column one display column at a time.</li>
1516
<li>Sort data rows by the current column.</li>
1617
<li>Convert CSV/TSV text to Markdown tables.</li>
1718
<li>Insert a new Markdown table by size.</li>
@@ -24,11 +25,10 @@
2425

2526
<change-notes><![CDATA[
2627
<ul>
28+
<li>Added Narrow Column and Widen Column commands with Ctrl+Alt+Shift+, and Ctrl+Alt+Shift+. shortcuts.</li>
2729
<li>Kept Java/C++ wrapping behavior in sync for long-cell continuation rows, protected Markdown links, code spans, and narrow-width hard wrapping.</li>
2830
<li>Added shared reflow behavior that rejoins continuation rows before fitting a table to a wider window.</li>
29-
<li>Aligned the 10.4.0 fitting behavior with the Notepad++ manual and resize-triggered table fitting workflow.</li>
30-
<li>Added bottom-right IDE status bar buttons for Light Auto Align and Power Auto Fit modes.</li>
31-
<li>Documented the Notepad++ table-wrap mode semantics: table wrapping stays independent from the editor's visual word wrap.</li>
31+
<li>Added bottom-left IDE status bar buttons for Light Auto Align and Power Auto Fit modes.</li>
3232
<li>Added shared adaptive-width core coverage for wide registry-style tables with many columns.</li>
3333
<li>Preserved alignment, sorting, CSV/TSV conversion, escaped pipes, and Unicode/CJK width handling.</li>
3434
</ul>
@@ -100,6 +100,12 @@
100100
<action id="MarkdownTableEditor.DeleteColumn" class="name.krot.markdowntableidea.MarkdownTableActions$DeleteColumn">
101101
<keyboard-shortcut keymap="$default" first-keystroke="ctrl alt shift 7"/>
102102
</action>
103+
<action id="MarkdownTableEditor.NarrowColumn" class="name.krot.markdowntableidea.MarkdownTableActions$NarrowColumn">
104+
<keyboard-shortcut keymap="$default" first-keystroke="ctrl alt shift COMMA"/>
105+
</action>
106+
<action id="MarkdownTableEditor.WidenColumn" class="name.krot.markdowntableidea.MarkdownTableActions$WidenColumn">
107+
<keyboard-shortcut keymap="$default" first-keystroke="ctrl alt shift PERIOD"/>
108+
</action>
103109
<separator/>
104110
<action id="MarkdownTableEditor.MoveRowUp" class="name.krot.markdowntableidea.MarkdownTableActions$MoveRowUp">
105111
<keyboard-shortcut keymap="$default" first-keystroke="ctrl alt shift 8"/>

‎src/main/resources/messages/MarkdownTableEditorBundle.properties‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ action.MarkdownTableEditor.InsertColumnRight.text=Insert Column Right
4444
action.MarkdownTableEditor.InsertColumnRight.description=Insert a Markdown table column to the right
4545
action.MarkdownTableEditor.DeleteColumn.text=Delete Column
4646
action.MarkdownTableEditor.DeleteColumn.description=Delete the current Markdown table column
47+
action.MarkdownTableEditor.NarrowColumn.text=Narrow Column
48+
action.MarkdownTableEditor.NarrowColumn.description=Narrow the current Markdown table column by one display column
49+
action.MarkdownTableEditor.WidenColumn.text=Widen Column
50+
action.MarkdownTableEditor.WidenColumn.description=Widen the current Markdown table column by one display column
4751
action.MarkdownTableEditor.MoveRowUp.text=Move Row Up
4852
action.MarkdownTableEditor.MoveRowUp.description=Move the current Markdown table row up
4953
action.MarkdownTableEditor.MoveRowDown.text=Move Row Down

‎src/main/resources/messages/MarkdownTableEditorBundle_ru.properties‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ action.MarkdownTableEditor.InsertColumnRight.text=Вставить столбе
4444
action.MarkdownTableEditor.InsertColumnRight.description=Вставить столбец Markdown-таблицы справа
4545
action.MarkdownTableEditor.DeleteColumn.text=Удалить столбец
4646
action.MarkdownTableEditor.DeleteColumn.description=Удалить текущий столбец Markdown-таблицы
47+
action.MarkdownTableEditor.NarrowColumn.text=Сузить столбец
48+
action.MarkdownTableEditor.NarrowColumn.description=Сузить текущий столбец Markdown-таблицы на одну экранную позицию
49+
action.MarkdownTableEditor.WidenColumn.text=Расширить столбец
50+
action.MarkdownTableEditor.WidenColumn.description=Расширить текущий столбец Markdown-таблицы на одну экранную позицию
4751
action.MarkdownTableEditor.MoveRowUp.text=Переместить строку вверх
4852
action.MarkdownTableEditor.MoveRowUp.description=Переместить текущую строку Markdown-таблицы вверх
4953
action.MarkdownTableEditor.MoveRowDown.text=Переместить строку вниз

0 commit comments

Comments
 (0)