yugalatea / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

@Gadget.Inject* annotations should allow for inheritance and import #232

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release:

Detailed description:
@Gadget.Inject* annotations cannot be inherited or imported. So if there is
a library or common base class which has injection requirements, these must
be enumerated explicitly in the toplevel gadget class. This is bad for
usability and for encapsulation.

Workaround if you have one:
1) The annotations should respect inheritance. 
So if we have
class MyWidget extends BaseWidget { ... }

@Gadget.InjectModulePrefs(files=[injectedfile])
class BaseWidget extends Gadget {}

then MyWidget should have the contents of injectedfile put into its
<ModulePrefs> section.

2) The annotation syntax should allow importing annotations from another
class. 

Not sure if this would look like
@Gadget.InjectModulePrefs(imports=[com.google.somegadgetlibrary.ModulePrefs])

or something else, but the ability to import these injection annotations
from an arbitrary class would be great for building GWT gadget libraries.

Original issue reported on code.google.com by funkm...@gmail.com on 13 Jan 2009 at 11:06

GoogleCodeExporter commented 9 years ago

Original comment by galgwt.reviews@gmail.com on 14 Jan 2009 at 9:02

GoogleCodeExporter commented 9 years ago

Original comment by zundel@google.com on 21 Dec 2009 at 1:32