Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345925 - [xtend] validate import statements
Summary: [xtend] validate import statements
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: SR2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-16 08:06 EDT by Moritz Eysholdt CLA
Modified: 2017-09-19 18:12 EDT (History)
2 users (show)

See Also:
sven.efftinge: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Eysholdt CLA 2011-05-16 08:06:52 EDT
steps to reproduce

1. create import-statement in xtend-file "bar.FooClass"
2. move "bar.FooClass" to "baz.FooClass"
3. in the xtend-files, type references are broken now. use content assist on a broken type reference to re-create the import statement. Now, there are two import statements, whereas "baz.FooClass" overrides "bar.FooClass" since it appears later in the list. I'd expect the old import statement to be removed.
Comment 1 Sven Efftinge CLA 2011-05-16 08:18:08 EDT
If I understood correctly, the missing error marker for the invalid import is the problem, isn't it?
Comment 2 Moritz Eysholdt CLA 2011-05-16 08:20:29 EDT
(In reply to comment #1)
> If I understood correctly, the missing error marker for the invalid import is
> the problem, isn't it?

that would solve (or at least prevent) this situation, too.
Comment 3 Sven Efftinge CLA 2011-05-16 08:24:40 EDT
Import statements should be checked whether they
 - exist at all (error if not)
 - are used (warning if not)
 - static imports contains static members (error if not)
Comment 4 Sebastian Zarnekow CLA 2011-05-17 17:01:29 EDT
See also bug 300906
Comment 5 Sven Efftinge CLA 2011-10-13 10:05:21 EDT
We now have errors for unresolvable and warnings for unused, duplicate and wildcard imports (the latter are now deprecated). A quick fix using the organize imports action is registered for the warnings.
Comment 6 Karsten Thoms CLA 2017-09-19 18:02:39 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 7 Karsten Thoms CLA 2017-09-19 18:12:53 EDT
Closing all bugs that were set to RESOLVED before Neon.0