Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336397 - Property completion proposals depend on formatting
Summary: Property completion proposals depend on formatting
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 328737 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-04 16:22 EST by Michael Rennie CLA
Modified: 2011-02-12 15:48 EST (History)
1 user (show)

See Also:


Attachments
proposed fix (155.68 KB, patch)
2011-02-04 17:44 EST, Michael Rennie CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2011-02-04 16:22:05 EST
Version: 3.7.0
Build id: I20110127-2034

<project>
    <property name="xml" value="/use/xml"/>
    <property name="html" value="/use/html"/>

    <apitooling.apiuse_reportconversion
      xmlfiles="$"
      debug="true"
    />
</project>

If you create a new build file for the given snippet and activate content assist after the '$' on the  xmlfiles="$" line you will see all of the properties currently available to the build file as proposals [OK]

If you then remove the leading spaces like the following:

<project>
    <property name="xml" value="/use/xml"/>
    <property name="html" value="/use/html"/>

<apitooling.apiuse_reportconversion
xmlfiles="$"
debug="true"
/>
</project>

and activate content assist in the same location mentioned above (the '$') you will not get any proposals AND you get a weird message on the status bar about 'no task proposals available'

The problem is in AntEditorCompletionProcessor#determineProposalMode. There is some funky logic in there looking for '<', '>' and ' ' and how they are related, which fails when the formatting is removed.
Comment 1 Michael Rennie CLA 2011-02-04 17:44:54 EST
Created attachment 188378 [details]
proposed fix

Changes the logic a bit to account for being in an open element AND the activation context is '$' (the property activator)
Comment 2 Michael Rennie CLA 2011-02-07 16:59:10 EST
Committed with the fix for bug 302296 due to overlapping changes.
Comment 3 Michael Rennie CLA 2011-02-12 15:48:47 EST
*** Bug 328737 has been marked as a duplicate of this bug. ***