private Object fallbackGetValueAt(TableModel original, Object node, String columnID) throws UnknownTypeException { try { return original.getValueAt(node, columnID); } catch (UnknownTypeException x) { return ""; } }
@Override public boolean isReadOnly(TableModel original, Object node, String columnID) throws UnknownTypeException { if (node instanceof JSVariable || node instanceof ScopeVariable || node instanceof JSWatchVar) { return true; } return original.isReadOnly(node, columnID); }
@Override public void setValueAt(TableModel original, Object node, String columnID, Object value) throws UnknownTypeException { if (node instanceof JSVariable) { return ; } original.setValueAt(node, columnID, value); }
colValue = original.getValueAt(((AttributeMap.Attribute)node).getValue(), columnID); else if (node instanceof JSPVariablesFilter.AttributeMap || node instanceof JSPVariablesFilter.ImplicitLocals) colValue = ""; else colValue = original.getValueAt(node, columnID);
@Override public void setValueAt(TableModel original, Object node, String columnID, Object value) throws UnknownTypeException { if (node instanceof JSVariable || node instanceof JSWatchVar) { return ; } original.setValueAt(node, columnID, value); }
@Override public boolean isReadOnly(TableModel original, Object node, String columnID) throws UnknownTypeException { if (node instanceof JSVariable) { return true; } return original.isReadOnly(node, columnID); }
@Override public Object getValueAt(TableModel original, Object node, String columnID) throws UnknownTypeException { if (node instanceof JPDAWatch && !isEnabled((JPDAWatch) node)) { return original.getValueAt(node, columnID); } if (node instanceof JSVariable) { JSVariable jsVar = (JSVariable) node; switch (columnID) { case LOCALS_TYPE_COLUMN_ID: return ""; case LOCALS_VALUE_COLUMN_ID: case LOCALS_TO_STRING_COLUMN_ID: return jsVar.getValue(); } } else if (node instanceof ObjectVariable) { switch (columnID) { case LOCALS_TYPE_COLUMN_ID: case WATCH_TYPE_COLUMN_ID: return ""; case LOCALS_VALUE_COLUMN_ID: case WATCH_VALUE_COLUMN_ID: case LOCALS_TO_STRING_COLUMN_ID: case WATCH_TO_STRING_COLUMN_ID: return DebuggerSupport.getVarValue(debugger, (ObjectVariable) node); } } return original.getValueAt(node, columnID); }
/** * Changes a value displayed in column <code>columnID</code> * and row <code>node</code>. Column ID is defined in by * {@link ColumnModel#getID}, and rows are defined by values returned from * {@TreeModel#getChildren}. You should not throw UnknownTypeException * directly from this method! * * @param original the original table model * @param node a object returned from {@TreeModel#getChildren} for this row * @param columnID a id of column defined by {@link ColumnModel#getID} * @param value a new value of variable on given position * @throws UnknownTypeException this exception can be thrown from * <code>original.setValueAt (...)</code> method call only! */ public void setValueAt(TableModel original, Object node, String columnID, Object value) throws UnknownTypeException { original.setValueAt(node, columnID, value); }
/** * Filters original isReadOnly value from given table model. You should * not throw UnknownTypeException * directly from this method! * * @param original the original table model * @param node a object returned from {@TreeModel#getChildren} for this row * @param columnID a id of column defined by {@link ColumnModel#getID} * @throws UnknownTypeException this exception can be thrown from * <code>original.isReadOnly (...)</code> method call only! * * @return true if variable on given position is read only */ public boolean isReadOnly(TableModel original, Object node, String columnID) throws UnknownTypeException { boolean ro = true; if (node instanceof JSPVariablesFilter.AttributeMap || node instanceof JSPVariablesFilter.ImplicitLocals || node instanceof JSPVariablesFilter.AttributeMap.Attribute) ro = true; else ro = original.isReadOnly(node, columnID); return ro; }
@Override public Object getValueAt(TableModel original, Object node, String columnID) throws UnknownTypeException { if (node instanceof JPDAWatch && !isEnabled((JPDAWatch) node)) { return original.getValueAt(node, columnID); return original.getValueAt(node, columnID);
public void setValueAt(TableModel original, Object node, String columnID, Object value) throws UnknownTypeException { NativeSession ds = NativeSession.map((Session) node); if (ds != null) { // our stuff is all readonly // assert false; } else { original.setValueAt(node, columnID, value); } return; }
public boolean isReadOnly(TableModel original, Object node, String columnID) throws UnknownTypeException { NativeSession ds = NativeSession.map((Session) node); if (ds != null) { return true; } else { try { return original.isReadOnly(node, columnID); } catch (UnknownTypeException x) { return true; } } }
return ds.getSessionHost(); } else { return original.getValueAt(node, columnID);