Summary: | [search] clarify 'ALLOCATION_EXPRESSION_TYPE_REFERENCE' | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Martin Aeschlimann <martinae> |
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | david_audel |
Version: | 3.3 | ||
Target Milestone: | 3.4 M4 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Martin Aeschlimann
2007-12-03 11:38:55 EST
Here's the new proposal: /** * Return only type references used in class instance creation. * <p> * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. *</p><p> * Example: *<pre> * public class Test { * Test() {} * static Test bar() { * return new <i>Test</i>(); * } * } *</pre> * Searching references to the type <code>Test</code> using this flag in the * above snippet will match only the reference in italic. * </p><p> * Note that array creations are not returned when using this flag. * </p> * @since 3.4 * @category limitTo */ int CLASS_INSTANCE_CREATION_TYPE_REFERENCE = 0x2000; Note that while testing a little bit more this flag, I discovered a problem with parameterized constructor call. Use following test case public class Test { Test() {} <U> Test(U u) {} static Test foo() { return new <String> Test(""); } static Test bar() { return new Test(); } } and search for all references ("*" string pattern) using this CLASS_INSTANCE_CREATION_TYPE_REFERENCE flag does not return the reference in parameterized constructor call: new <String> Test("") I'll fix this issue while releasing changes for this bug... Released for 3.4M4 in HEAD stream. Verified for 3.4M4 using build I20071210-1800. |