Git历史记录页面修改问题-文本重叠
我正在尝试将任务ID列添加到Git历史视图中。但是得到以下问题 如果看到图像,最后一列(任务id)将以一个字符的偏移量覆盖自身。这似乎与列的数量有关,因为当我尝试重新排列时,最后一列总是有问题 如果有人对此有任何想法,请告诉我 在提交图表中添加的代码Git历史记录页面修改问题-文本重叠,git,eclipse-plugin,Git,Eclipse Plugin,我正在尝试将任务ID列添加到Git历史视图中。但是得到以下问题 如果看到图像,最后一列(任务id)将以一个字符的偏移量覆盖自身。这似乎与列的数量有关,因为当我尝试重新排列时,最后一列总是有问题 如果有人对此有任何想法,请告诉我 在提交图表中添加的代码 private void createColumns(final Table rawTable, final TableLayout layout) { ...//existing code in the method final Table
private void createColumns(final Table rawTable, final TableLayout layout) {
...//existing code in the method
final TableColumn task = new TableColumn(rawTable, SWT.NONE);
task.setResizable(true);
task.setText(UIText.CommitGraphTable_TaskIdColumn);
// task.setWidth(50);
layout.addColumnData(new ColumnWeightData(5, 100, true));
}
在CommitLabelProvider类中添加的代码
public String getColumnText(final Object element, final int columnIndex) {
...//existing code in the method
if (columnIndex == 6){
return (taskId);//$NON-NLS-1$
}
有一个代码我错过了去更改。以XXX注释标记
private void createPaintListener(final Table rawTable) {
// Tell SWT we will completely handle painting for some columns.
//
rawTable.addListener(SWT.EraseItem, new Listener() {
public void handleEvent(final Event event) {
if (0 <= event.index && event.index <= 6)
//XXX changed the index comparison from 5 to 6
event.detail &= ~SWT.FOREGROUND;
}
});
private void createPaintListener(最终表格rawTable){
//告诉SWT,我们将完全处理部分立柱的涂装工作。
//
addListener(SWT.EraseItem,new Listener(){
公共无效handleEvent(最终事件){
如果(0