Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349158 - [Documentation] Issue with Scoping code snippet
Summary: [Documentation] Issue with Scoping code snippet
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: SR1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-12 17:58 EDT by Joel Denton CLA
Modified: 2017-09-19 17:54 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 Joel Denton CLA 2011-06-12 17:58:24 EDT
The following snippet in the Scoping section of the Xtext Documentation attempts to iterate visibleContainer.getResourceDescription().  I beleive this should be visibleContainer.getResourceDescriptions().  "s" has been omitted.

@Inject
IContainer.Manager manager;

public void listVisibleResources(
        Resource myResource, IResourceDescriptions index) {
  IResourceDescription descr = 
        index.getResourceDescription(myResource.getURI());
  for(IContainer visibleContainer: 
          manager.getVisibleContainers(descr, index)) { 
    for(IResourceDescription visibleResourceDesc:
            visibleContainer.getResourceDescription()) { 
      System.out.println(visibleResourceDesc.getURI());
    }
  }
}
Comment 1 Jan Koehnlein CLA 2011-07-07 09:47:54 EDT
Pushed to MASTER.
Thanks for reporting.
Comment 2 Karsten Thoms CLA 2017-09-19 17:43:37 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:54:42 EDT
Closing all bugs that were set to RESOLVED before Neon.0