title: Suppressing unused warnings for the entire class with eclipse
body: <p>I am working on a page-object class using Selenium and Eclipse (though this question applies to Eclipse in general).</p>
  
  <p>I am defining some strings, sometimes based on other strings.  As in the example below which is a simple example:</p>
  
  <pre><code>private static final String X1 = "//div[contains(@id,'s1')]";
  private static final String X2 = X1 + "//table[contains(@id,'tony')]";
  private static final String X3 = X2 + "//a";
  </code></pre>
  
  <p>etc.</p>
  
  <p>In eclipse you can hover over a string (like X3) and it will show you the value
  (like the following:</p>
  
  <p><strong>String xxxx.xxxx.com.Page.X3 = "//div[contains(@id,'s1')]//table[contains(@id,'tony')]//a")</strong></p>
  
  <p>but that's not what actually happens since it is unused, you get this message:
  <strong>The value of the field ViewProviderDemographicsPage.X3 is not used</strong></p>
  
  <p>So I always have to put something like <strong>String dummy = X3;</strong> so I can avoid that message.  I tried putting @SuppressWarnings(unused) at the top of the file (I may have the syntax wrong here but it was correct in the file).  But that appears just to suppress the warning only for the line directly under it.  Is there any way to have it show the value when you hover even if it is unused?</p>
  
  <p>What else would be optimal is if when you hover it just showed the value without the =" and " around it, and the name of the variable.  I can never select just the xpath so when I copy and paste into firefox inspect I have to paste and then remove the =" and "</p>