Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342190 - [Tooling] Servlet name validation breaks for feature-based launch
Summary: [Tooling] Servlet name validation breaks for feature-based launch
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: Tools (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.4 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 341083
  Show dependency tree
 
Reported: 2011-04-07 12:25 EDT by Cole Markham CLA
Modified: 2011-04-29 10:48 EDT (History)
1 user (show)

See Also:


Attachments
Patch to fix validation for feature-based launch (3.00 KB, patch)
2011-04-07 17:49 EDT, Cole Markham CLA
no flags Details | Diff
Patch with test cases (10.19 KB, patch)
2011-04-26 15:50 EDT, Cole Markham CLA
no flags Details | Diff
Patch with test cases updated (10.04 KB, patch)
2011-04-28 05:26 EDT, Beyhan Veliev CLA
rsternberg: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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