Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Wahlbrink2021-09-02 16:00:59 +0000
committerStephan Wahlbrink2021-09-02 18:56:14 +0000
commit547f872d7803e855c7dd5a773614c99697549793 (patch)
tree774e867648a0cdd27c290ab5f6b56e741d30ae07
parentee72611fb81ed852158014ad3ee8e5ede8705066 (diff)
downloadorg.eclipse.statet-r-547f872d7803e855c7dd5a773614c99697549793.tar.gz
org.eclipse.statet-r-547f872d7803e855c7dd5a773614c99697549793.tar.xz
org.eclipse.statet-r-547f872d7803e855c7dd5a773614c99697549793.zip
Bug 575763: [R-DataEditor] Adapt to refactored WaLTable
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/AbstractRDataProvider.java52
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/FTableDataProvider.java24
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/GotoCellDialog.java20
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/GotoCellHandler.java4
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataEditorOutlinePage.java2
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFormatter.java2
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFormatterConverter.java20
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFrameDataProvider.java4
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RVectorDataProvider.java4
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/datafilterview/ColumnLabelProvider.java2
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/DimPositionResizeCommandHandler.java9
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/MultiColumnAutoResizeCommandHandler.java11
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/MultiColumnResizeCommandHandler.java11
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/PresentationConfig.java271
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/RDataLayer.java87
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/RTextPainter.java50
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/TableLayers.java14
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/UIBindings.java52
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/dataeditor/RDataTableViewer.java155
-rw-r--r--r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/editors/RElementSearchHandler.java2
20 files changed, 406 insertions, 390 deletions
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/AbstractRDataProvider.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/AbstractRDataProvider.java
index 30d5e51e..194983d1 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/AbstractRDataProvider.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/AbstractRDataProvider.java
@@ -41,11 +41,11 @@ import org.eclipse.statet.jcommons.ts.core.ToolRunnable;
import org.eclipse.statet.jcommons.ts.core.ToolService;
import org.eclipse.statet.ecommons.ui.util.UIAccess;
-import org.eclipse.statet.ecommons.waltable.coordinate.PositionId;
-import org.eclipse.statet.ecommons.waltable.data.ControlData;
-import org.eclipse.statet.ecommons.waltable.data.IDataProvider;
-import org.eclipse.statet.ecommons.waltable.sort.ISortModel;
-import org.eclipse.statet.ecommons.waltable.sort.SortDirection;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.PositionId;
+import org.eclipse.statet.ecommons.waltable.core.data.ControlData;
+import org.eclipse.statet.ecommons.waltable.core.data.DataProvider;
+import org.eclipse.statet.ecommons.waltable.sort.core.SortDirection;
+import org.eclipse.statet.ecommons.waltable.sort.core.SortModel;
import org.eclipse.statet.r.core.rmodel.RElementName;
import org.eclipse.statet.r.core.tool.TmpUtils;
@@ -77,7 +77,7 @@ import org.eclipse.statet.rj.ts.core.RTool;
import org.eclipse.statet.rj.ts.core.RToolService;
-public abstract class AbstractRDataProvider<T extends RObject> implements IDataProvider {
+public abstract class AbstractRDataProvider<T extends RObject> implements DataProvider {
public static final ControlData LOADING= new ControlData(ControlData.ASYNC, "loading...");
@@ -237,7 +237,7 @@ public abstract class AbstractRDataProvider<T extends RObject> implements IDataP
}
- protected class ColumnDataProvider implements IDataProvider {
+ protected class ColumnDataProvider implements DataProvider {
public ColumnDataProvider() {
@@ -280,7 +280,7 @@ public abstract class AbstractRDataProvider<T extends RObject> implements IDataP
}
- protected class RowDataProvider implements IDataProvider {
+ protected class RowDataProvider implements DataProvider {
private final LazyRStore<RVector<?>> rowNamesStore= new LazyRStore<>(AbstractRDataProvider.this.rowCount, 1,
@@ -359,7 +359,7 @@ public abstract class AbstractRDataProvider<T extends RObject> implements IDataP
}
- protected class SortModel implements ISortModel {
+ protected class DataSortModel implements SortModel {
@Override
@@ -554,11 +554,11 @@ public abstract class AbstractRDataProvider<T extends RObject> implements IDataP
private ContentDescription description;
- private final IDataProvider columnDataProvider;
- private final IDataProvider rowDataProvider;
+ private final DataProvider columnDataProvider;
+ private final DataProvider rowDataProvider;
- private final IDataProvider columnLabelProvider;
- private final IDataProvider rowLabelProvider;
+ private final DataProvider columnLabelProvider;
+ private final DataProvider rowLabelProvider;
private final MainLock fragmentsLock= new MainLock();
@@ -574,7 +574,7 @@ public abstract class AbstractRDataProvider<T extends RObject> implements IDataP
private TmpUtils.Item rTmpItem; // only in R jobs
private T rObjectStruct;
- private final ISortModel sortModel;
+ private final SortModel sortModel;
private SortColumn sortColumn= null;
private String rCacheSort; // only in R jobs
@@ -1351,45 +1351,45 @@ public abstract class AbstractRDataProvider<T extends RObject> implements IDataP
return true;
}
- public IDataProvider getColumnDataProvider() {
+ public DataProvider getColumnDataProvider() {
return this.columnDataProvider;
}
- public IDataProvider getRowDataProvider() {
+ public DataProvider getRowDataProvider() {
return this.rowDataProvider;
}
- public IDataProvider getColumnLabelProvider() {
+ public DataProvider getColumnLabelProvider() {
return this.columnLabelProvider;
}
- public IDataProvider getRowLabelProvider() {
+ public DataProvider getRowLabelProvider() {
return this.rowLabelProvider;
}
- protected IDataProvider createColumnDataProvider() {
+ protected DataProvider createColumnDataProvider() {
return new ColumnDataProvider();
}
- protected IDataProvider createRowDataProvider() {
+ protected DataProvider createRowDataProvider() {
return new RowDataProvider();
}
- protected IDataProvider createColumnLabelProvider() {
+ protected DataProvider createColumnLabelProvider() {
return null;
}
- protected IDataProvider createRowLabelProvider() {
+ protected DataProvider createRowLabelProvider() {
return null;
}
- protected ISortModel createSortModel() {
- return new SortModel();
+ protected SortModel createSortModel() {
+ return new DataSortModel();
}
private Object handleMissingData(final int flags) {
- return ((flags & IDataProvider.FORCE_SYNC) != 0) ? ERROR : LOADING;
+ return ((flags & DataProvider.FORCE_SYNC) != 0) ? ERROR : LOADING;
}
private Object handleLoadDataException(final LoadDataException e, final int flags) {
@@ -1401,7 +1401,7 @@ public abstract class AbstractRDataProvider<T extends RObject> implements IDataP
}
- public ISortModel getSortModel() {
+ public SortModel getSortModel() {
return this.sortModel;
}
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/FTableDataProvider.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/FTableDataProvider.java
index dfb0f916..f516e91e 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/FTableDataProvider.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/FTableDataProvider.java
@@ -22,10 +22,10 @@ import org.eclipse.statet.jcommons.lang.NonNull;
import org.eclipse.statet.jcommons.status.ProgressMonitor;
import org.eclipse.statet.jcommons.status.StatusException;
-import org.eclipse.statet.ecommons.waltable.data.IDataProvider;
-import org.eclipse.statet.ecommons.waltable.data.ISpanningDataProvider;
-import org.eclipse.statet.ecommons.waltable.layer.cell.DataCell;
-import org.eclipse.statet.ecommons.waltable.sort.ISortModel;
+import org.eclipse.statet.ecommons.waltable.core.data.DataCell;
+import org.eclipse.statet.ecommons.waltable.core.data.DataProvider;
+import org.eclipse.statet.ecommons.waltable.core.data.SpanningDataProvider;
+import org.eclipse.statet.ecommons.waltable.sort.core.SortModel;
import org.eclipse.statet.r.core.rmodel.RElementName;
import org.eclipse.statet.r.ui.dataeditor.RDataTableColumn;
@@ -43,7 +43,7 @@ import org.eclipse.statet.rj.ts.core.RToolService;
public class FTableDataProvider extends RMatrixDataProvider {
- protected abstract class FTableHeaderDataProvider implements ISpanningDataProvider {
+ protected abstract class FTableHeaderDataProvider implements SpanningDataProvider {
public FTableHeaderDataProvider() {
@@ -224,7 +224,7 @@ public class FTableDataProvider extends RMatrixDataProvider {
}
@Override
- protected ISortModel createSortModel() {
+ protected SortModel createSortModel() {
return null;
}
@@ -239,18 +239,18 @@ public class FTableDataProvider extends RMatrixDataProvider {
}
@Override
- protected IDataProvider createColumnDataProvider() {
+ protected DataProvider createColumnDataProvider() {
return new FTableColumnDataProvider();
}
@Override
- protected IDataProvider createRowDataProvider() {
+ protected DataProvider createRowDataProvider() {
return new FTableRowDataProvider();
}
@Override
- public IDataProvider createColumnLabelProvider() {
- return new IDataProvider() {
+ public DataProvider createColumnLabelProvider() {
+ return new DataProvider() {
@Override
public long getColumnCount() {
@@ -277,8 +277,8 @@ public class FTableDataProvider extends RMatrixDataProvider {
}
@Override
- public IDataProvider createRowLabelProvider() {
- return new IDataProvider() {
+ public DataProvider createRowLabelProvider() {
+ return new DataProvider() {
@Override
public long getColumnCount() {
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/GotoCellDialog.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/GotoCellDialog.java
index ee7f4722..66affe14 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/GotoCellDialog.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/GotoCellDialog.java
@@ -14,8 +14,8 @@
package org.eclipse.statet.internal.r.ui.dataeditor;
-import static org.eclipse.statet.ecommons.waltable.coordinate.Orientation.HORIZONTAL;
-import static org.eclipse.statet.ecommons.waltable.coordinate.Orientation.VERTICAL;
+import static org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation.HORIZONTAL;
+import static org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation.VERTICAL;
import org.eclipse.core.databinding.UpdateValueStrategy;
import org.eclipse.core.databinding.observable.value.IObservableValue;
@@ -35,9 +35,9 @@ import org.eclipse.statet.ecommons.databinding.core.validation.LongValidator;
import org.eclipse.statet.ecommons.databinding.jface.DataBindingSupport;
import org.eclipse.statet.ecommons.ui.dialogs.ExtStatusDialog;
import org.eclipse.statet.ecommons.ui.util.LayoutUtils;
-import org.eclipse.statet.ecommons.waltable.coordinate.LRange;
-import org.eclipse.statet.ecommons.waltable.coordinate.Orientation;
-import org.eclipse.statet.ecommons.waltable.viewport.IViewportDim;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.LRange;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation;
+import org.eclipse.statet.ecommons.waltable.viewport.core.ViewportLayerDim;
import org.eclipse.statet.r.ui.dataeditor.RDataTableViewer;
@@ -51,7 +51,7 @@ public class GotoCellDialog extends ExtStatusDialog {
private final @NonNull Text[] indexControls= new @NonNull Text[2];
/** 0-based indexes */
- private final @NonNull LRange[] indexRanges= new @NonNull LRange[2];
+ private final @NonNull LRange[] indexRanges= new org.eclipse.statet.ecommons.waltable.core.coordinate.LRange[2];
/** 1-based indexes */
@SuppressWarnings("unchecked")
@@ -69,12 +69,12 @@ public class GotoCellDialog extends ExtStatusDialog {
setHelpAvailable(false);
for (final Orientation orientation : Orientation.values()) {
- final IViewportDim viewportDim= this.table.getViewport(orientation);
+ final ViewportLayerDim viewportLayerDim= this.table.getViewport(orientation);
this.indexRanges[orientation.ordinal()]= new LRange(
- viewportDim.getMinimumOriginPosition(),
- viewportDim.getScrollable().getPositionCount() );
+ viewportLayerDim.getMinimumOriginPosition(),
+ viewportLayerDim.getScrollable().getPositionCount() );
this.indexValues[orientation.ordinal()]= new WritableValue<>(
- Long.valueOf(viewportDim.getOriginPosition() + 1), Long.TYPE );
+ Long.valueOf(viewportLayerDim.getOriginPosition() + 1), Long.TYPE );
}
}
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/GotoCellHandler.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/GotoCellHandler.java
index f500f684..fa3793bb 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/GotoCellHandler.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/GotoCellHandler.java
@@ -14,8 +14,8 @@
package org.eclipse.statet.internal.r.ui.dataeditor;
-import static org.eclipse.statet.ecommons.waltable.coordinate.Orientation.HORIZONTAL;
-import static org.eclipse.statet.ecommons.waltable.coordinate.Orientation.VERTICAL;
+import static org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation.HORIZONTAL;
+import static org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation.VERTICAL;
import java.util.Map;
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataEditorOutlinePage.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataEditorOutlinePage.java
index 540e1d21..a73b26f0 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataEditorOutlinePage.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataEditorOutlinePage.java
@@ -39,7 +39,7 @@ import org.eclipse.statet.ecommons.ui.actions.SimpleContributionItem;
import org.eclipse.statet.ecommons.ui.dialogs.DialogUtils;
import org.eclipse.statet.ecommons.ui.util.UIAccess;
import org.eclipse.statet.ecommons.ui.workbench.BasicEditorOutlinePage;
-import org.eclipse.statet.ecommons.waltable.coordinate.LRangeList;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.LRangeList;
import org.eclipse.statet.internal.r.ui.RUIPlugin;
import org.eclipse.statet.r.ui.dataeditor.DataViewDescription;
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFormatter.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFormatter.java
index 20d9048e..d2565463 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFormatter.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFormatter.java
@@ -27,7 +27,7 @@ import com.ibm.icu.util.Calendar;
import com.ibm.icu.util.TimeZone;
import com.ibm.icu.util.ULocale;
-import org.eclipse.statet.ecommons.waltable.data.ControlData;
+import org.eclipse.statet.ecommons.waltable.core.data.ControlData;
import org.eclipse.statet.rj.data.RCharacterStore;
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFormatterConverter.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFormatterConverter.java
index 6442b0ad..85192bb3 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFormatterConverter.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFormatterConverter.java
@@ -18,11 +18,11 @@ import java.util.List;
import org.eclipse.statet.jcommons.lang.Nullable;
-import org.eclipse.statet.ecommons.waltable.config.IConfigRegistry;
-import org.eclipse.statet.ecommons.waltable.coordinate.Orientation;
-import org.eclipse.statet.ecommons.waltable.coordinate.PositionId;
+import org.eclipse.statet.ecommons.waltable.core.config.ConfigRegistry;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.PositionId;
+import org.eclipse.statet.ecommons.waltable.core.layer.LayerCell;
import org.eclipse.statet.ecommons.waltable.data.convert.IDisplayConverter;
-import org.eclipse.statet.ecommons.waltable.layer.cell.ILayerCell;
import org.eclipse.statet.r.ui.dataeditor.RDataTableColumn;
@@ -38,7 +38,7 @@ public class RDataFormatterConverter implements IDisplayConverter {
@Override
protected RDataFormatter getFormatter(final ContentDescription description,
- final ILayerCell cell) {
+ final LayerCell cell) {
if ((cell.getDim(Orientation.VERTICAL).getId() & PositionId.CAT_MASK) == PositionId.BODY_CAT) {
final List<RDataTableColumn> columns= description.getRowHeaderColumns();
final long index= getColumnIndex(cell);
@@ -63,7 +63,7 @@ public class RDataFormatterConverter implements IDisplayConverter {
}
- private RDataFormatter getFormatter(final ILayerCell cell) {
+ private RDataFormatter getFormatter(final LayerCell cell) {
final ContentDescription description= this.fDataProvider.getDescription();
if (description != null) {
final RDataFormatter formatter= getFormatter(description, cell);
@@ -78,7 +78,7 @@ public class RDataFormatterConverter implements IDisplayConverter {
}
protected @Nullable RDataFormatter getFormatter(final ContentDescription description,
- final ILayerCell cell) {
+ final LayerCell cell) {
if ((cell.getDim(Orientation.HORIZONTAL).getId() & PositionId.CAT_MASK) == PositionId.BODY_CAT
&& (cell.getDim(Orientation.VERTICAL).getId() & PositionId.CAT_MASK) == PositionId.BODY_CAT) {
final List<RDataTableColumn> columns= description.getDataColumns();
@@ -91,19 +91,19 @@ public class RDataFormatterConverter implements IDisplayConverter {
return null;
}
- protected long getColumnIndex(final ILayerCell cell) {
+ protected long getColumnIndex(final LayerCell cell) {
return (cell.getDim(Orientation.HORIZONTAL).getId() & PositionId.NUM_MASK);
}
@Override
- public Object canonicalToDisplayValue(final ILayerCell cell, final IConfigRegistry configRegistry,
+ public Object canonicalToDisplayValue(final LayerCell cell, final ConfigRegistry configRegistry,
final Object canonicalValue) {
return getFormatter(cell).modelToDisplayValue(canonicalValue);
}
@Override
- public Object displayToCanonicalValue(final ILayerCell cell, final IConfigRegistry configRegistry,
+ public Object displayToCanonicalValue(final LayerCell cell, final ConfigRegistry configRegistry,
final Object displayValue) {
throw new UnsupportedOperationException();
}
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFrameDataProvider.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFrameDataProvider.java
index 1d0ecf92..57b9bf31 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFrameDataProvider.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RDataFrameDataProvider.java
@@ -22,7 +22,7 @@ import org.eclipse.statet.jcommons.lang.NonNull;
import org.eclipse.statet.jcommons.status.ProgressMonitor;
import org.eclipse.statet.jcommons.status.StatusException;
-import org.eclipse.statet.ecommons.waltable.data.IDataProvider;
+import org.eclipse.statet.ecommons.waltable.core.data.DataProvider;
import org.eclipse.statet.r.core.rmodel.RElementName;
import org.eclipse.statet.r.ui.dataeditor.RDataTableColumn;
@@ -89,7 +89,7 @@ public class RDataFrameDataProvider extends AbstractRDataProvider<RDataFrame> {
}
@Override
- public IDataProvider createColumnDataProvider() {
+ public DataProvider createColumnDataProvider() {
return new ColumnDataProvider() {
@Override
public Object getDataValue(final long columnIndex, final long rowIndex,
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RVectorDataProvider.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RVectorDataProvider.java
index cfd27699..9e26f44c 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RVectorDataProvider.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/dataeditor/RVectorDataProvider.java
@@ -22,7 +22,7 @@ import org.eclipse.statet.jcommons.lang.NonNull;
import org.eclipse.statet.jcommons.status.ProgressMonitor;
import org.eclipse.statet.jcommons.status.StatusException;
-import org.eclipse.statet.ecommons.waltable.data.IDataProvider;
+import org.eclipse.statet.ecommons.waltable.core.data.DataProvider;
import org.eclipse.statet.r.core.rmodel.RElementName;
import org.eclipse.statet.r.ui.dataeditor.RDataTableColumn;
@@ -86,7 +86,7 @@ public class RVectorDataProvider extends AbstractRDataProvider<RVector<?>> {
}
@Override
- public IDataProvider createColumnDataProvider() {
+ public DataProvider createColumnDataProvider() {
return new ColumnDataProvider() {
@Override
public Object getDataValue(final long columnIndex, final long rowIndex,
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/datafilterview/ColumnLabelProvider.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/datafilterview/ColumnLabelProvider.java
index f63ee975..eed954f7 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/datafilterview/ColumnLabelProvider.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/datafilterview/ColumnLabelProvider.java
@@ -22,7 +22,7 @@ import org.eclipse.swt.graphics.Font;
import org.eclipse.statet.jcommons.lang.NonNullByDefault;
import org.eclipse.statet.jcommons.lang.Nullable;
-import org.eclipse.statet.ecommons.waltable.data.ControlData;
+import org.eclipse.statet.ecommons.waltable.core.data.ControlData;
import org.eclipse.statet.r.ui.dataeditor.RDataTableColumn;
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/DimPositionResizeCommandHandler.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/DimPositionResizeCommandHandler.java
index d85d66b9..2e11054f 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/DimPositionResizeCommandHandler.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/DimPositionResizeCommandHandler.java
@@ -14,12 +14,15 @@
package org.eclipse.statet.internal.r.ui.intable;
-import static org.eclipse.statet.ecommons.waltable.coordinate.Orientation.HORIZONTAL;
+import static org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation.HORIZONTAL;
-import org.eclipse.statet.ecommons.waltable.command.AbstractLayerCommandHandler;
-import org.eclipse.statet.ecommons.waltable.resize.DimPositionResizeCommand;
+import org.eclipse.statet.jcommons.lang.NonNullByDefault;
+import org.eclipse.statet.ecommons.waltable.core.command.AbstractLayerCommandHandler;
+import org.eclipse.statet.ecommons.waltable.resize.core.DimPositionResizeCommand;
+
+@NonNullByDefault
public class DimPositionResizeCommandHandler extends AbstractLayerCommandHandler<DimPositionResizeCommand> {
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/MultiColumnAutoResizeCommandHandler.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/MultiColumnAutoResizeCommandHandler.java
index ddb45492..ee5de042 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/MultiColumnAutoResizeCommandHandler.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/MultiColumnAutoResizeCommandHandler.java
@@ -14,10 +14,11 @@
package org.eclipse.statet.internal.r.ui.intable;
-import org.eclipse.statet.ecommons.waltable.command.AbstractLayerCommandHandler;
-import org.eclipse.statet.ecommons.waltable.coordinate.ILValueIterator;
-import org.eclipse.statet.ecommons.waltable.coordinate.LRangeList.ValueIterator;
-import org.eclipse.statet.ecommons.waltable.resize.AutoResizePositionsCommand;
+import org.eclipse.statet.jcommons.collections.LongIterator;
+
+import org.eclipse.statet.ecommons.waltable.core.command.AbstractLayerCommandHandler;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.LRangeList.ValueIterator;
+import org.eclipse.statet.ecommons.waltable.resize.core.AutoResizePositionsCommand;
public class MultiColumnAutoResizeCommandHandler extends AbstractLayerCommandHandler<AutoResizePositionsCommand> {
@@ -38,7 +39,7 @@ public class MultiColumnAutoResizeCommandHandler extends AbstractLayerCommandHan
@Override
protected boolean doCommand(final AutoResizePositionsCommand command) {
- for (final ILValueIterator posIter= new ValueIterator(command.getPositions()); posIter.hasNext(); ) {
+ for (final LongIterator posIter= new ValueIterator(command.getPositions()); posIter.hasNext(); ) {
this.fDataLayer.setColumnWidthToAutoWidth(posIter.nextValue());
}
return true;
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/MultiColumnResizeCommandHandler.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/MultiColumnResizeCommandHandler.java
index d4cfec2c..7cfbcc13 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/MultiColumnResizeCommandHandler.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/MultiColumnResizeCommandHandler.java
@@ -14,10 +14,11 @@
package org.eclipse.statet.internal.r.ui.intable;
-import org.eclipse.statet.ecommons.waltable.command.AbstractLayerCommandHandler;
-import org.eclipse.statet.ecommons.waltable.coordinate.ILValueIterator;
-import org.eclipse.statet.ecommons.waltable.coordinate.LRangeList.ValueIterator;
-import org.eclipse.statet.ecommons.waltable.resize.MultiColumnResizeCommand;
+import org.eclipse.statet.jcommons.collections.LongIterator;
+
+import org.eclipse.statet.ecommons.waltable.core.command.AbstractLayerCommandHandler;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.LRangeList.ValueIterator;
+import org.eclipse.statet.ecommons.waltable.resize.core.MultiColumnResizeCommand;
public class MultiColumnResizeCommandHandler extends AbstractLayerCommandHandler<MultiColumnResizeCommand> {
@@ -38,7 +39,7 @@ public class MultiColumnResizeCommandHandler extends AbstractLayerCommandHandler
@Override
protected boolean doCommand(final MultiColumnResizeCommand command) {
- for (final ILValueIterator posIter= new ValueIterator(command.getPositions()); posIter.hasNext(); ) {
+ for (final LongIterator posIter= new ValueIterator(command.getPositions()); posIter.hasNext(); ) {
final long position= posIter.nextValue();
this.fDataLayer.setColumnWidth(position, command.getColumnWidth(position));
}
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/PresentationConfig.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/PresentationConfig.java
index 78dd9516..0ed3245b 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/PresentationConfig.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/PresentationConfig.java
@@ -33,27 +33,28 @@ import org.eclipse.statet.jcommons.lang.Disposable;
import org.eclipse.statet.ecommons.ui.swt.ColorUtils;
import org.eclipse.statet.ecommons.waltable.config.AbstractRegistryConfiguration;
import org.eclipse.statet.ecommons.waltable.config.CellConfigAttributes;
-import org.eclipse.statet.ecommons.waltable.config.IConfigRegistry;
import org.eclipse.statet.ecommons.waltable.config.LayoutSizeConfig;
+import org.eclipse.statet.ecommons.waltable.core.config.ConfigRegistry;
+import org.eclipse.statet.ecommons.waltable.core.config.DisplayMode;
+import org.eclipse.statet.ecommons.waltable.core.layer.LayerCellPainter;
+import org.eclipse.statet.ecommons.waltable.core.layer.LayerPainter;
+import org.eclipse.statet.ecommons.waltable.core.style.BasicStyle;
+import org.eclipse.statet.ecommons.waltable.core.style.BorderStyle;
+import org.eclipse.statet.ecommons.waltable.core.style.BorderStyle.LineStyle;
+import org.eclipse.statet.ecommons.waltable.core.style.CellStyling;
+import org.eclipse.statet.ecommons.waltable.core.style.HorizontalAlignment;
+import org.eclipse.statet.ecommons.waltable.core.style.Style;
+import org.eclipse.statet.ecommons.waltable.core.style.VerticalAlignment;
+import org.eclipse.statet.ecommons.waltable.core.swt.painters.GridLineCellLayerPainter;
import org.eclipse.statet.ecommons.waltable.freeze.IFreezeConfigAttributes;
-import org.eclipse.statet.ecommons.waltable.grid.GridRegion;
-import org.eclipse.statet.ecommons.waltable.grid.cell.AlternatingRowConfigLabelAccumulator;
-import org.eclipse.statet.ecommons.waltable.grid.labeled.CornerGridLineCellLayerPainter;
+import org.eclipse.statet.ecommons.waltable.grid.AlternatingRowLabelContributor;
+import org.eclipse.statet.ecommons.waltable.grid.core.GridLabels;
+import org.eclipse.statet.ecommons.waltable.grid.swt.CornerGridLineCellLayerPainter;
import org.eclipse.statet.ecommons.waltable.painter.cell.DiagCellPainter;
-import org.eclipse.statet.ecommons.waltable.painter.cell.ICellPainter;
import org.eclipse.statet.ecommons.waltable.painter.cell.decorator.LineBorderDecorator;
-import org.eclipse.statet.ecommons.waltable.painter.layer.GridLineCellLayerPainter;
-import org.eclipse.statet.ecommons.waltable.painter.layer.ILayerPainter;
import org.eclipse.statet.ecommons.waltable.sort.config.DefaultSortConfiguration;
-import org.eclipse.statet.ecommons.waltable.sort.painter.SortableHeaderTextPainter;
-import org.eclipse.statet.ecommons.waltable.style.BorderStyle;
-import org.eclipse.statet.ecommons.waltable.style.BorderStyle.LineStyle;
-import org.eclipse.statet.ecommons.waltable.style.CellStyleAttributes;
-import org.eclipse.statet.ecommons.waltable.style.DisplayMode;
-import org.eclipse.statet.ecommons.waltable.style.HorizontalAlignment;
+import org.eclipse.statet.ecommons.waltable.sort.swt.SortableHeaderTextPainter;
import org.eclipse.statet.ecommons.waltable.style.SelectionStyleLabels;
-import org.eclipse.statet.ecommons.waltable.style.Style;
-import org.eclipse.statet.ecommons.waltable.style.VerticalAlignment;
import org.eclipse.statet.ecommons.workbench.ui.IWaThemeConstants;
import org.eclipse.statet.internal.r.ui.RUIPlugin;
@@ -99,14 +100,14 @@ public class PresentationConfig extends AbstractRegistryConfiguration implements
private final Color bodyFreezeSeparatorColor;
- private final ILayerPainter headerLayerPainter;
- private final ILayerPainter headerLabelLayerPainter;
+ private final LayerPainter headerLayerPainter;
+ private final LayerPainter headerLabelLayerPainter;
- private ICellPainter baseCellPainter;
+ private LayerCellPainter baseCellPainter;
- private ICellPainter headerCellPainter;
- private ICellPainter headerSortedCellPainter;
- private ICellPainter headerCornerCellPainter;
+ private LayerCellPainter headerCellPainter;
+ private LayerCellPainter headerSortedCellPainter;
+ private LayerCellPainter headerCornerCellPainter;
private final BorderStyle bodyAnchorBorderStyle;
@@ -155,8 +156,8 @@ public class PresentationConfig extends AbstractRegistryConfiguration implements
this.bodyFreezeSeparatorColor= colorRegistry.get(JFacePreferences.DECORATIONS_COLOR);
- this.headerLayerPainter= new GridLineCellLayerPainter(this.headerGridColor);
- this.headerLabelLayerPainter= new CornerGridLineCellLayerPainter(this.headerGridColor);
+ this.headerLayerPainter= new GridLineCellLayerPainter((configRegistry) -> this.headerGridColor);
+ this.headerLabelLayerPainter= new CornerGridLineCellLayerPainter((configRegistry) -> this.headerGridColor);
this.bodyAnchorBorderStyle= new BorderStyle(2, this.bodyForegroundColor, LineStyle.SOLID, -1);
@@ -216,11 +217,11 @@ public class PresentationConfig extends AbstractRegistryConfiguration implements
}
}
- public ILayerPainter getHeaderLayerPainter() {
+ public LayerPainter getHeaderLayerPainter() {
return this.headerLayerPainter;
}
- public ILayerPainter getHeaderLabelLayerPainter() {
+ public LayerPainter getHeaderLabelLayerPainter() {
return this.headerLabelLayerPainter;
}
@@ -230,177 +231,177 @@ public class PresentationConfig extends AbstractRegistryConfiguration implements
@Override
- public void configureRegistry(final IConfigRegistry configRegistry) {
+ public void configureRegistry(final ConfigRegistry configRegistry) {
// base
- { final Style cellStyle= new Style();
- cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.bodyBackgroundColor);
- cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.bodyForegroundColor);
- cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, HorizontalAlignment.RIGHT);
- cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, VerticalAlignment.MIDDLE);
- cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, null);
- cellStyle.setAttributeValue(CellStyleAttributes.FONT, this.baseFont);
- cellStyle.setAttributeValue(CellStyleAttributes.CONTROL_FONT, this.infoFont);
+ { final Style cellStyle= new BasicStyle();
+ cellStyle.setAttributeValue(CellStyling.BACKGROUND_COLOR, this.bodyBackgroundColor);
+ cellStyle.setAttributeValue(CellStyling.FOREGROUND_COLOR, this.bodyForegroundColor);
+ cellStyle.setAttributeValue(CellStyling.HORIZONTAL_ALIGNMENT, HorizontalAlignment.RIGHT);
+ cellStyle.setAttributeValue(CellStyling.VERTICAL_ALIGNMENT, VerticalAlignment.MIDDLE);
+ cellStyle.setAttributeValue(CellStyling.BORDER_STYLE, null);
+ cellStyle.setAttributeValue(CellStyling.FONT, this.baseFont);
+ cellStyle.setAttributeValue(CellStyling.CONTROL_FONT, this.infoFont);
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, this.baseCellPainter);
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle);
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_PAINTER, this.baseCellPainter);
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle);
- configRegistry.registerConfigAttribute(LayoutSizeConfig.CONFIG, this.baseSizeConfig);
+ configRegistry.registerAttribute(LayoutSizeConfig.CONFIG, this.baseSizeConfig);
}
// headers
{ // column header
- final Style cellStyle= new Style();
- cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.headerBackgroundColor);
- cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.headerForegroundColor);
- cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, HorizontalAlignment.CENTER);
- cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, VerticalAlignment.MIDDLE);
- cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, null);
- cellStyle.setAttributeValue(CellStyleAttributes.FONT, this.baseFont);
- cellStyle.setAttributeValue(CellStyleAttributes.CONTROL_FONT, this.infoFont);
+ final Style cellStyle= new BasicStyle();
+ cellStyle.setAttributeValue(CellStyling.BACKGROUND_COLOR, this.headerBackgroundColor);
+ cellStyle.setAttributeValue(CellStyling.FOREGROUND_COLOR, this.headerForegroundColor);
+ cellStyle.setAttributeValue(CellStyling.HORIZONTAL_ALIGNMENT, HorizontalAlignment.CENTER);
+ cellStyle.setAttributeValue(CellStyling.VERTICAL_ALIGNMENT, VerticalAlignment.MIDDLE);
+ cellStyle.setAttributeValue(CellStyling.BORDER_STYLE, null);
+ cellStyle.setAttributeValue(CellStyling.FONT, this.baseFont);
+ cellStyle.setAttributeValue(CellStyling.CONTROL_FONT, this.infoFont);
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.NORMAL, GridRegion.COLUMN_HEADER );
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, this.headerCellPainter,
- DisplayMode.NORMAL, GridRegion.COLUMN_HEADER );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.NORMAL, GridLabels.COLUMN_HEADER );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_PAINTER, this.headerCellPainter,
+ DisplayMode.NORMAL, GridLabels.COLUMN_HEADER );
}
{ // column header label
- final Style cellStyle= new Style();
- cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.headerBackgroundColor);
- cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.headerForegroundColor);
- cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, HorizontalAlignment.RIGHT);
- cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, VerticalAlignment.MIDDLE);
- cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, null);
- cellStyle.setAttributeValue(CellStyleAttributes.FONT, this.baseFont);
- cellStyle.setAttributeValue(CellStyleAttributes.CONTROL_FONT, this.infoFont);
+ final Style cellStyle= new BasicStyle();
+ cellStyle.setAttributeValue(CellStyling.BACKGROUND_COLOR, this.headerBackgroundColor);
+ cellStyle.setAttributeValue(CellStyling.FOREGROUND_COLOR, this.headerForegroundColor);
+ cellStyle.setAttributeValue(CellStyling.HORIZONTAL_ALIGNMENT, HorizontalAlignment.RIGHT);
+ cellStyle.setAttributeValue(CellStyling.VERTICAL_ALIGNMENT, VerticalAlignment.MIDDLE);
+ cellStyle.setAttributeValue(CellStyling.BORDER_STYLE, null);
+ cellStyle.setAttributeValue(CellStyling.FONT, this.baseFont);
+ cellStyle.setAttributeValue(CellStyling.CONTROL_FONT, this.infoFont);
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.NORMAL, GridRegion.COLUMN_HEADER_LABEL );
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, this.headerCellPainter,
- DisplayMode.NORMAL, GridRegion.COLUMN_HEADER_LABEL );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.NORMAL, GridLabels.COLUMN_HEADER_LABEL );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_PAINTER, this.headerCellPainter,
+ DisplayMode.NORMAL, GridLabels.COLUMN_HEADER_LABEL );
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.NORMAL, GridRegion.CORNER );
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, this.headerCornerCellPainter,
- DisplayMode.NORMAL, GridRegion.CORNER );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.NORMAL, GridLabels.CORNER );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_PAINTER, this.headerCornerCellPainter,
+ DisplayMode.NORMAL, GridLabels.CORNER );
}
{ // row header
- final Style cellStyle= new Style();
- cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.headerBackgroundColor);
- cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.headerForegroundColor);
- cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, HorizontalAlignment.RIGHT);
- cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, VerticalAlignment.MIDDLE);
- cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, null);
- cellStyle.setAttributeValue(CellStyleAttributes.FONT, this.baseFont);
- cellStyle.setAttributeValue(CellStyleAttributes.CONTROL_FONT, this.infoFont);
+ final Style cellStyle= new BasicStyle();
+ cellStyle.setAttributeValue(CellStyling.BACKGROUND_COLOR, this.headerBackgroundColor);
+ cellStyle.setAttributeValue(CellStyling.FOREGROUND_COLOR, this.headerForegroundColor);
+ cellStyle.setAttributeValue(CellStyling.HORIZONTAL_ALIGNMENT, HorizontalAlignment.RIGHT);
+ cellStyle.setAttributeValue(CellStyling.VERTICAL_ALIGNMENT, VerticalAlignment.MIDDLE);
+ cellStyle.setAttributeValue(CellStyling.BORDER_STYLE, null);
+ cellStyle.setAttributeValue(CellStyling.FONT, this.baseFont);
+ cellStyle.setAttributeValue(CellStyling.CONTROL_FONT, this.infoFont);
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.NORMAL, GridRegion.ROW_HEADER );
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, this.headerCellPainter,
- DisplayMode.NORMAL, GridRegion.ROW_HEADER );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.NORMAL, GridLabels.ROW_HEADER );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_PAINTER, this.headerCellPainter,
+ DisplayMode.NORMAL, GridLabels.ROW_HEADER );
}
{ // row header
- final Style cellStyle= new Style();
- cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.headerBackgroundColor);
- cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.headerForegroundColor);
- cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, HorizontalAlignment.LEFT);
- cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, VerticalAlignment.MIDDLE);
- cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, null);
- cellStyle.setAttributeValue(CellStyleAttributes.FONT, this.baseFont);
- cellStyle.setAttributeValue(CellStyleAttributes.CONTROL_FONT, this.infoFont);
+ final Style cellStyle= new BasicStyle();
+ cellStyle.setAttributeValue(CellStyling.BACKGROUND_COLOR, this.headerBackgroundColor);
+ cellStyle.setAttributeValue(CellStyling.FOREGROUND_COLOR, this.headerForegroundColor);
+ cellStyle.setAttributeValue(CellStyling.HORIZONTAL_ALIGNMENT, HorizontalAlignment.LEFT);
+ cellStyle.setAttributeValue(CellStyling.VERTICAL_ALIGNMENT, VerticalAlignment.MIDDLE);
+ cellStyle.setAttributeValue(CellStyling.BORDER_STYLE, null);
+ cellStyle.setAttributeValue(CellStyling.FONT, this.baseFont);
+ cellStyle.setAttributeValue(CellStyling.CONTROL_FONT, this.infoFont);
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.NORMAL, GridRegion.ROW_HEADER_LABEL );
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, this.headerCellPainter,
- DisplayMode.NORMAL, GridRegion.ROW_HEADER_LABEL );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.NORMAL, GridLabels.ROW_HEADER_LABEL );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_PAINTER, this.headerCellPainter,
+ DisplayMode.NORMAL, GridLabels.ROW_HEADER_LABEL );
}
{ // placeholder header
- final Style cellStyle= new Style();
- cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.headerPlaceholderColor);
- cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.headerForegroundColor);
- cellStyle.setAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT, HorizontalAlignment.RIGHT);
- cellStyle.setAttributeValue(CellStyleAttributes.VERTICAL_ALIGNMENT, VerticalAlignment.MIDDLE);
- cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, null);
- cellStyle.setAttributeValue(CellStyleAttributes.FONT, this.baseFont);
+ final Style cellStyle= new BasicStyle();
+ cellStyle.setAttributeValue(CellStyling.BACKGROUND_COLOR, this.headerPlaceholderColor);
+ cellStyle.setAttributeValue(CellStyling.FOREGROUND_COLOR, this.headerForegroundColor);
+ cellStyle.setAttributeValue(CellStyling.HORIZONTAL_ALIGNMENT, HorizontalAlignment.RIGHT);
+ cellStyle.setAttributeValue(CellStyling.VERTICAL_ALIGNMENT, VerticalAlignment.MIDDLE);
+ cellStyle.setAttributeValue(CellStyling.BORDER_STYLE, null);
+ cellStyle.setAttributeValue(CellStyling.FONT, this.baseFont);
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.NORMAL, GridRegion.HEADER_PLACEHOLDER );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.NORMAL, GridLabels.HEADER_PLACEHOLDER );
}
// alternating rows
{ // body even row
- final Style cellStyle= new Style();
- cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.bodyEvenRowBackgroundColor);
+ final Style cellStyle= new BasicStyle();
+ cellStyle.setAttributeValue(CellStyling.BACKGROUND_COLOR, this.bodyEvenRowBackgroundColor);
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.NORMAL, AlternatingRowConfigLabelAccumulator.EVEN_ROW_CONFIG_TYPE );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.NORMAL, AlternatingRowLabelContributor.EVEN_ROW_CONFIG_TYPE );
}
{ // body odd row
- final Style cellStyle= new Style();
+ final Style cellStyle= new BasicStyle();
- cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.bodyOddRowBackgroundColor);
+ cellStyle.setAttributeValue(CellStyling.BACKGROUND_COLOR, this.bodyOddRowBackgroundColor);
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.NORMAL, AlternatingRowConfigLabelAccumulator.ODD_ROW_CONFIG_TYPE );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.NORMAL, AlternatingRowLabelContributor.ODD_ROW_CONFIG_TYPE );
}
// selection
{ // body selected cell
- final Style cellStyle= new Style();
- cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR, this.bodySelectionBackgroundColor);
- cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR, this.bodySelectionForegroundColor);
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.SELECT );
+ final Style cellStyle= new BasicStyle();
+ cellStyle.setAttributeValue(CellStyling.BACKGROUND_COLOR, this.bodySelectionBackgroundColor);
+ cellStyle.setAttributeValue(CellStyling.FOREGROUND_COLOR, this.bodySelectionForegroundColor);
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.SELECTED );
}
{ // body selection anchor
- final Style cellStyle= new Style();
- cellStyle.setAttributeValue(CellStyleAttributes.BORDER_STYLE, this.bodyAnchorBorderStyle);
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ final Style cellStyle= new BasicStyle();
+ cellStyle.setAttributeValue(CellStyling.BORDER_STYLE, this.bodyAnchorBorderStyle);
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
DisplayMode.NORMAL, SelectionStyleLabels.SELECTION_ANCHOR_STYLE );
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.SELECT, SelectionStyleLabels.SELECTION_ANCHOR_STYLE );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.SELECTED, SelectionStyleLabels.SELECTION_ANCHOR_STYLE );
}
{ // header with selection
- final Style cellStyle= new Style();
- cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
+ final Style cellStyle= new BasicStyle();
+ cellStyle.setAttributeValue(CellStyling.FOREGROUND_COLOR,
this.headerSelectionForegroundColor );
- cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
+ cellStyle.setAttributeValue(CellStyling.BACKGROUND_COLOR,
this.headerSelectionBackgroundColor );
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.SELECT, GridRegion.COLUMN_HEADER );
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.SELECT, GridRegion.CORNER );
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.SELECT, GridRegion.ROW_HEADER );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.SELECTED, GridLabels.COLUMN_HEADER );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.SELECTED, GridLabels.CORNER );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.SELECTED, GridLabels.ROW_HEADER );
}
{ // header fully selected
- final Style cellStyle= new Style();
+ final Style cellStyle= new BasicStyle();
- cellStyle.setAttributeValue(CellStyleAttributes.FOREGROUND_COLOR,
+ cellStyle.setAttributeValue(CellStyling.FOREGROUND_COLOR,
this.headerFullSelectionForegroundColor );
- cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
+ cellStyle.setAttributeValue(CellStyling.BACKGROUND_COLOR,
this.headerFullSelectionBackgroundColor );
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.SELECT, SelectionStyleLabels.COLUMN_FULLY_SELECTED_STYLE );
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
- DisplayMode.SELECT, SelectionStyleLabels.ROW_FULLY_SELECTED_STYLE );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.SELECTED, SelectionStyleLabels.COLUMN_FULLY_SELECTED_STYLE );
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_STYLE, cellStyle,
+ DisplayMode.SELECTED, SelectionStyleLabels.ROW_FULLY_SELECTED_STYLE );
}
// sorting
{ // header column sorted
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER,
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_PAINTER,
this.headerSortedCellPainter,
DisplayMode.NORMAL, DefaultSortConfiguration.SORT_DOWN_CONFIG_TYPE);
- configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER,
+ configRegistry.registerAttribute(CellConfigAttributes.CELL_PAINTER,
this.headerSortedCellPainter,
DisplayMode.NORMAL, DefaultSortConfiguration.SORT_UP_CONFIG_TYPE);
}
// freezing
{ // body freezed
- configRegistry.registerConfigAttribute(IFreezeConfigAttributes.SEPARATOR_COLOR,
+ configRegistry.registerAttribute(IFreezeConfigAttributes.SEPARATOR_COLOR,
this.bodyFreezeSeparatorColor );
}
}
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/RDataLayer.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/RDataLayer.java
index fa035365..ffa505a0 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/RDataLayer.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/RDataLayer.java
@@ -14,8 +14,8 @@
package org.eclipse.statet.internal.r.ui.intable;
-import static org.eclipse.statet.ecommons.waltable.coordinate.Orientation.HORIZONTAL;
-import static org.eclipse.statet.ecommons.waltable.coordinate.Orientation.VERTICAL;
+import static org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation.HORIZONTAL;
+import static org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation.VERTICAL;
import java.util.HashMap;
import java.util.List;
@@ -23,18 +23,22 @@ import java.util.Map;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.statet.jcommons.lang.NonNullByDefault;
+import org.eclipse.statet.jcommons.lang.Nullable;
+
import org.eclipse.statet.ecommons.waltable.config.LayoutSizeConfig;
-import org.eclipse.statet.ecommons.waltable.coordinate.Orientation;
-import org.eclipse.statet.ecommons.waltable.coordinate.PositionId;
-import org.eclipse.statet.ecommons.waltable.coordinate.PositionOutOfBoundsException;
-import org.eclipse.statet.ecommons.waltable.layer.AbstractLayer;
-import org.eclipse.statet.ecommons.waltable.layer.DataDim;
-import org.eclipse.statet.ecommons.waltable.layer.ILayer;
-import org.eclipse.statet.ecommons.waltable.layer.ILayerDim;
-import org.eclipse.statet.ecommons.waltable.layer.cell.ILayerCell;
-import org.eclipse.statet.ecommons.waltable.layer.cell.LayerCell;
-import org.eclipse.statet.ecommons.waltable.layer.cell.LayerCellDim;
-import org.eclipse.statet.ecommons.waltable.resize.ColumnResizeEvent;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.LRange;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.PositionId;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.PositionOutOfBoundsException;
+import org.eclipse.statet.ecommons.waltable.core.layer.AbstractLayer;
+import org.eclipse.statet.ecommons.waltable.core.layer.BasicLayerCell;
+import org.eclipse.statet.ecommons.waltable.core.layer.BasicLayerCellDim;
+import org.eclipse.statet.ecommons.waltable.core.layer.Layer;
+import org.eclipse.statet.ecommons.waltable.core.layer.LayerCell;
+import org.eclipse.statet.ecommons.waltable.core.layer.LayerDim;
+import org.eclipse.statet.ecommons.waltable.data.core.DataLayerDim;
+import org.eclipse.statet.ecommons.waltable.resize.core.DimResizeEvent;
import org.eclipse.statet.internal.r.ui.dataeditor.AbstractRDataProvider;
import org.eclipse.statet.internal.r.ui.dataeditor.ContentDescription;
@@ -42,7 +46,8 @@ import org.eclipse.statet.internal.r.ui.dataeditor.RDataFormatter;
import org.eclipse.statet.r.ui.dataeditor.RDataTableColumn;
-public class RDataLayer extends AbstractLayer {
+@NonNullByDefault
+public class RDataLayer extends AbstractLayer<DataLayerDim<RDataLayer>> {
private static int minmax(final int value, final int min, final int max) {
@@ -50,7 +55,7 @@ public class RDataLayer extends AbstractLayer {
}
- private static class ColumnsDim extends DataDim<RDataLayer> {
+ private static class ColumnsDim extends DataLayerDim<RDataLayer> {
private final int defaultMinChars= 8;
@@ -130,7 +135,7 @@ public class RDataLayer extends AbstractLayer {
@Override
public long getPositionStart(final long position) {
if (position < 0 || position >= getPositionCount()) {
- throw PositionOutOfBoundsException.position(position, getOrientation());
+ throw new PositionOutOfBoundsException(position, getOrientation());
}
return aggregateSize(position);
}
@@ -138,7 +143,7 @@ public class RDataLayer extends AbstractLayer {
@Override
public int getPositionSize(final long position) {
if (position < 0 || position >= getPositionCount()) {
- throw PositionOutOfBoundsException.position(position, getOrientation());
+ throw new PositionOutOfBoundsException(position, getOrientation());
}
final Integer columnWidth= this.customPositionSizes.get(
this.layer.dataProvider.getAllColumnsEqual() ?
@@ -212,7 +217,7 @@ public class RDataLayer extends AbstractLayer {
}
- private static class RowsDim extends DataDim<RDataLayer> {
+ private static class RowsDim extends DataLayerDim<RDataLayer> {
private int positionSize;
@@ -271,30 +276,32 @@ public class RDataLayer extends AbstractLayer {
public RDataLayer(final AbstractRDataProvider<?> dataProvider, final LayoutSizeConfig sizeConfig) {
this.dataProvider= dataProvider;
this.sizeConfig= sizeConfig;
- initDims();
+
+ init();
registerCommandHandlers();
}
-
@Override
- protected void initDims() {
- if (this.sizeConfig == null) {
- return;
+ protected DataLayerDim<RDataLayer> createDim(final Orientation orientation) {
+ switch (orientation) {
+ case HORIZONTAL:
+ return new ColumnsDim(this,
+ this.sizeConfig.getCharWidth(), this.sizeConfig.getDefaultSpace() * 4 );
+ case VERTICAL:
+ return new RowsDim(this,
+ this.sizeConfig.getRowHeight() );
+ default:
+ throw new IllegalStateException();
}
-
- setDim(new ColumnsDim(this,
- this.sizeConfig.getCharWidth(), this.sizeConfig.getDefaultSpace() * 4 ));
- setDim(new RowsDim(this,
- this.sizeConfig.getRowHeight() ));
}
private ColumnsDim getColumnDim() {
- return (ColumnsDim) getDim(HORIZONTAL);
+ return (ColumnsDim)getDim(HORIZONTAL);
}
private RowsDim getRowDim() {
- return (RowsDim) getDim(VERTICAL);
+ return (RowsDim)getDim(VERTICAL);
}
@@ -321,30 +328,30 @@ public class RDataLayer extends AbstractLayer {
public void setColumnWidth(final long columnPosition, final int width) {
getColumnDim().setCustomSize(columnPosition, width);
- fireLayerEvent(new ColumnResizeEvent(this, columnPosition));
+ fireLayerEvent(new DimResizeEvent(getDim(HORIZONTAL), new LRange(columnPosition)));
}
public void setColumnWidthToAutoWidth(final long columnPosition) {
getColumnDim().setAutoSize(columnPosition);
- fireLayerEvent(new ColumnResizeEvent(this, columnPosition));
+ fireLayerEvent(new DimResizeEvent(getDim(HORIZONTAL), new LRange(columnPosition)));
}
// Cell features
@Override
- public ILayerCell getCellByPosition(final long columnPosition, final long rowPosition) {
- final ILayerDim hDim= getDim(HORIZONTAL);
- final ILayerDim vDim= getDim(VERTICAL);
+ public LayerCell getCellByPosition(final long columnPosition, final long rowPosition) {
+ final LayerDim hDim= getDim(HORIZONTAL);
+ final LayerDim vDim= getDim(VERTICAL);
final long columnId= hDim.getPositionId(columnPosition, columnPosition);
final long rowId= vDim.getPositionId(rowPosition, rowPosition);
- return new LayerCell(this,
- new LayerCellDim(HORIZONTAL, columnId, columnPosition),
- new LayerCellDim(VERTICAL, rowId, rowPosition) ) {
+ return new BasicLayerCell(this,
+ new BasicLayerCellDim(HORIZONTAL, columnId, columnPosition),
+ new BasicLayerCellDim(VERTICAL, rowId, rowPosition) ) {
@Override
- public Object getDataValue(final int flags, final IProgressMonitor monitor) {
+ public Object getDataValue(final int flags, final @Nullable IProgressMonitor monitor) {
return RDataLayer.this.dataProvider.getDataValue(getColumnPosition(), getRowPosition(),
flags, monitor );
}
@@ -353,7 +360,7 @@ public class RDataLayer extends AbstractLayer {
}
@Override
- public ILayer getUnderlyingLayerByPosition(final long columnPosition, final long rowPosition) {
+ public @Nullable Layer getUnderlyingLayerByPosition(final long columnPosition, final long rowPosition) {
return null;
}
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/RTextPainter.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/RTextPainter.java
index 1ec9668f..0376dd05 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/RTextPainter.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/RTextPainter.java
@@ -22,18 +22,18 @@ import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.GC;
import org.eclipse.statet.ecommons.waltable.config.CellConfigAttributes;
-import org.eclipse.statet.ecommons.waltable.config.IConfigRegistry;
-import org.eclipse.statet.ecommons.waltable.coordinate.LRectangle;
-import org.eclipse.statet.ecommons.waltable.data.ControlData;
+import org.eclipse.statet.ecommons.waltable.core.config.ConfigRegistry;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.LRectangle;
+import org.eclipse.statet.ecommons.waltable.core.data.ControlData;
+import org.eclipse.statet.ecommons.waltable.core.layer.LayerCell;
+import org.eclipse.statet.ecommons.waltable.core.style.CellStyling;
+import org.eclipse.statet.ecommons.waltable.core.style.HorizontalAlignment;
+import org.eclipse.statet.ecommons.waltable.core.style.Style;
+import org.eclipse.statet.ecommons.waltable.core.style.VerticalAlignment;
+import org.eclipse.statet.ecommons.waltable.core.swt.SwtUtils;
import org.eclipse.statet.ecommons.waltable.data.convert.IDisplayConverter;
-import org.eclipse.statet.ecommons.waltable.layer.cell.ILayerCell;
import org.eclipse.statet.ecommons.waltable.painter.cell.AbstractTextPainter;
-import org.eclipse.statet.ecommons.waltable.style.CellStyleAttributes;
import org.eclipse.statet.ecommons.waltable.style.CellStyleUtil;
-import org.eclipse.statet.ecommons.waltable.style.HorizontalAlignment;
-import org.eclipse.statet.ecommons.waltable.style.IStyle;
-import org.eclipse.statet.ecommons.waltable.style.VerticalAlignment;
-import org.eclipse.statet.ecommons.waltable.swt.SWTUtil;
import org.eclipse.statet.ecommons.waltable.util.GUIHelper;
@@ -41,12 +41,12 @@ public class RTextPainter extends AbstractTextPainter {
/**
- * Convert the data value of the cell using the {@link IDisplayConverter} from the {@link IConfigRegistry}
+ * Convert the data value of the cell using the {@link IDisplayConverter} from the {@link ConfigRegistry}
*/
- private static Object getData(final ILayerCell cell, final IConfigRegistry configRegistry) {
- final IDisplayConverter displayConverter= configRegistry.getConfigAttribute(
+ private static Object getData(final LayerCell cell, final ConfigRegistry configRegistry) {
+ final IDisplayConverter displayConverter= configRegistry.getAttribute(
CellConfigAttributes.DISPLAY_CONVERTER, cell.getDisplayMode(),
- cell.getConfigLabels().getLabels() );
+ cell.getLabels().getLabels() );
return (displayConverter != null) ?
displayConverter.canonicalToDisplayValue(cell, configRegistry, cell.getDataValue(0, null)) : EMPTY;
}
@@ -64,33 +64,33 @@ public class RTextPainter extends AbstractTextPainter {
@Override
- public long getPreferredWidth(final ILayerCell cell, final GC gc, final IConfigRegistry configRegistry){
+ public long getPreferredWidth(final LayerCell cell, final GC gc, final ConfigRegistry configRegistry){
final Object data= getData(cell, configRegistry);
setupGCFromConfig(gc, CellStyleUtil.getCellStyle(cell, configRegistry), data);
return getWidthFromCache(gc, data.toString()) + (this.spacing * 2);
}
@Override
- public long getPreferredHeight(final ILayerCell cell, final GC gc, final IConfigRegistry configRegistry) {
+ public long getPreferredHeight(final LayerCell cell, final GC gc, final ConfigRegistry configRegistry) {
final Object data= getData(cell, configRegistry);
setupGCFromConfig(gc, CellStyleUtil.getCellStyle(cell, configRegistry), data);
// return gc.textExtent(data.toString(), swtDrawStyle).y;
return gc.getFontMetrics().getHeight();
}
- protected void setupGCFromConfig(final GC gc, final IStyle cellStyle, final Object data) {
- Color fg= cellStyle.getAttributeValue(CellStyleAttributes.FOREGROUND_COLOR);
+ protected void setupGCFromConfig(final GC gc, final Style cellStyle, final Object data) {
+ Color fg= cellStyle.getAttributeValue(CellStyling.FOREGROUND_COLOR);
if (fg == null) {
fg= GUIHelper.COLOR_LIST_FOREGROUND;
}
-// Color bg= cellStyle.getAttributeValue(CellStyleAttributes.BACKGROUND_COLOR);
+// Color bg= cellStyle.getAttributeValue(CellStyling.BACKGROUND_COLOR);
// if (bg == null) {
// bg= GUIHelper.COLOR_LIST_BACKGROUND;
// }
Font font;
if ((!(data instanceof ControlData)) ||
- (font= cellStyle.getAttributeValue(CellStyleAttributes.CONTROL_FONT)) == null) {
- font= cellStyle.getAttributeValue(CellStyleAttributes.FONT);
+ (font= cellStyle.getAttributeValue(CellStyling.CONTROL_FONT)) == null) {
+ font= cellStyle.getAttributeValue(CellStyling.FONT);
}
// gc.setAntialias(SWT.DEFAULT);
@@ -101,17 +101,17 @@ public class RTextPainter extends AbstractTextPainter {
}
@Override
- public void paintCell(final ILayerCell cell, final GC gc, final LRectangle lRectangle,
- final IConfigRegistry configRegistry) {
+ public void paintCell(final LayerCell cell, final GC gc, final LRectangle lRectangle,
+ final ConfigRegistry configRegistry) {
if (this.paintBg) {
super.paintCell(cell, gc, lRectangle, configRegistry);
}
final org.eclipse.swt.graphics.Rectangle originalClipping= gc.getClipping();
- gc.setClipping(SWTUtil.toSWT(lRectangle).intersection(originalClipping));
+ gc.setClipping(SwtUtils.toSWT(lRectangle).intersection(originalClipping));
final Object data= getData(cell, configRegistry);
- final IStyle cellStyle= CellStyleUtil.getCellStyle(cell, configRegistry);
+ final Style cellStyle= CellStyleUtil.getCellStyle(cell, configRegistry);
setupGCFromConfig(gc, cellStyle, data);
// Draw Text
@@ -133,7 +133,7 @@ public class RTextPainter extends AbstractTextPainter {
safe(lRectangle.x + this.spacing + CellStyleUtil.getHorizontalAlignmentPadding(
(data instanceof ControlData) ?
HorizontalAlignment.LEFT :
- cellStyle.getAttributeValue(CellStyleAttributes.HORIZONTAL_ALIGNMENT),
+ cellStyle.getAttributeValue(CellStyling.HORIZONTAL_ALIGNMENT),
width, contentWidth )),
safe(lRectangle.y + CellStyleUtil.getVerticalAlignmentPadding(VerticalAlignment.MIDDLE,
lRectangle.height, contentHeight )),
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/TableLayers.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/TableLayers.java
index 0e8c47bd..7ee71c0e 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/TableLayers.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/TableLayers.java
@@ -17,10 +17,10 @@ package org.eclipse.statet.internal.r.ui.intable;
import org.eclipse.statet.ecommons.waltable.NatTable;
import org.eclipse.statet.ecommons.waltable.command.LayerCommandUtil;
import org.eclipse.statet.ecommons.waltable.coordinate.ColumnPositionCoordinate;
-import org.eclipse.statet.ecommons.waltable.layer.DataLayer;
-import org.eclipse.statet.ecommons.waltable.layer.ILayer;
-import org.eclipse.statet.ecommons.waltable.selection.SelectionLayer;
-import org.eclipse.statet.ecommons.waltable.viewport.ViewportLayer;
+import org.eclipse.statet.ecommons.waltable.core.layer.Layer;
+import org.eclipse.statet.ecommons.waltable.data.core.DataLayer;
+import org.eclipse.statet.ecommons.waltable.selection.core.SelectionLayer;
+import org.eclipse.statet.ecommons.waltable.viewport.core.ViewportLayer;
public class TableLayers {
@@ -32,12 +32,12 @@ public class TableLayers {
public ViewportLayer viewportLayer;
- public ILayer topBodyLayer;
+ public Layer topBodyLayer;
public DataLayer dataColumnHeaderLayer;
- public ILayer topColumnHeaderLayer;
+ public Layer topColumnHeaderLayer;
public DataLayer dataRowHeaderLayer;
- public ILayer topRowHeaderLayer;
+ public Layer topRowHeaderLayer;
public NatTable table;
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/UIBindings.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/UIBindings.java
index 3cbcc134..da5e175a 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/UIBindings.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/internal/r/ui/intable/UIBindings.java
@@ -14,8 +14,8 @@
package org.eclipse.statet.internal.r.ui.intable;
-import static org.eclipse.statet.ecommons.waltable.coordinate.Orientation.HORIZONTAL;
-import static org.eclipse.statet.ecommons.waltable.coordinate.Orientation.VERTICAL;
+import static org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation.HORIZONTAL;
+import static org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation.VERTICAL;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.action.IMenuManager;
@@ -37,21 +37,21 @@ import org.eclipse.statet.ecommons.ui.SharedUIResources;
import org.eclipse.statet.ecommons.ui.actions.UIActions;
import org.eclipse.statet.ecommons.waltable.NatTable;
import org.eclipse.statet.ecommons.waltable.config.AbstractUiBindingConfiguration;
-import org.eclipse.statet.ecommons.waltable.coordinate.Direction;
-import org.eclipse.statet.ecommons.waltable.grid.GridRegion;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.Direction;
+import org.eclipse.statet.ecommons.waltable.grid.core.GridLabels;
import org.eclipse.statet.ecommons.waltable.resize.ColumnResizeEventMatcher;
-import org.eclipse.statet.ecommons.waltable.resize.InitializeAutoResizeCommand;
import org.eclipse.statet.ecommons.waltable.resize.PositionResizeDragMode;
-import org.eclipse.statet.ecommons.waltable.resize.action.AutoResizeColumnAction;
-import org.eclipse.statet.ecommons.waltable.resize.action.ColumnResizeCursorAction;
-import org.eclipse.statet.ecommons.waltable.selection.SelectRelativeCellCommand;
-import org.eclipse.statet.ecommons.waltable.selection.action.CellSelectionDragMode;
-import org.eclipse.statet.ecommons.waltable.selection.action.RowSelectionDragMode;
-import org.eclipse.statet.ecommons.waltable.selection.action.SelectCellAction;
-import org.eclipse.statet.ecommons.waltable.sort.ClearSortCommand;
-import org.eclipse.statet.ecommons.waltable.sort.SortDimPositionCommand;
-import org.eclipse.statet.ecommons.waltable.sort.SortDirection;
-import org.eclipse.statet.ecommons.waltable.sort.action.SortColumnAction;
+import org.eclipse.statet.ecommons.waltable.resize.core.InitializeAutoResizeCommand;
+import org.eclipse.statet.ecommons.waltable.resize.ui.action.AutoResizeColumnAction;
+import org.eclipse.statet.ecommons.waltable.resize.ui.action.ColumnResizeCursorAction;
+import org.eclipse.statet.ecommons.waltable.selection.core.SelectRelativeCellCommand;
+import org.eclipse.statet.ecommons.waltable.selection.ui.action.CellSelectionDragMode;
+import org.eclipse.statet.ecommons.waltable.selection.ui.action.RowSelectionDragMode;
+import org.eclipse.statet.ecommons.waltable.selection.ui.action.SelectCellAction;
+import org.eclipse.statet.ecommons.waltable.sort.core.ClearSortCommand;
+import org.eclipse.statet.ecommons.waltable.sort.core.SortDimPositionCommand;
+import org.eclipse.statet.ecommons.waltable.sort.core.SortDirection;
+import org.eclipse.statet.ecommons.waltable.sort.ui.action.SortColumnAction;
import org.eclipse.statet.ecommons.waltable.ui.NatEventData;
import org.eclipse.statet.ecommons.waltable.ui.action.AbstractNavigationAction;
import org.eclipse.statet.ecommons.waltable.ui.action.ClearCursorAction;
@@ -61,9 +61,9 @@ import org.eclipse.statet.ecommons.waltable.ui.matcher.IMouseEventMatcher;
import org.eclipse.statet.ecommons.waltable.ui.matcher.KeyEventMatcher;
import org.eclipse.statet.ecommons.waltable.ui.matcher.MouseEventMatcher;
import org.eclipse.statet.ecommons.waltable.ui.menu.PopupMenuAction;
-import org.eclipse.statet.ecommons.waltable.viewport.ScrollStepCommand;
-import org.eclipse.statet.ecommons.waltable.viewport.SelectRelativePageCommand;
-import org.eclipse.statet.ecommons.waltable.viewport.action.ViewportSelectDimPositionsAction;
+import org.eclipse.statet.ecommons.waltable.viewport.core.ScrollStepCommand;
+import org.eclipse.statet.ecommons.waltable.viewport.core.SelectRelativePageCommand;
+import org.eclipse.statet.ecommons.waltable.viewport.ui.action.ViewportSelectDimPositionsAction;
public class UIBindings {
@@ -259,27 +259,27 @@ public class UIBindings {
// mouse
uiBindingRegistry.registerMouseDownBinding(
new MouseEventMatcher(MouseEventMatcher.WILDCARD_MASK | SWT.CTRL | SWT.SHIFT,
- GridRegion.BODY, IMouseEventMatcher.LEFT_BUTTON ),
+ GridLabels.BODY, IMouseEventMatcher.LEFT_BUTTON ),
new SelectCellAction());
uiBindingRegistry.registerMouseDownBinding(
new MouseEventMatcher(MouseEventMatcher.WILDCARD_MASK | SWT.CTRL | SWT.SHIFT,
- GridRegion.COLUMN_HEADER, IMouseEventMatcher.LEFT_BUTTON ),
+ GridLabels.COLUMN_HEADER, IMouseEventMatcher.LEFT_BUTTON ),
new ViewportSelectDimPositionsAction(HORIZONTAL));
uiBindingRegistry.registerMouseDownBinding(
new MouseEventMatcher(MouseEventMatcher.WILDCARD_MASK | SWT.CTRL | SWT.SHIFT,
- GridRegion.ROW_HEADER, IMouseEventMatcher.LEFT_BUTTON ),
+ GridLabels.ROW_HEADER, IMouseEventMatcher.LEFT_BUTTON ),
new ViewportSelectDimPositionsAction(VERTICAL));
uiBindingRegistry.registerMouseDragMode(
new MouseEventMatcher(MouseEventMatcher.WILDCARD_MASK | SWT.CTRL | SWT.SHIFT,
- GridRegion.BODY, IMouseEventMatcher.LEFT_BUTTON ),
+ GridLabels.BODY, IMouseEventMatcher.LEFT_BUTTON ),
new CellSelectionDragMode());
uiBindingRegistry.registerMouseDragMode(
new MouseEventMatcher(MouseEventMatcher.WILDCARD_MASK | SWT.CTRL | SWT.SHIFT,
- GridRegion.ROW_HEADER, IMouseEventMatcher.LEFT_BUTTON ),
+ GridLabels.ROW_HEADER, IMouseEventMatcher.LEFT_BUTTON ),
new RowSelectionDragMode());
}
@@ -295,7 +295,7 @@ public class UIBindings {
@Override
public void configureUiBindings(final UiBindingRegistry uiBindingRegistry) {
uiBindingRegistry.registerSingleClickBinding(
- new MouseEventMatcher(SWT.ALT, GridRegion.COLUMN_HEADER, 1),
+ new MouseEventMatcher(SWT.ALT, GridLabels.COLUMN_HEADER, 1),
new SortColumnAction(false));
}
@@ -368,7 +368,7 @@ public class UIBindings {
@Override
public void configureUiBindings(final UiBindingRegistry uiBindingRegistry) {
uiBindingRegistry.registerSingleClickBinding(
- new MouseEventMatcher(SWT.NONE, GridRegion.COLUMN_HEADER, IMouseEventMatcher.RIGHT_BUTTON),
+ new MouseEventMatcher(SWT.NONE, GridLabels.COLUMN_HEADER, IMouseEventMatcher.RIGHT_BUTTON),
new PopupMenuAction(this.menuManager.getMenu()));
}
@@ -407,7 +407,7 @@ public class UIBindings {
@Override
public void configureUiBindings(final UiBindingRegistry uiBindingRegistry) {
uiBindingRegistry.registerSingleClickBinding(
- new MouseEventMatcher(SWT.NONE, GridRegion.BODY, IMouseEventMatcher.RIGHT_BUTTON),
+ new MouseEventMatcher(SWT.NONE, GridLabels.BODY, IMouseEventMatcher.RIGHT_BUTTON),
new PopupMenuAction(this.menuManager.getMenu()));
}
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/dataeditor/RDataTableViewer.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/dataeditor/RDataTableViewer.java
index 8971078a..8678a8e5 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/dataeditor/RDataTableViewer.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/dataeditor/RDataTableViewer.java
@@ -14,7 +14,8 @@
package org.eclipse.statet.r.ui.dataeditor;
-import static org.eclipse.statet.ecommons.waltable.coordinate.Orientation.HORIZONTAL;
+import static org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation.HORIZONTAL;
+import static org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation.VERTICAL;
import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
@@ -56,58 +57,58 @@ import org.eclipse.statet.jcommons.ts.core.ToolService;
import org.eclipse.statet.ecommons.ui.util.LayoutUtils;
import org.eclipse.statet.ecommons.ui.viewers.BasicCustomViewer;
import org.eclipse.statet.ecommons.waltable.NatTable;
-import org.eclipse.statet.ecommons.waltable.command.ILayerCommandHandler;
import org.eclipse.statet.ecommons.waltable.config.CellConfigAttributes;
-import org.eclipse.statet.ecommons.waltable.config.IConfigRegistry;
import org.eclipse.statet.ecommons.waltable.config.LayoutSizeConfig;
-import org.eclipse.statet.ecommons.waltable.coordinate.LRange;
-import org.eclipse.statet.ecommons.waltable.coordinate.LRangeList;
-import org.eclipse.statet.ecommons.waltable.coordinate.Orientation;
import org.eclipse.statet.ecommons.waltable.coordinate.PositionCoordinate;
-import org.eclipse.statet.ecommons.waltable.coordinate.PositionId;
import org.eclipse.statet.ecommons.waltable.copy.CopyToClipboardCommandHandler;
-import org.eclipse.statet.ecommons.waltable.data.ControlData;
-import org.eclipse.statet.ecommons.waltable.data.IDataProvider;
-import org.eclipse.statet.ecommons.waltable.data.ISpanningDataProvider;
-import org.eclipse.statet.ecommons.waltable.freeze.CompositeFreezeLayer;
+import org.eclipse.statet.ecommons.waltable.core.command.LayerCommandHandler;
+import org.eclipse.statet.ecommons.waltable.core.config.ConfigRegistry;
+import org.eclipse.statet.ecommons.waltable.core.config.DisplayMode;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.LRange;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.LRangeList;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.Orientation;
+import org.eclipse.statet.ecommons.waltable.core.coordinate.PositionId;
+import org.eclipse.statet.ecommons.waltable.core.data.ControlData;
+import org.eclipse.statet.ecommons.waltable.core.data.DataProvider;
+import org.eclipse.statet.ecommons.waltable.core.data.SpanningDataProvider;
+import org.eclipse.statet.ecommons.waltable.core.layer.LayerEvent;
+import org.eclipse.statet.ecommons.waltable.core.layer.LayerListener;
+import org.eclipse.statet.ecommons.waltable.core.layer.events.DimGeneralStrucuralChangeEvent;
+import org.eclipse.statet.ecommons.waltable.core.layer.events.DimPositionsVisualChangeEvent;
+import org.eclipse.statet.ecommons.waltable.core.layer.events.GeneralVisualChangeEvent;
+import org.eclipse.statet.ecommons.waltable.core.layer.events.VisualChangeEvent;
+import org.eclipse.statet.ecommons.waltable.data.core.DataLayer;
+import org.eclipse.statet.ecommons.waltable.data.core.SpanningDataLayer;
import org.eclipse.statet.ecommons.waltable.freeze.FreezeLayer;
-import org.eclipse.statet.ecommons.waltable.grid.GridRegion;
-import org.eclipse.statet.ecommons.waltable.grid.cell.AlternatingRowConfigLabelAccumulator;
-import org.eclipse.statet.ecommons.waltable.grid.data.DefaultCornerDataProvider;
-import org.eclipse.statet.ecommons.waltable.grid.labeled.ExtColumnHeaderLayer;
-import org.eclipse.statet.ecommons.waltable.grid.labeled.ExtGridLayer;
-import org.eclipse.statet.ecommons.waltable.grid.labeled.ExtRowHeaderLayer;
-import org.eclipse.statet.ecommons.waltable.grid.labeled.LabelCornerLayer;
-import org.eclipse.statet.ecommons.waltable.grid.layer.ColumnHeaderLayer;
-import org.eclipse.statet.ecommons.waltable.grid.layer.CornerLayer;
-import org.eclipse.statet.ecommons.waltable.grid.layer.GridLayer;
-import org.eclipse.statet.ecommons.waltable.grid.layer.RowHeaderLayer;
-import org.eclipse.statet.ecommons.waltable.layer.DataLayer;
-import org.eclipse.statet.ecommons.waltable.layer.ILayerListener;
-import org.eclipse.statet.ecommons.waltable.layer.SpanningDataLayer;
+import org.eclipse.statet.ecommons.waltable.freeze.core.CompositeFreezeLayer;
+import org.eclipse.statet.ecommons.waltable.grid.AlternatingRowLabelContributor;
+import org.eclipse.statet.ecommons.waltable.grid.core.GridLabels;
+import org.eclipse.statet.ecommons.waltable.grid.core.GridLayer;
+import org.eclipse.statet.ecommons.waltable.grid.core.data.DefaultCornerDataProvider;
+import org.eclipse.statet.ecommons.waltable.grid.core.labeled.ExtColumnHeaderLayer;
+import org.eclipse.statet.ecommons.waltable.grid.core.labeled.ExtGridLayer;
+import org.eclipse.statet.ecommons.waltable.grid.core.labeled.ExtRowHeaderLayer;
+import org.eclipse.statet.ecommons.waltable.grid.core.labeled.LabelCornerLayer;
+import org.eclipse.statet.ecommons.waltable.grid.core.layers.ColumnHeaderLayer;
+import org.eclipse.statet.ecommons.waltable.grid.core.layers.CornerLayer;
+import org.eclipse.statet.ecommons.waltable.grid.core.layers.RowHeaderLayer;
import org.eclipse.statet.ecommons.waltable.layer.cell.AggregrateConfigLabelAccumulator;
-import org.eclipse.statet.ecommons.waltable.layer.event.ILayerEvent;
-import org.eclipse.statet.ecommons.waltable.layer.event.IVisualChangeEvent;
-import org.eclipse.statet.ecommons.waltable.layer.event.RowStructuralRefreshEvent;
-import org.eclipse.statet.ecommons.waltable.layer.event.RowUpdateEvent;
-import org.eclipse.statet.ecommons.waltable.resize.InitializeAutoResizeCommandHandler;
-import org.eclipse.statet.ecommons.waltable.selection.ISelectionEvent;
-import org.eclipse.statet.ecommons.waltable.selection.SelectAllCommand;
-import org.eclipse.statet.ecommons.waltable.selection.SelectDimPositionsCommand;
-import org.eclipse.statet.ecommons.waltable.selection.SelectRelativeCommandHandler;
-import org.eclipse.statet.ecommons.waltable.selection.SelectionLayer;
-import org.eclipse.statet.ecommons.waltable.sort.ClearSortCommand;
-import org.eclipse.statet.ecommons.waltable.sort.ClearSortCommandHandler;
-import org.eclipse.statet.ecommons.waltable.sort.ISortModel;
-import org.eclipse.statet.ecommons.waltable.sort.SortDimPositionCommand;
-import org.eclipse.statet.ecommons.waltable.sort.SortDirection;
-import org.eclipse.statet.ecommons.waltable.sort.SortHeaderLayer;
-import org.eclipse.statet.ecommons.waltable.sort.SortPositionCommandHandler;
-import org.eclipse.statet.ecommons.waltable.style.DisplayMode;
+import org.eclipse.statet.ecommons.waltable.resize.core.InitializeAutoResizeCommandHandler;
+import org.eclipse.statet.ecommons.waltable.selection.core.SelectAllCommand;
+import org.eclipse.statet.ecommons.waltable.selection.core.SelectDimPositionsCommand;
+import org.eclipse.statet.ecommons.waltable.selection.core.SelectRelativeCommandHandler;
+import org.eclipse.statet.ecommons.waltable.selection.core.SelectionLayer;
+import org.eclipse.statet.ecommons.waltable.sort.core.ClearSortCommand;
+import org.eclipse.statet.ecommons.waltable.sort.core.ClearSortCommandHandler;
+import org.eclipse.statet.ecommons.waltable.sort.core.SortDimPositionCommand;
+import org.eclipse.statet.ecommons.waltable.sort.core.SortDirection;
+import org.eclipse.statet.ecommons.waltable.sort.core.SortHeaderLayer;
+import org.eclipse.statet.ecommons.waltable.sort.core.SortModel;
+import org.eclipse.statet.ecommons.waltable.sort.core.SortPositionCommandHandler;
import org.eclipse.statet.ecommons.waltable.tickupdate.config.DefaultTickUpdateConfiguration;
import org.eclipse.statet.ecommons.waltable.ui.ITableUIContext;
-import org.eclipse.statet.ecommons.waltable.viewport.IViewportDim;
-import org.eclipse.statet.ecommons.waltable.viewport.ViewportLayer;
+import org.eclipse.statet.ecommons.waltable.viewport.core.ViewportLayer;
+import org.eclipse.statet.ecommons.waltable.viewport.core.ViewportLayerDim;
import org.eclipse.statet.internal.r.ui.dataeditor.AbstractRDataProvider;
import org.eclipse.statet.internal.r.ui.dataeditor.FTableDataProvider;
@@ -335,9 +336,9 @@ public class RDataTableViewer extends BasicCustomViewer<RDataTableSelection> {
layers.topBodyLayer= compositeFreezeLayer;
}
- { final IDataProvider headerDataProvider= dataProvider.getColumnDataProvider();
- layers.dataColumnHeaderLayer= (headerDataProvider instanceof ISpanningDataProvider) ?
- new SpanningDataLayer((ISpanningDataProvider) headerDataProvider,
+ { final DataProvider headerDataProvider= dataProvider.getColumnDataProvider();
+ layers.dataColumnHeaderLayer= (headerDataProvider instanceof SpanningDataProvider) ?
+ new SpanningDataLayer((SpanningDataProvider) headerDataProvider,
PositionId.BODY_CAT, 10,
PositionId.HEADER_CAT, 10 ) :
new DataLayer(headerDataProvider,
@@ -351,16 +352,16 @@ public class RDataTableViewer extends BasicCustomViewer<RDataTableSelection> {
layer.addConfiguration(new UIBindings.ColumnHeaderConfiguration());
layers.topColumnHeaderLayer= layer;
}
- final ISortModel sortModel= dataProvider.getSortModel();
+ final SortModel sortModel= dataProvider.getSortModel();
if (sortModel != null) {
final SortHeaderLayer<?> sortHeaderLayer= new SortHeaderLayer<>(
layers.topColumnHeaderLayer, sortModel, false);
sortHeaderLayer.addConfiguration(new UIBindings.SortConfiguration());
layers.topColumnHeaderLayer= sortHeaderLayer;
}
- { final IDataProvider headerDataProvider= dataProvider.getRowDataProvider();
- layers.dataRowHeaderLayer= (headerDataProvider instanceof ISpanningDataProvider) ?
- new SpanningDataLayer((ISpanningDataProvider) headerDataProvider,
+ { final DataProvider headerDataProvider= dataProvider.getRowDataProvider();
+ layers.dataRowHeaderLayer= (headerDataProvider instanceof SpanningDataProvider) ?
+ new SpanningDataLayer((SpanningDataProvider) headerDataProvider,
PositionId.HEADER_CAT, 10,
PositionId.BODY_CAT, 10 ) :
new DataLayer(headerDataProvider,
@@ -372,7 +373,7 @@ public class RDataTableViewer extends BasicCustomViewer<RDataTableSelection> {
layers.topBodyLayer, layers.selectionLayer,
false, presentation.getHeaderLayerPainter() );
}
- final IDataProvider cornerDataProvider= new DefaultCornerDataProvider(
+ final DataProvider cornerDataProvider= new DefaultCornerDataProvider(
layers.dataColumnHeaderLayer.getDataProvider(),
layers.dataRowHeaderLayer.getDataProvider() );
@@ -399,7 +400,7 @@ public class RDataTableViewer extends BasicCustomViewer<RDataTableSelection> {
gridLayer= new GridLayer(layers.topBodyLayer,
layers.topColumnHeaderLayer, layers.topRowHeaderLayer, cornerLayer, false);
}
- gridLayer.addConfigLabelAccumulatorForRegion(GridRegion.BODY, new AlternatingRowConfigLabelAccumulator());
+ gridLayer.addCellLabelContributor(GridLabels.BODY, new AlternatingRowLabelContributor());
final Runnable configRunnable= new Runnable() {
@Override
@@ -430,25 +431,25 @@ public class RDataTableViewer extends BasicCustomViewer<RDataTableSelection> {
// { final ILayerCommandHandler<?> commandHandler= new ScrollCommandHandler(fTableLayers.viewportLayer);
// fTableLayers.viewportLayer.registerCommandHandler(commandHandler);
// }
- { final ILayerCommandHandler<?> commandHandler= new SelectRelativeCommandHandler(
+ { final LayerCommandHandler<?> commandHandler= new SelectRelativeCommandHandler(
layers.selectionLayer );
layers.viewportLayer.registerCommandHandler(commandHandler);
layers.selectionLayer.registerCommandHandler(commandHandler);
}
- { final ILayerCommandHandler<?> commandHandler= new CopyToClipboardCommandHandler(
+ { final LayerCommandHandler<?> commandHandler= new CopyToClipboardCommandHandler(
layers.selectionLayer, uiContext );
layers.selectionLayer.registerCommandHandler(commandHandler);
}
- { final ILayerCommandHandler<?> commandHandler= new InitializeAutoResizeCommandHandler(
+ { final LayerCommandHandler<?> commandHandler= new InitializeAutoResizeCommandHandler(
layers.selectionLayer );
gridLayer.registerCommandHandler(commandHandler);
}
if (sortModel != null) {
- final ILayerCommandHandler<?> commandHandler= new SortPositionCommandHandler(sortModel);
+ final LayerCommandHandler<?> commandHandler= new SortPositionCommandHandler(sortModel);
layers.dataLayer.registerCommandHandler(commandHandler);
}
if (sortModel != null) {
- final ILayerCommandHandler<?> commandHandler= new ClearSortCommandHandler(sortModel);
+ final LayerCommandHandler<?> commandHandler= new ClearSortCommandHandler(sortModel);
layers.dataLayer.registerCommandHandler(commandHandler);
}
@@ -466,26 +467,26 @@ public class RDataTableViewer extends BasicCustomViewer<RDataTableSelection> {
}
});
- final IConfigRegistry registry= layers.table.getConfigRegistry();
- registry.registerConfigAttribute(CellConfigAttributes.DISPLAY_CONVERTER,
+ final ConfigRegistry registry= layers.table.getConfigRegistry();
+ registry.registerAttribute(CellConfigAttributes.DISPLAY_CONVERTER,
new RDataFormatterConverter(dataProvider));
- registry.registerConfigAttribute(CellConfigAttributes.DISPLAY_CONVERTER,
+ registry.registerAttribute(CellConfigAttributes.DISPLAY_CONVERTER,
new RDataFormatterConverter.RowHeader(dataProvider),
- DisplayMode.NORMAL, GridRegion.ROW_HEADER);
+ DisplayMode.NORMAL, GridLabels.ROW_HEADER);
this.tableLayers= layers;
this.tableInitialized= false;
configRunnable.run();
- layers.table.addLayerListener(new ILayerListener() {
+ layers.table.addLayerListener(new LayerListener() {
@Override
- public void handleLayerEvent(final ILayerEvent event) {
- if (event instanceof ISelectionEvent) {
+ public void handleLayerEvent(final LayerEvent event) {
+ if (event instanceof org.eclipse.statet.ecommons.waltable.selection.core.SelectionEvent) {
refreshSelection(0, UpdateType.DEFAULT_DELAYED_POST, true);
return;
}
- if (event instanceof IVisualChangeEvent) {
+ if (event instanceof VisualChangeEvent) {
refreshSelection(CHECK_LABEL, UpdateType.DEFAULT_DELAYED_POST, true);
return;
}
@@ -513,11 +514,12 @@ public class RDataTableViewer extends BasicCustomViewer<RDataTableSelection> {
RDataTableViewer.this.tableInitialized= true;
}
else if (structChanged) {
- layers.dataLayer.fireLayerEvent(new RowStructuralRefreshEvent(layers.dataLayer));
+ layers.dataLayer.fireLayerEvent(new DimGeneralStrucuralChangeEvent(
+ layers.dataLayer.getDim(VERTICAL) ));
}
else {
- layers.dataLayer.fireLayerEvent(new RowUpdateEvent(layers.dataLayer,
- new LRange(0, layers.dataLayer.getRowCount()) ));
+ layers.dataLayer.fireLayerEvent(new GeneralVisualChangeEvent(
+ layers.dataLayer ));
}
for (final RDataTableListener listener : RDataTableViewer.this.tableListeners) {
@@ -547,7 +549,8 @@ public class RDataTableViewer extends BasicCustomViewer<RDataTableSelection> {
}
final DataViewDescription dataViewDescription= refreshDataViewDescription(layers);
- layers.dataLayer.fireLayerEvent(new RowStructuralRefreshEvent(layers.dataLayer));
+ layers.dataLayer.fireLayerEvent(new DimGeneralStrucuralChangeEvent(
+ layers.dataLayer.getDim(VERTICAL) ));
for (final RDataTableListener listener : RDataTableViewer.this.tableListeners) {
listener.onDataViewChanged(dataViewDescription);
@@ -564,8 +567,8 @@ public class RDataTableViewer extends BasicCustomViewer<RDataTableSelection> {
if (layers != RDataTableViewer.this.tableLayers || layers.table.isDisposed()) {
return;
}
- layers.dataLayer.fireLayerEvent(new RowUpdateEvent(layers.dataLayer,
- new LRange(beginIdx, endIdx) ));
+ layers.dataLayer.fireLayerEvent(new DimPositionsVisualChangeEvent(
+ layers.dataLayer.getDim(VERTICAL), new LRange(beginIdx, endIdx) ));
}
});
}
@@ -662,7 +665,7 @@ public class RDataTableViewer extends BasicCustomViewer<RDataTableSelection> {
if (!this.dataProvider.hasRealRows()) {
return ""; //$NON-NLS-1$
}
- final IDataProvider dataProvider= this.dataProvider.getRowDataProvider();
+ final DataProvider dataProvider= this.dataProvider.getRowDataProvider();
if (dataProvider.getColumnCount() <= 1) {
return getHeaderLabel(dataProvider.getDataValue(0, row, 0, null));
}
@@ -682,7 +685,7 @@ public class RDataTableViewer extends BasicCustomViewer<RDataTableSelection> {
if (!this.dataProvider.hasRealColumns()) {
return ""; //$NON-NLS-1$
}
- final IDataProvider dataProvider= this.dataProvider.getColumnDataProvider();
+ final DataProvider dataProvider= this.dataProvider.getColumnDataProvider();
if (dataProvider.getRowCount() <= 1) {
return getHeaderLabel(dataProvider.getDataValue(column, 0, 0, null));
}
@@ -750,7 +753,7 @@ public class RDataTableViewer extends BasicCustomViewer<RDataTableSelection> {
return (tableLayers != null && this.layout.topControl == tableLayers.table);
}
- public IViewportDim getViewport(final Orientation orientation) {
+ public ViewportLayerDim getViewport(final Orientation orientation) {
return this.tableLayers.viewportLayer.getDim(orientation);
}
diff --git a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/editors/RElementSearchHandler.java b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/editors/RElementSearchHandler.java
index e3878440..a3d789af 100644
--- a/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/editors/RElementSearchHandler.java
+++ b/r/org.eclipse.statet.r.ui/src/org/eclipse/statet/r/ui/editors/RElementSearchHandler.java
@@ -41,10 +41,10 @@ import org.eclipse.statet.ltk.ui.util.LTKSelectionUtils;
import org.eclipse.statet.ltk.ui.util.LTKWorkbenchUIUtil;
import org.eclipse.statet.r.core.refactoring.RElementSearchProcessor;
import org.eclipse.statet.r.core.refactoring.RElementSearchProcessor.Mode;
+import org.eclipse.statet.r.core.refactoring.RRefactoringAdapter;
import org.eclipse.statet.r.core.rmodel.RElementAccess;
import org.eclipse.statet.r.core.rmodel.RElementName;
import org.eclipse.statet.r.core.rmodel.RSourceUnit;
-import org.eclipse.statet.r.core.refactoring.RRefactoringAdapter;
import org.eclipse.statet.r.core.rsource.ast.RAstNode;
import org.eclipse.statet.r.ui.RUI;

Back to the top