diff options
| author | Stephan Wahlbrink | 2021-09-02 18:54:21 +0000 |
|---|---|---|
| committer | Stephan Wahlbrink | 2021-09-02 18:54:21 +0000 |
| commit | b05494d299e084e457f009588250e7d64d9a62e1 (patch) | |
| tree | 611ee0c5593d5814a7286eb0425d74af62cedc8d | |
| parent | fe1eca17bebaecf704ca2ad5c3a4c20d5b855d96 (diff) | |
| download | org.eclipse.statet-commons-b05494d299e084e457f009588250e7d64d9a62e1.tar.gz org.eclipse.statet-commons-b05494d299e084e457f009588250e7d64d9a62e1.tar.xz org.eclipse.statet-commons-b05494d299e084e457f009588250e7d64d9a62e1.zip | |
Bug 575763: [WaLTable] Refactor (part 1)
- Revert inadvertent change
Follow-up-of: 175c44a13dd05b691f444dfc3e748159f2b6c5ad
Change-Id: Icfa2b458dd7d9d0d2ae7f12e1890060770de2368
15 files changed, 19 insertions, 19 deletions
diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/NatTable.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/NatTable.java index 1d9e7ccb..502d421c 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/NatTable.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/NatTable.java @@ -237,7 +237,7 @@ public class NatTable extends Canvas implements TopLayer, PaintListener, LayerLi * @return {@link ConfigRegistry} used to hold the configuration bindings * by Layer, DisplayMode and Config labels. */ - public ConfigRegistry getStyleRegistry() { + public ConfigRegistry getConfigRegistry() { if (this.configRegistry == null) { this.configRegistry= new BasicConfigRegistry(); } @@ -335,7 +335,7 @@ public class NatTable extends Canvas implements TopLayer, PaintListener, LayerLi final Rectangle eventRectangle= new Rectangle(event.x, event.y, event.width, event.height); if (!eventRectangle.isEmpty()) { - getLayerPainter().paintLayer(this, event.gc, 0, 0, eventRectangle, getStyleRegistry()); + getLayerPainter().paintLayer(this, event.gc, 0, 0, eventRectangle, getConfigRegistry()); } } @@ -422,12 +422,12 @@ public class NatTable extends Canvas implements TopLayer, PaintListener, LayerLi } if (this.underlyingLayer != null) { - this.underlyingLayer.configure(getStyleRegistry(), getUiBindingRegistry()); + this.underlyingLayer.configure(getConfigRegistry(), getUiBindingRegistry()); } for (final IConfiguration configuration : this.configurations) { configuration.configureLayer(this); - configuration.configureRegistry(getStyleRegistry()); + configuration.configureRegistry(getConfigRegistry()); configuration.configureUiBindings(getUiBindingRegistry()); } } diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/CellEditDragMode.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/CellEditDragMode.java index 4cbbfbfc..419c9c8f 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/CellEditDragMode.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/CellEditDragMode.java @@ -81,7 +81,7 @@ public class CellEditDragMode extends CellSelectionDragMode { } natTable.doCommand(new EditCellCommand(natTable, - natTable.getStyleRegistry(), + natTable.getConfigRegistry(), natTable.getCellByPosition(columnPosition, rowPosition) )); } diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/KeyEditAction.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/KeyEditAction.java index b8f67cf9..c68ac79a 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/KeyEditAction.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/KeyEditAction.java @@ -38,7 +38,7 @@ public class KeyEditAction implements IKeyAction { public void run(final NatTable natTable, final KeyEvent event) { natTable.doCommand(new EditSelectionCommand( natTable, - natTable.getStyleRegistry(), + natTable.getConfigRegistry(), convertCharToCharacterObject(event) )); } diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/MouseEditAction.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/MouseEditAction.java index 22210f1b..ce3ed448 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/MouseEditAction.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/MouseEditAction.java @@ -44,7 +44,7 @@ public class MouseEditAction implements IMouseClickAction { } natTable.doCommand(new EditCellCommand(natTable, - natTable.getStyleRegistry(), + natTable.getConfigRegistry(), natTable.getCellByPosition(columnPosition, rowPosition) )); } diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/ToggleCheckBoxColumnAction.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/ToggleCheckBoxColumnAction.java index ce845cdc..111eb673 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/ToggleCheckBoxColumnAction.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/edit/action/ToggleCheckBoxColumnAction.java @@ -38,7 +38,7 @@ public class ToggleCheckBoxColumnAction implements IMouseAction { final long sourceColumnPosition= natTable.getColumnPositionByX(event.x); final long columnPosition= LayerUtils.convertColumnPosition(natTable, sourceColumnPosition, this.bodyDataLayer); - final long checkedCellsCount= this.columnHeaderCheckBoxPainter.getCheckedCellsCount(columnPosition, natTable.getStyleRegistry()); + final long checkedCellsCount= this.columnHeaderCheckBoxPainter.getCheckedCellsCount(columnPosition, natTable.getConfigRegistry()); final boolean targetState= checkedCellsCount < this.bodyDataLayer.getRowCount(); for (long rowPosition= 0; rowPosition < this.bodyDataLayer.getRowCount(); rowPosition++) { diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/tooltip/TableContentTooltip.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/tooltip/TableContentTooltip.java index c049a720..7e11cc6b 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/tooltip/TableContentTooltip.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/tooltip/TableContentTooltip.java @@ -95,12 +95,12 @@ public class TableContentTooltip extends DefaultToolTip { final LayerCell cell= this.natTable.getCellByPosition(col, row); if (cell != null) { //if the registered cell painter is the PasswordCellPainter, there will be no tooltip - final LayerCellPainter painter= this.natTable.getStyleRegistry().getAttribute( + final LayerCellPainter painter= this.natTable.getConfigRegistry().getAttribute( CellConfigAttributes.CELL_PAINTER, DisplayMode.NORMAL, cell.getLabels().getLabels()); if (isVisibleContentPainter(painter)) { final String tooltipValue= CellDisplayConversionUtils.convertDataType( cell, - this.natTable.getStyleRegistry()); + this.natTable.getConfigRegistry()); if (tooltipValue.length() > 0) { return tooltipValue; diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/action/CellDragMode.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/action/CellDragMode.java index 2c69c67b..3c0950a0 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/action/CellDragMode.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/action/CellDragMode.java @@ -86,7 +86,7 @@ public class CellDragMode implements IDragMode { final Image image= new Image(natTable.getDisplay(), width, height); final GC gc= new GC(image); - final ConfigRegistry configRegistry= natTable.getStyleRegistry(); + final ConfigRegistry configRegistry= natTable.getConfigRegistry(); final LayerCellPainter layerCellPainter= configRegistry.getAttribute(CellConfigAttributes.CELL_PAINTER, cell.getDisplayMode(), cell.getLabels().getLabels() ); if (layerCellPainter != null) { diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/matcher/CellEditorMouseEventMatcher.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/matcher/CellEditorMouseEventMatcher.java index 4517876b..3088ec88 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/matcher/CellEditorMouseEventMatcher.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/matcher/CellEditorMouseEventMatcher.java @@ -103,7 +103,7 @@ public class CellEditorMouseEventMatcher implements IMouseEventMatcher { //Bug 407598: only perform a check if the click in the body region was performed on a cell //cell == null can happen if the viewport is quite large and contains not enough cells to fill it. if (cell != null) { - final ICellEditor cellEditor= natTable.getStyleRegistry().getAttribute( + final ICellEditor cellEditor= natTable.getConfigRegistry().getAttribute( EditConfigAttributes.CELL_EDITOR, DisplayMode.EDIT, cell.getLabels().getLabels()); if (cellEditor != null && cellEditor.activateAtAnyPosition()) { diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/matcher/CellPainterMouseEventMatcher.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/matcher/CellPainterMouseEventMatcher.java index 94508bf6..77572e37 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/matcher/CellPainterMouseEventMatcher.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/matcher/CellPainterMouseEventMatcher.java @@ -57,7 +57,7 @@ public class CellPainterMouseEventMatcher extends MouseEventMatcher { //Bug 407598: only perform a check if the click in the body region was performed on a cell //cell == null can happen if the viewport is quite large and contains not enough cells to fill it. if (cell != null) { - final ConfigRegistry configRegistry= natTable.getStyleRegistry(); + final ConfigRegistry configRegistry= natTable.getConfigRegistry(); final LayerCellPainter layerCellPainter= configRegistry.getAttribute(CellConfigAttributes.CELL_PAINTER, cell.getDisplayMode(), cell.getLabels().getLabels() ); diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/menu/MenuItemProviders.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/menu/MenuItemProviders.java index d4cb89d2..58c8ecce 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/menu/MenuItemProviders.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/src/org/eclipse/statet/ecommons/waltable/ui/menu/MenuItemProviders.java @@ -164,7 +164,7 @@ public class MenuItemProviders { public void widgetSelected(final SelectionEvent event) { final long rowPosition= getNatEventData(event).getRowPosition(); final long columnPosition= getNatEventData(event).getColumnPosition(); - natTable.doCommand(new DisplayColumnStyleEditorCommand(natTable, natTable.getStyleRegistry(), columnPosition, rowPosition)); + natTable.doCommand(new DisplayColumnStyleEditorCommand(natTable, natTable.getConfigRegistry(), columnPosition, rowPosition)); } }); } diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/copy/ui/action/CopyDataAction.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/copy/ui/action/CopyDataAction.java index 183f2ab0..5cd16407 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/copy/ui/action/CopyDataAction.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/copy/ui/action/CopyDataAction.java @@ -30,7 +30,7 @@ public class CopyDataAction implements IKeyAction { @Override public void run(final NatTable natTable, final KeyEvent event) { natTable.doCommand(new CopyToClipboardCommand("\t", System.lineSeparator(), //$NON-NLS-1$ - natTable.getStyleRegistry() )); + natTable.getConfigRegistry() )); } } diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/export/NatExporter.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/export/NatExporter.java index a8a5f51d..11a07362 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/export/NatExporter.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/export/NatExporter.java @@ -109,7 +109,7 @@ public class NatExporter { for (final String name : natTablesMap.keySet()) { final NatTable natTable= natTablesMap.get(name); - exportLayer(exporter, outputStream, name, natTable, natTable.getStyleRegistry()); + exportLayer(exporter, outputStream, name, natTable, natTable.getConfigRegistry()); } exporter.exportEnd(outputStream); diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/export/ui/action/ExportAction.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/export/ui/action/ExportAction.java index 6cae1c51..f44fa553 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/export/ui/action/ExportAction.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/export/ui/action/ExportAction.java @@ -24,7 +24,7 @@ public class ExportAction implements IKeyAction { @Override public void run(final NatTable natTable, final KeyEvent event) { - natTable.doCommand(new ExportCommand(natTable.getStyleRegistry(), natTable.getShell())); + natTable.doCommand(new ExportCommand(natTable.getConfigRegistry(), natTable.getShell())); } } diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/print/ui/action/PrintAction.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/print/ui/action/PrintAction.java index 3de0ab6a..9eb71f7f 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/print/ui/action/PrintAction.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/print/ui/action/PrintAction.java @@ -27,7 +27,7 @@ public class PrintAction implements IKeyAction { @Override public void run(final NatTable natTable, final KeyEvent event) { - natTable.doCommand(new PrintCommand(natTable.getStyleRegistry(), natTable.getShell())); + natTable.doCommand(new PrintCommand(natTable.getConfigRegistry(), natTable.getShell())); } } diff --git a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/tickupdate/ui/action/TickUpdateAction.java b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/tickupdate/ui/action/TickUpdateAction.java index 87d4f6f8..10d59bb8 100644 --- a/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/tickupdate/ui/action/TickUpdateAction.java +++ b/ecommons.waltable/org.eclipse.statet.ecommons.waltable.core/srcAdditional/org/eclipse/statet/ecommons/waltable/tickupdate/ui/action/TickUpdateAction.java @@ -43,7 +43,7 @@ public class TickUpdateAction implements IKeyAction { @Override public void run(final NatTable natTable, final KeyEvent event) { - natTable.doCommand(new TickUpdateCommand(natTable.getStyleRegistry(), this.increment)); + natTable.doCommand(new TickUpdateCommand(natTable.getConfigRegistry(), this.increment)); } } |
