| Summary: | Bug in FilteringScope??? | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Victor Noël <victor.noel> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sven.efftinge, victor.noel |
| Version: | 1.0.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 330404 *** |
Build Identifier: Hello, I was trying to use org.eclipse.xtext.scoping.impl.FilteringScope and I noticed the following code: public FilteringScope(IScope delegate, final EClass ...allowedTypes) { this.delegate = delegate; this.filter = new Predicate<IEObjectDescription>(){ public boolean apply(IEObjectDescription input) { for (EClass eClass : allowedTypes) { if (eClass.isSuperTypeOf(eClass)) return true; } return false; }}; } Shouldn't it be something like: public FilteringScope(IScope delegate, final EClass ...allowedTypes) { this.delegate = delegate; this.filter = new Predicate<IEObjectDescription>(){ public boolean apply(IEObjectDescription input) { for (EClass eClass : allowedTypes) { if (eClass.isSuperTypeOf(input.getEClass())) return true; } return false; }}; } Thanks Reproducible: Always