Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
XPath queries in your code vs pmd designer
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alifiya Hussain  
View profile  
 More options Apr 3 2005, 4:44 pm
From: "Alifiya Hussain" <alif...@cs.toronto.edu>
Date: Sun, 3 Apr 2005 16:44:15 -0400 (EDT)
Local: Sun, Apr 3 2005 4:44 pm
Subject: XPath queries in your code vs pmd designer
hi guys,

I am playing around with XPath Queries for new metrics and I can't seem to
figure out how to get a query that works in pmd's Designer to work in your
code, and vice versa.

Eg, if I type in "ClassDeclaration:"  or "InterfaceDeclaration:" into the
designer, it doesnt work, while they do in the code. At the same time,
"//ClassOrInterfaceDeclaration//MethodDeclaration" gives me the methods in
a class/interface but having this regexp returns a zero in the code.

Why is this?

Alifiya


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David James  
View profile  
 More options Apr 3 2005, 5:08 pm
From: David James <jame...@gmail.com>
Date: Sun, 3 Apr 2005 17:08:02 -0400
Local: Sun, Apr 3 2005 5:08 pm
Subject: Re: [JCVSReport] XPath queries in your code vs pmd designer
On Apr 3, 2005 4:44 PM, Alifiya Hussain <alif...@cs.toronto.edu> wrote:
> I am playing around with XPath Queries for new metrics and I can't seem to
> figure out how to get a query that works in pmd's Designer to work in your
> code, and vice versa.

> Eg, if I type in "ClassDeclaration:"  or "InterfaceDeclaration:" into the
> designer, it doesnt work, while they do in the code. At the same time,
> "//ClassOrInterfaceDeclaration//MethodDeclaration" gives me the methods in
> a class/interface but having this regexp returns a zero in the code.

> Why is this?

PMD parses source code and converts it to a tree of objects. PMD
allows you to search this tree of objects using XPath. JCVSReport does
not.

Instead, JCVSReport takes the tree of objects returned by PMD and
dumps it out to a big string. JCVSReport allows you to search this big
string using a regular expression.

PMD designer shows you the 'big string' representation of any Java
class on screen. This is quite handy when you're writing regular
expressions for JCVSReport.

Cheers,

David

--
http://www.cs.toronto.edu/~james


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google