Bug 326988 - Explain 'scopepattern' and 'referencepattern' better on API Use Ant Task help page
Summary: Explain 'scopepattern' and 'referencepattern' better on API Use Ant Task help...
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Doc (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 RC2   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: Documentation
Depends on:
Blocks:
 
Reported: 2010-10-05 05:53 EDT by Ankur Sharma CLA
Modified: 2011-05-17 16:56 EDT (History)
5 users (show)

See Also:
Michael_Rennie: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ankur Sharma CLA 2010-10-05 05:53:22 EDT
The help explanation for scopepattern and referencepattern is not very clear. Consider adding an example and impact of it on result.
Comment 1 Curtis Windatt CLA 2011-05-10 15:34:53 EDT
Fixed in HEAD.

Mike, does the following make sense to you?

scopepattern  	 

This attribute specifies a regular expression pattern used to select what bundles will be searched for references. Only references found in a bundle that satisfies the regular expression will be included in the scan.

For example, the following would only scan for references found in Eclipse bundles:

org.eclipse.*

This attribute does not affect where the referenced code can be found. See the referencepattern attribute.

The pattern must be a well-formatted regular expression as defined here. 	

----

referencepattern 	

This attribute specifies a regular expression pattern used to select what bundles will be searched for referenced code. Only references that refer to code from a bundle that satisfies the regular expression will be included in the scan.

For example, the following would only scan for references that refer to code found in Eclipse bundles:

org.eclipse.*

This attribute does not affect where the reference can be found. See the scopepattern attribute.

The pattern must be a well-formatted regular expression as defined here.
Comment 2 Curtis Windatt CLA 2011-05-10 15:35:00 EDT
.
Comment 3 Michael Rennie CLA 2011-05-10 17:20:06 EDT
(In reply to comment #1) 
> scopepattern       
> Only references found in a bundle that satisfies the regular expression will 
> be included in the scan.
 
This is a bit confusing since the bundle will not be searched at all if it does not match the scope pattern. I would omit that sentence.

> 
> This attribute does not affect where the referenced code can be found. See the
> referencepattern attribute.

I am not sure what you are meaning here? What referenced code? Why would I want to see the following attribute? if you mean it does not filter references, then it needs re-wording, if thats not what you mean I would remove this sentence.

> 
> referencepattern     
> 
> This attribute specifies a regular expression pattern used to select what
> bundles will be searched for referenced code. 

"This attribute specifies a regular expression pattern used to select what bundles you want references from." sounds better to me.

> 
> For example, the following would only report references that refer to code
> found in Eclipse bundles:

"For example, the following would only report references that refer to code found in Eclipse bundles:" sounds better to me

> 
> This attribute does not affect where the reference can be found. See the
> scopepattern attribute.
> 

I would remove this sentence

If you really wanted a blurb after the simple example, maybe something like:

"Coupled with the referencepattern attribute, you can limit what bundles are searched and what bundles references come from in the scan results. 
For example if you have a scopepattern value of org.eclipse.jdt..* and a referencepattern of org.eclipse.jdt.debug..* you would only search the Eclipse JDT bundles for JDT debug references."

Switch the wording of the above for the referencepattern section.
Comment 4 Curtis Windatt CLA 2011-05-16 15:32:13 EDT
Reopening, we can improve the wording a little more.
Comment 5 Curtis Windatt CLA 2011-05-17 16:51:32 EDT
Fixed in HEAD.  Mike, feel free to review again.

See apiuse-ant-task.htm
Comment 6 Michael Rennie CLA 2011-05-17 16:56:29 EDT
+1 look s fine now