Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349158

Summary: [Documentation] Issue with Scoping code snippet
Product: [Modeling] TMF Reporter: Joel Denton <joeldenton>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: jan, sebastian.zarnekow
Version: 2.0.0Flags: sebastian.zarnekow: indigo+
Target Milestone: SR1   
Hardware: All   
OS: All   
Whiteboard:

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