Permalink
Browse files

Variables window changes

  • Loading branch information...
1 parent 2b59df3 commit b1020977939e7621d2ebe3d8815a145ae609ef59 @mark-moseley committed Sep 23, 2009
Showing with 9 additions and 2 deletions.
  1. +9 −2 ruby.debugger/src/org/netbeans/modules/ruby/debugger/model/VariablesModel.java
@@ -217,12 +217,19 @@ public Object getValueAt(Object node, String columnID) throws
public boolean isReadOnly(Object node, String columnID) throws
UnknownTypeException {
- return true;
+ return (LOCALS_TYPE_COLUMN_ID.equals(columnID)); // disable changing variable type for now
}
public void setValueAt(Object node, String columnID, Object value)
throws UnknownTypeException {
- throw new UnknownTypeException(node);
+ assert value instanceof String;
+ assert node instanceof RubyVariable;
+ if (LOCALS_VALUE_COLUMN_ID.equals(columnID))
+ rubySession.setValueAt((RubyVariable)node, (String)value);
+ else if (LOCALS_TYPE_COLUMN_ID.equals(columnID))
+ rubySession.setTypeAt((RubyVariable)node, (String)value);
+ else
+ throw new UnknownTypeException(node);
}
public boolean canRename(Object node) throws UnknownTypeException {

0 comments on commit b102097

Please sign in to comment.