Comparing the selected code with ASTNode
<p>I have done a plugin in eclipse helios for parsing (AST) and comparing code. First I parse the code and keep the MethodDeclaration node. Then I select a method from the code to compare with the methods of the node.</p>

<p>I save the code in <code>SelectedText selectedText</code> and the node in <code>MethodDeclaration method</code>.</p>

<p>How can I compare this two variables to know if they are holding the same code??? I have done the next code but it doesn't work:</p>

<pre><code>for (MethodDeclaration method : visitor.getMethods()) {                       
          if(selectedText.getSelectedText().equals(method.toString())){
              MessageDialog.openInformation(shell, "COMPARISON", "GOOD");                 
          }
      }
</code></pre>
