}
return PlatformUI.getWorkbench().getSharedImages()
.getImage(ISharedImages.IMG_OBJ_ELEMENT);
}
});
columnLayout.setColumnData(column.getColumn(), new ColumnWeightData(8, 0, false));
column = new TableViewerColumn(hotlinkViewer, SWT.NONE);
column.getColumn().setText(Messages.Document_Label_Column);
column.setLabelProvider(new ColumnLabelProvider() {
@Override
public String getText(Object element) {
final HotlinkDescriptor descriptor = (HotlinkDescriptor) element;
return descriptor.getLabel();
}
});
columnLayout.setColumnData(column.getColumn(), new ColumnWeightData(25, 0, true));
column = new TableViewerColumn(hotlinkViewer, SWT.NONE);
column.getColumn().setText(Messages.Document_Attribute_Column);
column.setLabelProvider(new ColumnLabelProvider() {
@Override
public String getText(Object element) {
HotlinkDescriptor descriptor = (HotlinkDescriptor) element;
return descriptor.getAttributeName();
}
});
columnLayout.setColumnData( column.getColumn(), new ColumnWeightData( 25, 0, true ));
column = new TableViewerColumn(hotlinkViewer, SWT.NONE);
column.getColumn().setText(Messages.Document_Hotlink_Column);
column.getColumn().setAlignment(SWT.CENTER);
column.setLabelProvider(new ColumnLabelProvider() {
@Override
public String getText(Object element) {
HotlinkDescriptor descriptor = (HotlinkDescriptor) element;
return DocUtils.toCamelCase(descriptor.getType().toString());
}
});
columnLayout.setColumnData( column.getColumn(), new ColumnWeightData( 15, 0, true ));
column = new TableViewerColumn(hotlinkViewer, SWT.NONE);
column.getColumn().setText(Messages.Document_Action_Column);
column.setLabelProvider(new ColumnLabelProvider() {
@Override
public String getText(Object element) {
HotlinkDescriptor descriptor = (HotlinkDescriptor) element;
if( descriptor.getConfig() == null ){
return Messages.DocumentPropertyPage_Open;
}
return descriptor.getConfig();
}
});
columnLayout.setColumnData( column.getColumn(), new ColumnWeightData( 30, 0, true ));
hotlinkViewer.getTable().setHeaderVisible(true);
hotlinkViewer.getTable().setLinesVisible(true);
hotlinkViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override