if (part instanceof TextEditPart) {
//TODO: ?? part = (TextEditPart) part;
viewer = (IHTMLGraphicalViewer) part.getViewer();
}
if (request instanceof LinkRequest) {
LinkRequest req = (LinkRequest) request;
String identifier = req.getIdentifier();
DesignRange range = req.getDesignRange();
// TODO: when part !instancof TextEditPart, viewer == null
Command command = new MakeLinkCommand(identifier, viewer, part,
range);
return command;
}