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

Bug 342909

Summary: Clicking Cancel from Add to Inpath dialog adds everything
Product: [Tools] AJDT Reporter: Neale Upstone <neale>
Component: UIAssignee: AJDT-inbox <AJDT-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: andrew.eisenberg
Version: 2.1.2   
Target Milestone: 2.2.4   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Neale Upstone CLA 2011-04-14 21:47:21 EDT
Build Identifier: 

Right click on a jar in Maven Dependencies (e.g. spring-aspects) in STS

Select AspectJ Tools -> Add to Inpath ... on anything, and then click cancel.

Every dependency shows with IP decoration, and the build sets of weaving every JAR.

Same applies to Add to Aspect Path.

Reproducible: Always
Comment 1 Andrew Eisenberg CLA 2011-04-15 00:33:12 EDT
Yikes.  I'll take a look at this tomorrow.
Comment 2 Andrew Eisenberg CLA 2011-04-15 12:11:34 EDT
OK.  I see what is happening here.

Right-Click -> AspectJ Tools -> Add to Inpath will automatically add whatever jars or class folders to the inpath of the current project.

If the selected jar(s) is inside of a classpath container, then instead the container will be added to the inpath.

On top of that, a dialog will appear asking the user to add a filter so that only some jars in the container are added.

Clicking cancel will close the filter dialog, but since the classpath container has already been added to the inpath, then all of the jars that it contains will be added since no filter has been applied.

I agree that this is not quite intuitive. you would expect that clicking cancel would void out the "Add to in path" operation.  However, this dialog is used in multiple locations.  In the other places where it is used, a click on cancel would do the intuitive thing and simply cancel adding a filter.

I can see 2 options here:

1. Update the text on the dialog so that it is more descriptive what cancel does
2. Use a slightly different dialog for the "Add to in path" operation that does cancel the add to in path when cancel is clicked.
Comment 3 Andrew Eisenberg CLA 2011-06-28 13:46:22 EDT
Consider for the 2.2.0 release.
Comment 4 Andrew Eisenberg CLA 2012-07-08 18:09:40 EDT
Consider for the 2.2.1 release.
Comment 5 Andrew Eisenberg CLA 2012-09-21 14:00:06 EDT
Consider for 2.2.2.
Comment 6 Andrew Eisenberg CLA 2013-02-22 13:56:30 EST
Moving to 2.2.3.
Comment 7 Andrew Eisenberg CLA 2013-07-03 15:41:38 EDT
Consider for the 2.2.4 release.