package org.rstudio.studio.client.workbench.views.environment.view;

import com.google.gwt.cell.client.ClickableTextCell;
import com.google.gwt.user.cellview.client.Column;

public class EnvironmentObjectGrid extends EnvironmentObjectDisplay
{
   public EnvironmentObjectGrid(EnvironmentObjectDisplay.Host host,
                                EnvironmentObjectsObserver observer)
   {
      super(host, observer);
      createColumns();
   }

   private void createColumns()
   {
      addColumn(new Column<RObjectEntry, String>(
              new ClickableTextCell())
              {
                  @Override
                  public String getValue(RObjectEntry object)
                  {
                     return object.rObject.getName();
                  }
              });
   }
}

@@ -62,16 +62,115 @@
 .view;%0A%0A
+import org.rstudio.core.client.StringUtil;%0Aimport org.rstudio.studio.client.common.FilePathUtils;%0A%0A
 import c
@@ -877,16 +877,1343 @@
        %7D
+, %22Name%22);%0A      addColumn(new Column%3CRObjectEntry, String%3E(%0A              new ClickableTextCell())%0A              %7B%0A                  @Override%0A                  public String getValue(RObjectEntry object)%0A                  %7B%0A                     return object.rObject.getType();%0A                  %7D%0A              %7D, %22Type%22);%0A      addColumn(new Column%3CRObjectEntry, String%3E(%0A              new ClickableTextCell())%0A              %7B%0A                  @Override%0A                  public String getValue(RObjectEntry object)%0A                  %7B%0A                     return (new Integer(object.rObject.getLength())).toString();%0A                  %7D%0A              %7D, %22Length%22);%0A      addColumn(new Column%3CRObjectEntry, String%3E(%0A              new ClickableTextCell())%0A              %7B%0A                  @Override%0A                  public String getValue(RObjectEntry object)%0A                  %7B%0A                     return StringUtil.formatFileSize(object.rObject.getSize());%0A                  %7D%0A              %7D, %22Size%22);%0A      addColumn(new Column%3CRObjectEntry, String%3E(%0A              new ClickableTextCell())%0A              %7B%0A                  @Override%0A                  public String getValue(RObjectEntry object)%0A                  %7B%0A                     return object.rObject.getValue();%0A                  %7D%0A              %7D, %22Value%22
 );%0A   %7D%0A

add simple columns to grid view (warning: ugly)