Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354927 - xtend2 does not validate imports
Summary: xtend2 does not validate imports
Status: CLOSED DUPLICATE of bug 300906
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: SR2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-17 05:37 EDT by Matthias Wienand CLA
Modified: 2011-08-17 05:43 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Wienand CLA 2011-08-17 05:37:19 EDT
Build Identifier: I20110613-1736

You can place arbitrary imports in a .xtend file without getting response on whether the specified import is legal or not.

Example:
[xtend]
import it.aint.there
[/xtend]

Such import statements should be highlighted appropriately.

When generating the DSL, the imports get reorganized, so that illegal imports do not make it into the generated code and some of the required imports are added automatically. Nevertheless, import validation could reduce the time needed to find "bugs" that are just misspelled imports.

Example:
[xtend]
import org.eclipse.xtext.generator.IFilesystemAccess
class DatadslGenerator implements IGenerator {
    override void doGenerate(Resource resource, IFileSystemAccess fsa) {
    }
}
[/xtend]

In this example the IFileSystemAccess interface cannot be resolved, because the respective import is misspelled.

Reproducible: Always

Steps to Reproduce:
1. Create a new .xtend file
2. Add an import statement: "import it.aint.there"
3. As you can see, the import statement is neither marked nor listed as a problem.
Comment 1 Sebastian Zarnekow CLA 2011-08-17 05:43:06 EDT

*** This bug has been marked as a duplicate of bug 300906 ***