import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+import com.quantum.ImageStore;
import com.quantum.Messages;
import com.quantum.QuantumPlugin;
import com.quantum.actions.CustomCopyAction;
private static SubsetNode getRoot(TreeNode node){
while (!( node instanceof SubsetNode))
{
- node = (TreeNode) node.getParent();
+ node = node.getParent();
}
return (SubsetNode) node;
mgr.add(deleteSubsetAction);
deleteSubsetAction.setText(Messages.getString("SubsetView.Delete")); //$NON-NLS-1$
deleteSubsetAction.setImageDescriptor(
- QuantumPlugin.getImageDescriptor("delete.gif")); //$NON-NLS-1$
+ ImageStore.getImageDescriptor(ImageStore.DELETE));
mgr.add(pasteAction);
pasteAction.setText(Messages.getString("SubsetView.Paste")); //$NON-NLS-1$
- pasteAction.setImageDescriptor(QuantumPlugin.getImageDescriptor("paste.gif")); //$NON-NLS-1$
+ pasteAction.setImageDescriptor(ImageStore.getImageDescriptor(ImageStore.PASTE));
mgr.add(exportXMLAction);
exportXMLAction.setText(Messages.getString("bookmarkview.exportXML")); //$NON-NLS-1$
- exportXMLAction.setImageDescriptor(QuantumPlugin.getImageDescriptor("xml.gif")); //$NON-NLS-1$
+ exportXMLAction.setImageDescriptor(ImageStore.getImageDescriptor(ImageStore.XML));
} else if (sel instanceof ObjectNode) {
mgr.add(deleteObjectAction);
deleteObjectAction.setText(Messages.getString("SubsetView.Delete")); //$NON-NLS-1$
- deleteObjectAction.setImageDescriptor(QuantumPlugin.getImageDescriptor("delete.gif")); //$NON-NLS-1$
+ deleteObjectAction.setImageDescriptor(ImageStore.getImageDescriptor(ImageStore.DELETE));
mgr.add(viewTableAction);
viewTableAction.setText(Messages.getString("bookmarkview.viewTable")); //$NON-NLS-1$
- viewTableAction.setImageDescriptor(QuantumPlugin.getImageDescriptor("table.gif")); //$NON-NLS-1$
+ viewTableAction.setImageDescriptor(ImageStore.getImageDescriptor(ImageStore.OPEN_TABLE));
mgr.add(exportXMLAction);
exportXMLAction.setText(Messages.getString("bookmarkview.exportXML")); //$NON-NLS-1$
- exportXMLAction.setImageDescriptor(QuantumPlugin.getImageDescriptor("xml.gif")); //$NON-NLS-1$
+ exportXMLAction.setImageDescriptor(ImageStore.getImageDescriptor(ImageStore.XML));
customCopyAction.selectionChanged(
(IStructuredSelection) treeViewer.getSelection());
mgr.add(customCopyAction);
} else if (sel instanceof ColumnNode){
mgr.add(deleteColumnAction);
deleteColumnAction.setText(Messages.getString("SubsetView.Delete")); //$NON-NLS-1$
- deleteColumnAction.setImageDescriptor(QuantumPlugin.getImageDescriptor("delete.gif")); //$NON-NLS-1$
+ deleteColumnAction.setImageDescriptor(ImageStore.getImageDescriptor(ImageStore.DELETE));
customCopyAction.selectionChanged(
(IStructuredSelection) treeViewer.getSelection());
mgr.add(customCopyAction);
newSubsetAction.setText("New Subset"); //$NON-NLS-1$
newSubsetAction.setToolTipText(Messages.getString("SubsetView.CreatesANewEmptySubset")); //$NON-NLS-1$
newSubsetAction.setImageDescriptor(
- QuantumPlugin.getImageDescriptor("subset.gif")); //$NON-NLS-1$
+ ImageStore.getImageDescriptor(ImageStore.SUBSET));
newSubsetAction.init(this);
deleteColumnAction = new DeleteColumnAction();
deleteColumnAction.setText("Delete Column"); //$NON-NLS-1$
deleteColumnAction.setToolTipText(Messages.getString("SubsetView.DeletesTheSelectedColumns")); //$NON-NLS-1$
deleteColumnAction.setImageDescriptor(
- QuantumPlugin.getImageDescriptor("delete.gif")); //$NON-NLS-1$
+ ImageStore.getImageDescriptor(ImageStore.DELETE));
deleteColumnAction.init(this);
deleteObjectAction = new DeleteObjectAction();
deleteObjectAction.setText("Delete Object"); //$NON-NLS-1$
deleteObjectAction.setToolTipText(Messages.getString("SubsetView.DeletesTheSelectedObject")); //$NON-NLS-1$
deleteObjectAction.setImageDescriptor(
- QuantumPlugin.getImageDescriptor("delete.gif")); //$NON-NLS-1$
+ ImageStore.getImageDescriptor(ImageStore.DELETE));
deleteObjectAction.init(this);
deleteSubsetAction = new DeleteSubsetAction();
deleteSubsetAction.setText("Delete Subset"); //$NON-NLS-1$
deleteSubsetAction.setToolTipText(Messages.getString("SubsetView.DeletesTheSelectedSubset")); //$NON-NLS-1$
deleteSubsetAction.setImageDescriptor(
- QuantumPlugin.getImageDescriptor("delete.gif")); //$NON-NLS-1$
+ ImageStore.getImageDescriptor(ImageStore.DELETE));
deleteSubsetAction.init(this);
// viewTableAction = new ViewTableAction();
// viewTableAction.setText(Messages.getString("bookmarkview.viewTable")); //$NON-NLS-1$
exportXMLAction = new ExportXMLAction();
exportXMLAction.setText(Messages.getString("bookmarkview.exportXML")); //$NON-NLS-1$
exportXMLAction.setImageDescriptor(
- QuantumPlugin.getImageDescriptor("table.gif")); //$NON-NLS-1$
+ ImageStore.getImageDescriptor(ImageStore.XML));
exportXMLAction.init(this);
this.customCopyAction = new CustomCopyAction(this,1); // 1 is unused, just in case more custom copies are defined
this.customCopyAction.setText(Messages.getString("bookmarkview.customCopyAction")); //$NON-NLS-1$
this.customCopyAction.setImageDescriptor(
- QuantumPlugin.getImageDescriptor("copy.gif")); //$NON-NLS-1$
+ ImageStore.getImageDescriptor(ImageStore.COPY));