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

Bug 342190

Summary: [Tooling] Servlet name validation breaks for feature-based launch
Product: [RT] RAP Reporter: Cole Markham <cole>
Component: ToolsAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: beyhan.veliev
Version: 1.4   
Target Milestone: 1.4 M7   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 341083    
Attachments:
Description Flags
Patch to fix validation for feature-based launch
none
Patch with test cases
none
Patch with test cases updated rsternberg: iplog+

Description Cole Markham CLA 2011-04-07 12:25:48 EDT
When using a feature-based launch configuration, the validation of the servlet name does not lookup the bundles properly and therefore fails to find the branding extension. This results in a false positive error and the launch configuration is unable to be run.
Comment 1 Cole Markham CLA 2011-04-07 17:49:10 EDT
Created attachment 192786 [details]
Patch to fix validation for feature-based launch

Here is my first go at a patch. It seems to work for me, and I only made it take effect when using feature-based launch.

I had to use an internal class from o.e.pde.launching to get the list of bundles from the configuration since it has to look up the features. I know this isn't ideal, but I didn't want to duplicate their code (which is non-trivial), and there is no public API that I could find.

I am working on a couple of test cases, but it will take some work since I will have to create a dummy feature and add the dummy plugin to it.
Comment 2 Beyhan Veliev CLA 2011-04-15 06:33:37 EDT
Hi Cole, 

thank you for this bug report and patch. I reviewed it and looks good. It is
not optimal that we have to use internals but there are no APIs for this. Will
be great to have also the test cases and we will resolve this bug.
Comment 3 Cole Markham CLA 2011-04-26 15:50:34 EDT
Created attachment 194097 [details]
Patch with test cases

Added test cases for validation of servlet name when feature-based launch is used. These are based on code from the PDE tests, which I noted in the copyright.
Comment 4 Beyhan Veliev CLA 2011-04-28 05:26:53 EDT
Created attachment 194247 [details]
Patch with test  cases updated

Hi Cole thank you for the updated patch. I reviewed the patch and it is ready for commit. I did following:
* changed one of the test cases. 
* small refactoring
* code formatting: Sometimes there are two spaces after an opening bracket and before a closing bracket
* changed the version range of "org.eclipse.ide.ui". The min version for it was Eclipse 3.7. RAP-tooling supports Eclipse 3.6 also.
Comment 5 Ralf Sternberg CLA 2011-04-28 09:34:08 EDT
Applied patch #3 to CVS HEAD with minor changes