Bug 440023 - Access.getJavaProjectsState() returns broken provider
Summary: Access.getJavaProjectsState() returns broken provider
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.6.1   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-21 10:55 EDT by Moritz Eysholdt CLA
Modified: 2014-07-21 11:02 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Eysholdt CLA 2014-07-21 10:55:23 EDT
invoke
Access.getJavaProjectsState().get().getContainedURIs(container);
and get an NPE at
org.eclipse.xtext.ui.shared.Access$InternalProviderForContribution.get(Access.java:65)

because via 
org.eclipse.xtext.ui.shared.Access.contributedProvider(Class<? extends T>)

an instance of 
org.eclipse.xtext.ui.shared.Access.InternalProviderForContribution<T>
is created makes use of @Inject. However, Guice never initializes the object.
Comment 1 Moritz Eysholdt CLA 2014-07-21 11:01:35 EDT
Discussion reveals that 
org.eclipse.xtext.ui.shared.Access.getJavaProjectsState()
and friends are intended to be *only* used in Guice-Modules and *must not* be used as a facade to access services. 

This ticket is a reminder to update the documentation.
Comment 2 Moritz Eysholdt CLA 2014-07-21 11:02:04 EDT
(In reply to Moritz Eysholdt from comment #1)
> This ticket is a reminder to update the documentation.

...as in: Add JavaDoc to the methods.