linkButton.setEnabled(DocSourceUtils.canLink(folderSource));
if (element instanceof IDocument) {
final IDocument doc = (IDocument) element;
final Type docType = doc.getType();
editButton.setEnabled(DocSourceUtils.canUpdate(doc.getSource()));
if (Type.ATTACHMENT == docType
&& ContentType.FILE == doc.getContentType()) {