Hi,

this is more a conceptual questions to learn whether what I'm thinking
about actually makes sense. I'd be grateful for some hints on this.

I'm currently redesigning an Eclipse plugin that makes use of a lot of
differently scope services. Some of these services are have workspace
scope, i.e., they are singletons. Others are bound to projects and
others are based on single ICompilationUnits inside of a project
(better resources like files). See eclipse.org/recommenders or goo.gl/
VRrTA respectively for details of the project.

So far, most requests are dispatched by global workspace services.
Each such service keeps track of several per-project services and is
responsible to create child services on demand: Whenever a client
sends a request, these workbench services lookup the appropriately
scoped services (project or compilation unit scoped), create it if not
there, and than handles the request. This results in a lot of glue
code and I wonder whether Guice could help me to determine the
correctly scoped services for Eclipse.

Which services to use is typically determined by the resource/file/
compilationUnit we are working on. Each file is associated with a
project, which is again associated with a workspace. So it feels
somehow 'natural' to use guice' scopes since they feel somewhat
similar to Session and Request scopes.

Has anyone done something similar for Eclipse? Does it overall make
sense to think about scopes? Any idea how appropriate services can be
looked up based on a resource (file/folder)?

Thanks for your suggestions!
Marcel

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to