Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326988

Summary: Explain 'scopepattern' and 'referencepattern' better on API Use Ant Task help page
Product: [Eclipse Project] PDE Reporter: Ankur Sharma <ankur_sharma>
Component: DocAssignee: Curtis Windatt <curtis.windatt.public>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ankur_sharma, curtis.windatt.public, daniel_megert, darin.eclipse, Michael_Rennie
Version: 3.6Keywords: Documentation
Target Milestone: 3.7 RC2Flags: Michael_Rennie: review+
Hardware: PC   
OS: Windows XP   
Whiteboard:

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