*/
package com.quantum.actions;
+import java.sql.SQLException;
import java.util.Iterator;
import com.quantum.QuantumPlugin;
import com.quantum.model.Column;
import com.quantum.model.EntityHolder;
+import com.quantum.model.NotConnectedException;
import com.quantum.util.NthLevelConverter;
import com.quantum.util.QuantumUtil;
import com.quantum.util.StringUtil;
public class CustomCopyAction extends SelectionListenerAction {
- private final IViewPart view;
private final int ind;
/**
* @param BookmarkView
*/
public CustomCopyAction(IViewPart view, int ind) {
super(null);
- this.view = view;
this.ind = ind;
}
public void run() {
ColumnNode column = (ColumnNode) current;
if (column != null) {
converter.add(column.getColumn().getName(),
- column.getColumn().getParentEntity().getCondQualifiedName(), 0);
+ column.getColumn().getParentEntity().getQualifiedName(), 0);
}
} else if (current instanceof EntityHolder) {
EntityHolder currentSelec = (EntityHolder) current;
- converter.add(currentSelec.getEntity().getCondQualifiedName(), null, 1);
- Column[] columns = currentSelec.getEntity().getColumns();
- for (int i = 0, length = (columns == null) ? 0 : columns.length;
- i < length;
- i++) {
- converter.add(columns[i].getName(),
- currentSelec.getEntity().getCondQualifiedName(), 0);
- }
+ converter.add(currentSelec.getEntity().getQualifiedName(), null, 1);
+ try {
+ Column[] columns = currentSelec.getEntity().getColumns();
+ for (int i = 0, length = (columns == null) ? 0 : columns.length;
+ i < length;
+ i++) {
+ converter.add(columns[i].getName(),
+ currentSelec.getEntity().getQualifiedName(), 0);
+ }
+ } catch (NotConnectedException e) {
+ } catch (SQLException e) {
+ }
}
}
IPreferenceStore store = QuantumPlugin.getDefault().getPreferenceStore();