import javax.xml.parsers.ParserConfigurationException;
+import com.quantum.ImageStore;
import com.quantum.Messages;
import com.quantum.QuantumPlugin;
import com.quantum.model.Bookmark;
final class CopyAction extends SelectionListenerAction {
- private IViewPart view;
private BookmarkClipboard bookmarkClipboard;
/**
public CopyAction(IViewPart view, BookmarkClipboard bookmarkClipboard,
ISelectionProvider selectionProvider) {
super(Messages.getString(CopyAction.class.getName() + ".text"));
- setImageDescriptor(QuantumPlugin.getImageDescriptor("copy.gif"));
- this.view = view;
+ setImageDescriptor(ImageStore.getImageDescriptor(ImageStore.COPY));
this.bookmarkClipboard = bookmarkClipboard;
selectionProvider.addSelectionChangedListener(this);
}
ModelToXMLConverter.getInstance().convert(root, ((EntityNode) selection).getEntity());
StringWriter text = new StringWriter();
try {
- XMLHelper.createDOMSerializer(text).serialize(doc);
+ XMLHelper.write(text, doc);
} catch (IOException e) {
e.printStackTrace();
}