title: Copy name of object in variable explorer
body: <p>I frequently find myself examining deeply nested data in the variable explorer, e.g.:</p>
  
  <pre><code>objectName.structArray1(5).structArray2(3).structArray3(7).doubleArray(4)
  </code></pre>
  
  <p>In order to be descriptive, the variable names are often long.  I often want to use some of the data I'm looking at in Matlab expression, composed at the command line. So I end up typing the lengthy series of variable names and indexes.  Autocompletion helps, but not much, especially since my variable names share many substrings.</p>
  
  <p>It would be a lifesaver if I could copy into the clipboard the entire expression corresponding to the data being examined in the variable viewer.  I haven't yet found a way to do this (the most obvious way being to right-click the tab for the data being examined). So I'm not sure if this functionality exists.  Can anyone confirm or deny (hopefully the former) whether this functionality exists?  If it does, how is it done?</p>
  
  <p>As an example, suppose you had a class file myClass.m in the current working directory:</p>
  
  <pre><code>% myClass.m
  %----------
  classdef myClass
  properties
      structArray1
  end % properties
  end % class
  </code></pre>
  
  <p>Now suppose you issued the following commands:</p>
  
  <pre><code>objectName = myClass
  objectName.structArray1(5).structArray2(3).structArray3(7).doubleArray(1:3)=rand(1,3)
  openvar('objectName.structArray1(5).structArray2(3).structArray3(7).doubleArray')
  </code></pre>
  
  <p>You are now examining a slew of data within a deeply nested data structure.  Normally, the data would have been the result of computation other than the rand statement above, and I would have browsed to it manually rather than using the <code>openvar</code> statement above.  So I would not normally have readily available the text for the expression</p>
  
  <pre><code>objectName.structArray1(5).structArray2(3).structArray3(7).doubleArray
  </code></pre>
  
  <p>I have to manually type it in at the command line if I want to use it in a Matlab expression for further computation.  It'd be so great if I could somehow point to the tab for that data in the variable explorer and somehow have the expression for the data copied to the clipboard.  That way, I can paste it to the command line.</p>
  
  <p><strong>AFTERNOTE:</strong> 
  If there's no way to do this, then as an alternative to manually typing in the whole expression above, is there a way to access the corresponding data object (or a copy thereof) programmatically through the variable explorer window object?  This assumes, of course, that the variable explorer is itself a data object as well, through which properties can be accessed.  If so, maybe it has a property (perhaps deeply nested) that represents the expression for data in the tab that currently has the focus.  If so, I can write a function to retrieve the corresponding data object.</p>