Repository navigation
Feat/flat xml editor - #7
Merged
Merged
Conversation
* Add DatasetModel, DatasetTable, DatasetColumn, DatasetRow, CellAddress, and DatasetProblem as immutable snapshots of a parsed dataset. * Add ProblemSeverity and ProblemCode, with blocksEditing() identifying the four codes that block editing. * Add the core Messages NLS class and messages.properties for externalized strings. * Export org.dbunit.eclipse.dataset.core.model and import org.eclipse.osgi.util for NLS in the core bundle manifest. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add XmlNames for the XML 1.0 Name production, used for table and column names and later by the flat XML parser. * Add AttributeValueCodec to decode attribute values (predefined entities, character references, and whitespace normalization) and to escape values for writing, including charset-aware escaping of characters the document's encoding cannot represent. * Add AttributeValueException, carrying the offset of a decoding error and whether it is an unsupported entity. * Add DatasetEditException, because AttributeValueCodec.escape() must reject a value containing a character outside the XML 1.0 Char range; the rest of the core.edit package follows in a later commit. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add FlatXmlParser, a hand-written scanner that parses the flat XML dataset format in one left-to-right pass, recording exact offsets for the root, every element, and every attribute, so edits can rewrite the document in place instead of re-serializing it. * Add the parse result records FlatXmlDoctype, FlatXmlRoot, FlatXmlElement, FlatXmlAttribute, and FlatXmlParseResult; keep them package-private, since every consumer lives in this package. * Add the TestDatasets test helper and the core fixtures: the dbUnit flat XML fixtures copied byte-identical from the dbunit-extension repository (only their DOCTYPE's relative DTD path is adjusted), plus new fixtures for column sensing, an empty first element, a DOCTYPE internal subset, entities and other special characters, an ISO-8859-1 encoded document, and one file per parser error case. * Cover the scanner with FlatXmlParserTest: element and attribute offsets for both quote styles and multi-line start tags, comments and processing instructions in the prolog, body, and epilog, DOCTYPE with SYSTEM, PUBLIC, and an internal subset, a leading BOM, CR LF line ends, every blocking error with its offset, ignored body text, every fixture parsing without a blocking problem, and a counting guard on a generated 2,000- and 4,000-row dataset that keeps charAt calls linear in the text length. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add DtdReader, reading the dataset element's content model and each declared element's columns from an ELEMENT/ATTLIST-only DTD subset, without tracking offsets, since DTD files are not edited. * Add DtdDeclarations with tables() (the content model's names, or, for ANY, every declared element, in declaration order), missingDeclarations() (content model names with no declaration), and merge() (the first content model wins; elements merge by name, appending later columns without duplicates). * Add DtdTable and the DtdSource functional interface that will let the editor supply external DTD files. * Skip comments, processing instructions, parameter entity declarations and references, and conditional sections, reporting the latter two as one UNSUPPORTED_DTD_CONSTRUCT info per occurrence. * Export org.dbunit.eclipse.dataset.core.dtd from the core bundle, as a friend of the UI bundle. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add FlatXmlModelBuilder.build(text, parse, dtd, options, pendingColumns), grouping elements into tables by case-adjusted key, splitting rows from markers, and building each table's columns: DTD-declared columns in DTD order when the table is a DTD table, then undeclared columns in first-seen order, then pending columns not already present. A later attribute whose name matches only in case overwrites an earlier one's value. DTD tables without elements are appended last, declared-only. The model carries no problems; only parse.wellFormed() decides isEditable(), since every blocking code originates in the parser. Add text as a build() parameter, since FlatXmlIndex needs the exact text that was parsed. * Add FlatXmlIndex, giving the later edit engine each table's display name, row elements, and marker elements, plus the root, DOCTYPE, and text snapshot; kept package-private, like the parse result types. * Add FlatXmlOptions (caseSensitiveTableNames, columnSensing, and the DBUNIT_DEFAULTS constant), public since it is exposed through FlatXmlDatasetDocument's public API. * Add FlatXmlDbUnitParityTest, comparing the model against real dbUnit 3.5.2 for a range of flat XML fixtures: table names and order, row counts, and every value, on every column for fixtures without a DTD and on the declared columns for fixtures with one (dbUnit ignores the rest); also covers a CR LF rewrite of editor-sample.xml and confirms dbUnit itself fails internal-subset.xml under column sensing. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add FlatXmlValidator.validate(parse, index, tables, dtdState, dtd, options), covering every warning the editor raises for flat XML content dbUnit tolerates or rejects: COLUMN_NOT_IN_FIRST_ROW and FIRST_ELEMENT_WITHOUT_ATTRIBUTES (only without a DTD and without column sensing, the latter suppressing the former for its table), TABLE_NAME_CASE_VARIANTS, COLUMN_NAME_CASE_VARIANTS, DUPLICATE_COLUMN_IN_ROW, TABLE_NOT_DECLARED_IN_DTD, COLUMN_NOT_DECLARED_IN_DTD (WARNING, or ERROR with column sensing), DTD_TABLE_WITHOUT_DECLARATION, and DTD_NOT_LOADED. Parser and DTD reader problems are passed through in the returned list, so it is the complete list for the model. Add dtd as a parameter alongside dtdState, because deciding whether a table or column is DTD-declared needs the declarations themselves, not just the state. * Add DtdState (none, loaded, not loaded). * Add FlatXmlIndex.getAllElementsInOrder(tableKey), merging a table's row and marker elements by offset, so the validator can find a table's first element regardless of which kind it is. * Add the Validator_* messages to the core bundle's Messages and messages.properties, bound with NLS.bind. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add the core.edit types: DatasetDocument and TextDatasetDocument, CellChange, DatasetModelListener, DatasetModelChangeEvent, and ChangeOrigin (DatasetEditException already exists). * Add FlatXmlDatasetDocument implementing TextDatasetDocument: a document listener marks the model stale without parsing; refresh() reparses, resolves the DTD (the DOCTYPE's internal subset merged with an external DTD cached by system identifier), builds the model and index, validates, and notifies listeners; setOptions and rebind mark the model stale and refresh; reloadDtd re-reads every cached DTD and refreshes only when a text actually changed; isBlank and createEmptyDataset; locate and cellAt navigate between cells and text offsets, cellAt binary-searching the index's elements. The row, column, and table operations throw UnsupportedOperationException until later commits add them. * Add the private apply(edits), running edits inside one compound undo change and, past 50 edits, one rewrite session, plus the batch(Runnable) that groups nested operations the same way. * Add FlatXmlTextLayout: indentOf, childIndentation, and lineExtent, used by later edit operations to match the surrounding document's formatting. * Export org.dbunit.eclipse.dataset.core.edit and org.dbunit.eclipse.dataset.core.flatxml from the core bundle, both as friends of the UI bundle. * Cover the lifecycle with FlatXmlDatasetDocumentTest, connecting the document undo manager registry where undo matters, and the layout rules with FlatXmlTextLayoutTest, on a plain org.eclipse.jface.text.Document (no workbench needed). Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add StartTagRewriter.rewrite(text, element, columns, changes, renames, encoder), rebuilding one element's attributes segment by segment so every untouched attribute is copied byte for byte: a changed value keeps its own quote style, spacing, and position; a value set to null removes the attribute and its leading whitespace; a new value for a column the element lacks is inserted at that column's position, in a fresh double-quoted attribute. Returns null when the result equals the original text, so an unchanged value produces no edit. Built generically enough to also drive column renames later, since both share the same segment-by-segment rewrite. * Implement FlatXmlDatasetDocument.setCells: refreshes first and rejects a non-editable model, validates every row index and column name, groups changes by row, rejects a change that would leave a row with every column null, computes one ReplaceEdit per changed row element from fresh offsets, and applies them all through the existing apply()/batch() machinery, so several rows, or several setCells calls inside one batch, are one undo step. Escaping goes through AttributeValueCodec.escape with an encoder for the document's current charset, falling back to UTF-8. * Cover both with FlatXmlDatasetDocumentTest: double- and single-quoted values, removing a value, inserting a value at the first, a middle, and the last column position, one undo step for several changes to one element, for several rows, and for two setCells calls in one batch, undo still one step past the 50-edit rewrite-session threshold even with an IDocumentRewriteSessionListener that begins and ends a compound change the way a text viewer would, escaping of every special character, a no-op change adding no undo step, a multi-line start tag keeping its layout, comments and CR LF line ends untouched elsewhere, a character the charset cannot encode becoming a numeric reference, emptying a row rejected, a non-XML character rejected, and fresh offsets after a direct document.replace elsewhere. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add insertRows, duplicateRows, deleteRows, and moveRows to FlatXmlDatasetDocument, replacing their unimplemented stubs. * Insert copies the indentation of its anchor row, replaces a table's marker element when it has no rows yet, and appends a new element before the root's end tag for a table with no elements at all; an all-null new row gets the empty string in its first column. * Delete removes a row's whole line when it is alone there, removes only the element when inline with others, and always leaves a marker element behind so the table stays representable. * Duplicate copies the selected rows' text verbatim after the last selected row, in their original order. * Move rotates the text of a contiguous block of rows with its neighbor by one position, independent of other tables interleaved between them in the document. * Add FlatXmlTextLayout.startOfLineContaining and isAtStartOfItsLine, used to place a new last child before the root's end tag. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add addColumn, renameColumn, and deleteColumn to FlatXmlDatasetDocument, replacing their unimplemented stubs. * Add records a pending column with no text change, rejecting an invalid name or one that already exists case-insensitively; a pending column is dropped automatically once a refresh finds it backed by real data or the DTD. * Rename rewrites every attribute matching the column, case- insensitively, across every row, or renames the entry in place for a still-pending column; it rejects an invalid or existing new name, and rejects the rename entirely, without changing anything, when a row has two attributes for the column that differ only in case. * Delete removes the attribute from every row that has it, or drops a pending column's entry with no text change; it rejects deleting a row's only value without changing anything, and leaves a DTD-declared column visible in the model even once no row has a value for it. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add addTable, renameTable, and deleteTable to FlatXmlDatasetDocument, replacing their unimplemented stubs. * Add inserts a new, empty element as the last child of the root, placing it on its own line before the end tag, or turning a self-closing root into an open and close tag around it, and records any given column names as pending; it rejects an invalid name, a name that already exists, and the reserved name "dataset". * Rename replaces the name in the start tag, and the end tag when one is present, of every element of the table wherever it appears in the document, and moves the table's pending columns to the renamed key; it applies the same three rejections as add. * Delete removes the whole line, or just the element when inline with other content, of every element of the table, and drops its pending columns; a DTD-declared table remains in the model as declared-only. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add FlatXmlContentDescriber, an XMLContentDescriber that recognizes a dbUnit flat XML dataset by its root element and, when present, its first child, without loading any external DTD or entity the document refers to. * Declare the org.dbunit.eclipse.dataset.flatxml content type in a new core plugin.xml, bound to an .xml file extension and to the new describer, with its display name externalized to plugin.properties. * Package plugin.xml into the bundle and import the JDK's SAX and JAXP packages the describer needs. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add the UI bundle's Messages (NLS bootstrap, no keys yet) and DatasetImages, which registers the editor's icons in DatasetUiPlugin's image registry and exposes them by key. * Add releng/icons/GenerateIcons.java, a single-file program that draws the toolbar, object, and wizard banner icons with java.awt, at 16x16 (75x66 for the banner) and their 32x32 @2x variants; run it and commit the generated PNGs under bundles/org.dbunit.eclipse.dataset.ui/icons/. * Add PreferenceKeys and DatasetPreferenceInitializer, setting the NULL display text, column-sensing, and case-sensitive-table-name defaults in the UI bundle's instance-scope preference store, wired up through a new UI plugin.xml. * Package plugin.xml and icons/ into the bundle and import the OSGi NLS utility package the new Messages class needs. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add FlatXmlDatasetEditor, a multi-page editor with a Tables page (a placeholder composite for now) and a Source page over the same document, following external file changes and deletion, and keeping the global Edit menu actions routed to whichever page is active through the new DatasetEditorContributor. * Add EditorInputDtdSource, resolving a DOCTYPE's external DTD relative to the editor input's workspace file or, for inputs outside the workspace, its file store, and never reading a non-file system identifier such as an http: URL. * Bind the new editor to the flat XML content type in plugin.xml, and add UiTestWorkspace, disposable per test, to open and close real editors against workspace files. * Add the "%editor.name" and Source/Tables page message keys, and the filesystem bundle EditorInputDtdSource needs. * Declare org.eclipse.jface.text as an additional bundle, so the UI test fragment requires it, as the host does, instead of importing the org.eclipse.jface.text package, which org.eclipse.text and org.eclipse.jface.text split between them, from org.eclipse.text alone; that would hide IFindReplaceTarget from the tests. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5nNyaSgyKqUwLFUVEGNKv
* Add TablesPage: one CTabItem per table in model order, with a tooltip of its row and column counts, italic text for a table without rows, and a warning or error image when it has problems; each tab's control is a placeholder composite until the grid lands. * Reconcile tabs against the model on every change: create, move, and update tabs in model order, dispose the ones for tables that no longer exist, and keep a tab's identity across a rename recorded through expectRename. * Show ErrorBanner for a blocking problem, with a link that selects its range on the Source page, or for a read-only input; otherwise keep it hidden. * Show a blank-document state with a button that creates an empty dataset, in place of the tab folder. * Schedule a coalesced refresh when the page is active on a source change, and defer it to the next activation otherwise, so typing on the Source page never reparses on every keystroke. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add DatasetGrid, assembling one NatTable per table from a body, column header, row header, and corner layer over the dataset document's current model; editing stays disabled for now. * Add TableBodyDataProvider and ColumnHeaderDataProvider, reading rows, columns, and values from the model without ever reparsing. * Add DatasetCellLabels and ColumnHeaderLabels, and GridStyleConfiguration styling a NULL cell and a pending column in italics and a column with a problem with a warning or error icon. * Add NullAwareDisplayConverter, showing the configured NULL display text for a NULL cell and a line break glyph for each line break, while keeping the underlying value untouched. * Add ColumnWidths, sizing each column from its header and the first 200 rows on first display, and remembering a column's width by key across refreshes. * Refresh a table's grid on every model change: a lightweight repaint when its row count and column keys are unchanged, otherwise a full rebuild that reapplies column widths and reselects the previous anchor, clamped to the new bounds, or a pending selection an operation requested. * Make TablesPage implement DatasetGridContext, and give each table's tab a real grid in place of its placeholder composite. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* GridEditConfiguration now registers a real CELL_EDITABLE_RULE (delegating to the context), a single-line TextCellEditor and a MultiLineTextCellEditor for the MULTI_LINE_VALUE label, an XmlCharacterValidator with a DialogErrorHandling handler, and an EditDisplayConverter for DisplayMode.EDIT. * Add XmlCharacterValidator, rejecting any code point outside the XML 1.0 Char production and naming it in U+ notation. * Add SpreadsheetEditBindings, replacing NatTable's single-click editing: F2 or a printable character reduces the selection to its anchor and edits that cell (AnchorCellKeyEditAction), and a double-click edits the clicked cell. * Add PrintableCharacterKeyEventMatcher, matching a typed character with no modifier, Shift, or AltGr. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add DocumentUndoAction, calling undo() and redo() on the document's shared IDocumentUndoManager and tracking enablement from undoable() and redoable(); it declines to run while a grid cell editor is active, since an undo or a row operation would otherwise move the rows under the open editor. * TablesPage creates one DocumentUndoAction per direction, updates their enablement on every source document change and on page activation, and exposes them through getGlobalActionHandler(String) for the UNDO and REDO action ids. * DatasetEditorContributor routes the global UNDO and REDO handlers (and, for now, a null FIND handler) to the Tables page's actions while it is active, guarding against the page-change callback arriving before the contributor's editor reference is set. * Import org.eclipse.text.undo instead of requiring the whole org.eclipse.text bundle, which also exports a split copy of org.eclipse.jface.text that the bundle already gets from the dedicated org.eclipse.jface.text bundle. * Declare org.eclipse.core.runtime as an additional bundle too, so the UI test fragment requires it instead of importing the org.eclipse.core.runtime package from org.eclipse.equinox.common alone, which would hide the ILog that DocumentUndoAction logs failures through. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5nNyaSgyKqUwLFUVEGNKv
* Add DatasetCommandIds and GridAction, a JFace Action base class that reaches the active grid through a DatasetGridContext, updates its enablement from a GridSelection, and declines to run while a grid cell editor is active. * Add InsertRowAboveAction, InsertRowBelowAction, and DeleteRowsAction, each selecting the row left at the same position afterwards. * Add GridSelection, a snapshot of a grid's selection computed from SelectionLayer's row and column position ranges rather than getSelectedCellPositions(), whose cost grows with the number of selected cells. * DatasetGridContext grows hasActiveCellEditor(), getSelection(), and setPendingSelection(int, int), so actions can reach the active grid's state without depending on NatTable types directly. * TablesPage activates the tablesPageContext and each action's handler through the editor site's IContextService and IHandlerService while it is the active page, deactivating both when the Source page takes over; it also selects the first tab by default so a freshly opened dataset is immediately editable. * DatasetGrid wires one context menu per grid, filled by the region under the cursor when the menu is about to show, and TablesPage puts Insert Row Below and Delete Rows on the tab folder's toolbar. * Declare the tablesPageContext context, the dbUnit Dataset command category, and the three commands and key bindings in plugin.xml. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add DuplicateRowsAction, inserting copies of the selected rows directly after them, in their order, and selecting the new block. * Add MoveRowsUpAction and MoveRowsDownAction, moving a contiguous block of selected rows by one position and keeping it selected; each is enabled only for a contiguous selection that is not already at the edge it would move past. * GridSelection grows rowCount and isContiguousRowSelection(), and DatasetGrid passes the table's row count when computing it. * Wire the three actions into the Tables page's handler activation and body and row header context menus, and declare their commands and key bindings in plugin.xml. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add DatasetNameValidator, an IInputValidator rejecting a name that is not a valid XML name or is already used, case-insensitively. * Add AddColumnAction and RenameColumnAction, prompting for a name with an InputDialog; each exposes its dialog creation as a package-private method a test can override with a stubbed result. * Add DeleteColumnAction, confirming with a dialog that names the column and the number of values it will remove, and, for a column declared in the DTD, notes that the DTD must be updated too. * DatasetGridContext grows getShell(), so actions can parent dialogs without depending on SWT composites directly. * Wire the three actions into the Tables page's handler activation, the column header context menu, and (Add and Delete Column) the tab folder's toolbar; declare their commands in plugin.xml. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add a new table with an optional comma-separated list of column names, entered through a dialog; the new table's tab is selected. * Rename the active table through a dialog; the rename keeps its tab and selection. * Delete the active table after a confirmation naming it and its row count; the tab is removed by the existing tab reconciliation. * Add a tab context menu, shown via a MenuDetectListener on the CTabFolder, offering all three commands. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add TabSeparatedValues (core): format and parse the tab-separated text spreadsheets put on the clipboard, with quoting for tabs, quotes, and line breaks, and CR LF, LF, and CR line ends. * Add Copy, Cut, and Paste, installed as the global Copy, Cut, and Paste actions: Copy writes the bounding rectangle of the selection, with unselected cells in it copying as empty; Cut copies then clears the selection, or deletes whole rows when the selection consists of them; Paste fills every selected cell from a single value, or pastes a block at the selection's top-left cell, ignoring columns beyond the last column with a status message and appending rows beyond the last row, all as one undo step, then selects the pasted block. * Add the global Delete action: sets the selected cells to NULL. * Add the global Select All action: selects every cell of the active grid. * Add Set to NULL, Set to Empty String, and Fill Down (a copy of the selection's top row into its other rows, or the row above for a one-row selection). * Add Edit Cell in Dialog: opens the anchor cell's value in the multi-line dialog editor. * Edit a value that has a line break in the multi-line dialog editor too, however the edit starts, since a single-line editor changes or drops line breaks, and keep line feeds when an editor's text widget returns CR LF, as on Windows, unless the value already used CR LF. * Give GridAction an editing-mode hook so Copy, Cut, Paste, Delete, and Select All act on the active cell editor's text instead of the grid while it is open, matching every other command's rule of doing nothing while editing. * Route clipboard reads and writes through DatasetGridContext instead of the actions constructing their own Clipboard, keeping SWT out of the core-facing action logic and the actions unit-testable. * Replace DatasetGridContext.setPendingSelection with selectRegion, which selects a block right after an operation's edit and scrolls its first cell into view: the pending selection that Insert Row, Delete Rows, Duplicate Rows, and Move Rows requested came after their edit had refreshed the grid, so it applied at the next change instead. Insert Row now selects the new row's cell in the anchor column, Delete Rows the cell left at the first deleted row, and Duplicate Rows and Move Rows the duplicated or moved block, so that a move can repeat. GridSelection gains columnSpan(). * Word the rejection of an edit that would leave a row with no values to suggest Delete Rows. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RY2t54o6QzRPkSEKyLAXTb
* Give a declared-only table's tab the tooltip "Declared in the DTD; no rows" instead of the generic row and column count. * Add a column header tooltip, "Declared in the DTD; no values yet", for a column the DTD declares that has no values. * Warn in the Add Column dialog that dbUnit reads a flat XML dataset's columns from its DTD, when the table already has columns declared there. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add ProblemsSection: a "Problems (N)" header and a table of every model problem's severity, table, and message, below the grid, hidden when there are none. Double-click selects the problem's table and cell, or, for a document-level problem, shows the range on the Source page. * List a column's problems in its header tooltip, alongside the existing DTD note. The warning and error images on column headers and table tabs already existed; this makes them explorable. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr
* Add PageSelectionSync to select and reveal the current cell's range on the Source page when leaving the Tables page, and to resolve the Source page's caret back to a cell when returning, unless the Source selection is unchanged. * Add a Show in Source command and context menu action that jumps from the active cell to its range on the Source page. Refs: 2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZiGLBMSQ3aYQBwwqFG9yr Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5nNyaSgyKqUwLFUVEGNKv
* Add XmlDocumentSetupParticipant, registered for the flat XML content type, which installs a partitioning of comments, processing instructions, the DOCTYPE, and tags on every dataset document, whichever editor opens it. A DOCTYPE with an internal subset ends at its first >. * Add XmlSourceViewerConfiguration for the Source page: tags color their element names, attribute names, and quoted values, and comments, processing instructions, and the DOCTYPE each take one color. * Take the colors from theme color definitions in a dbUnit Dataset Editor category of Colors and Fonts, with a stylesheet for the dark theme; XmlTokenColors redraws open Source pages when a color or the theme changes. Refs: 2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5nNyaSgyKqUwLFUVEGNKv
* Add a dbUnit Dataset Editor preference page for the text shown for NULL cells, validating as if the tests enable dbUnit column sensing, and case-sensitive table names, as with dbUnit's caseSensitiveTableNames. * Reject a blank NULL display text, so that NULL cells stay distinct from empty strings. * Apply preference changes to open editors immediately: the column sensing and table name case options rebuild and revalidate the tables, and a new NULL display text repaints the grids. A change made on another thread is applied on the UI thread. Refs: 2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5nNyaSgyKqUwLFUVEGNKv
* Add File > New > Other... > dbUnit > dbUnit Flat XML Dataset, which creates a file (dataset.xml by default, always with the xml extension) holding an XML declaration for UTF-8 and an empty dataset root, then opens it in its default editor, the dbUnit Dataset Editor. * End the new file's lines with the line delimiter of its project, as the text editors do. * Share the empty dataset text with the Tables page's Create Empty Dataset button. * Extend Wizard rather than BasicNewResourceWizard, which is not intended to be subclassed by clients. Refs: 2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RY2t54o6QzRPkSEKyLAXTb
* Check a table's columns in one pass over its rows instead of one pass per column. The checks for a column missing from the first row, a column spelled two ways, an attribute repeated in its element, and a column missing from the DTD took time in proportion to the number of columns times the number of attributes: validating 100,000 rows of 20 columns (42 MB) took 1.6 s and now takes 0.18 s. * Report the same problems at the same locations as before. Refs: 2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RY2t54o6QzRPkSEKyLAXTb
The Tables page had its own Undo and Redo actions and its own listener of the operation history, which did again what the undo and redo actions of the Source editor already do, and the Edit menu named no step on that page. * Let the Undo and Redo of the Tables page run the actions of the Source editor, which act on the shared history, and show the label, the tool tip, and the enablement of those actions. Remove the history listener and the strings that only the old actions used. * Test that each action runs its own Source action and refreshes the model before it returns, declines while a cell editor is open, follows the Source action until the page is disposed, and shows the label of the operation that the history holds. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
The automatic width of a column measured the raw value of each cell and skipped the NULL cells. The grid paints the NULL display text in a NULL cell and a glyph for each line break, so a column of NULL cells got the width of its name, a value with line breaks got the width of its widest line, and the grid clipped the text it painted. * Measure the display text of each sampled cell, converted by the same converter that the grid paints its body cells with, so that the sizing and the painting cannot disagree. Let that converter take a supplier of the NULL display text instead of the whole grid context. * Test that a column of NULL cells, a value with a line feed, and a value with a carriage return and a line feed get the width of the text that the grid paints, and that a grid sizes the column of a multi-line value to fit the text of its cell. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
reloadDtd is a public method that overrides nothing, and it had no Javadoc comment. * Say that it reads the external DTD files that the document used again, refreshes the model when the text of one of them differs, and does nothing when none of them changed. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
The JavaDoc rule asked for a comment on every public method, but the JavaDoc tool and the IDEs show the comment of the overridden method for a method that has none, so a comment that repeats it adds nothing. Most overriding methods in the sources have none, and the others have one because they do something that the overridden method does not describe. * State that a method that overrides or implements another one needs its own JavaDoc only when it says something that the inherited one does not. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
The names of these tests had no state between the method and the outcome. * Add the state to the test of the table changes that report no change, the test of the key of a column, and the test of the line ends that tab-separated text accepts. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
The names of these tests had no state between the method and the outcome. * Add the state to three tests of the grid actions, which are Update, Delete, and Set to Empty String, and to the test of the default preferences. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
Five JavaDoc comments of the core were fragments: a return or parameter description that began with an inline tag or a number, and a constant and an enum value that were described by a phrase. * Describe the end offset of an attribute, the indentation of the children of the root, the distance of a row move, the default options, and the warning severity in complete sentences. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
Two return descriptions of the editor began with an inline link and were not sentences. * Describe the region that a point of the grid is in, and the partitioning of the Source page, in complete sentences. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
The scan of the children of an element used != in the condition of an if statement that has else branches. * Test whether the character is an opening angle bracket, and decide between an end tag and other markup inside that branch. The scan behaves as before. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
Selecting a tab after the tabs changed used != in the condition of an if statement that has an else branch. * Test whether there is no tab to select, and handle the selection of a tab near the old index inside that branch. The selection behaves as before. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
DescriptionKnown extends SAXException, which is serializable, and it declared no serial version. * Declare serialVersionUID, as the other exceptions of the core do. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
XmlNamesParityTest named no class of the main sources, and everything it tests is XmlNames. * Move its comparison of XmlNames with the XML parser of the Java runtime into XmlNamesTest, and remove the class. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
FlatXmlWellFormednessParityTest named no class of the main sources, and everything it tests is FlatXmlParser. * Move its comparison of the well-formedness that the parser reports with the datasets that dbUnit fails to load into FlatXmlParserTest, and remove the class. * Give the moved tests their temporary directory as a parameter and write the DTD files in the helper that writes the dataset, so that the other tests of the parser create no directory and no file. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
…ests FlatXmlDbUnitParityTest named no class of the main sources, and its tests were about the model builder, the refresh of the dataset document, and two edits of the document. * Move the comparisons of the model with the dataset that dbUnit loads into FlatXmlModelBuilderTest, and the checks of the problems that a refresh reports, of the blank row, and of the table rename into FlatXmlDatasetDocumentTest. * Keep the comparison itself in DbUnitParity, which both classes use, and remove FlatXmlDbUnitParityTest. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
DtdVisibilityTest named no class of the main sources, and its tests work through a real FlatXmlDatasetEditor. * Move its tests of the declared columns and tables, of the DTD that is read again when the window of the editor is activated, and of the missing DTD into FlatXmlDatasetEditorTest, and remove the class. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
ProblemDisplayTest and TablesPageScreenshotsTest named no class of the main sources, and both are about TablesPage. * Move the tests of the display of problems into TablesPageTest. * Move the capture of the screenshots into the nested class Screenshots of TablesPageTest, which has its own lifecycle, so that the intro is closed for the captures only and the other tests of the page run as before. * Remove both classes. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
GridEditingTest named no class of the main sources, and its tests were about five classes. * Move the tests of the edit of a cell by the data provider, of the validator of XML characters, of the matcher of typed characters, and of the key action that starts an edit into TableBodyDataProviderTest, XmlCharacterValidatorTest, PrintableCharacterKeyEventMatcherTest, and AnchorCellKeyEditActionTest. * Move the tests of the in-place editor, the dialog editor, the cancellation of an edit when the table changes, and the cell editor listener into the nested class Editing of DatasetGridTest, which uses the shell of that class. * Keep the context that these tests edit through in EditableGridContext, and remove GridEditingTest. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
GridActionsTest named no class of the main sources, and its tests were about 21 classes. * Move the tests of each action into a test class named after it. The two actions that share InsertRowAction, and the two that share MoveRowsAction, have one test class for each pair, and GridActionTest has the tests that run actions through their base class: the refresh before a command, a command while a cell editor is open, the report of a table that is gone, the enablement on a read-only page, and the icons. * Keep the shell, the factories of documents, and the grid context that records what an action did in the base class GridActionFixture, which the new classes extend, and remove GridActionsTest. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014LdWVxjTKS4Pu5nD7NNDfa
* Write the description as the HTML that the Marketplace stores, and open it with paragraphs that work as the teaser, which the Marketplace takes from the start of the description. * Keep the description independent of the dataset formats: one sentence names the supported ones. * Say that the editor warns about content that dbUnit ignores or rejects. * Add the logo, and give the form values as the form takes them: plain feature ids, Eclipse versions with their release names, the Tools market with its categories, and the license version. * Use the current image of the install button, and say where the node id of the listing is. * Point the screenshot plan at the screenshots of the User Guide. * Replace the generic registration steps with the steps to create the listing and to update it after a release. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeCnvUkAcpE2mdG2szw38k
* Describe the feature without the terms of the flat XML format, so that adding a dataset format changes only the sentence that names the supported formats. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeCnvUkAcpE2mdG2szw38k
* Say in one sentence that the plugin currently supports the flat XML format and that other dataset formats are planned. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeCnvUkAcpE2mdG2szw38k
A build takes its version qualifier from project.build.outputTimestamp, which the root pom pins per release, so every local build had the same version and Eclipse did not offer a rebuilt plugin as an update. * Add build-local.sh and build-local.cmd, which run the Maven wrapper with the current UTC time as the qualifier, in the format of the pom and of the CI build, and pass their arguments to it. Without arguments they run clean install. * Describe the scripts where the site explains how to install a local build, and in the build commands of CLAUDE.md. Refs: 2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeCnvUkAcpE2mdG2szw38k
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review skippedToo many files! This PR contains 320 files, which is 220 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configuration
⛔ Files ignored due to path filters (24)
📒 Files selected for processing (320)
You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.