neo09 / gwt-platform

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

Define our custom Slot types to define child's slots in parent presenters and get rid of @ContentSlot #200

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
For the moment, presenters declare their child slot as follows:

@ContentSlot
public static final Type<RevealContentHandler<?>>
    TYPE_RevealMainContent = new Type<RevealContentHandler<?>>();

public static final Object TYPE_RevealTopBarContent = new Object();

The first one is used when child presenters want to fire a RevealContentEvent, 
the second when the slot is only used by PresenterWidgets that the parent 
directly set into the slot.

The long Type<RevealContentHandler<?>> and the use Object can lead to 
confusion. Instead we should probably create a hierarchy of interfaces and 
classes:

interface Slot {} // A marker interface
class PresenterSlot implements Slot extends Type<RevealContentHandler<?>> {}
class PresenterWidgetSlot implements Slot {}

As a bonus, we would no longer need the @ContentSlot annotation and could 
simply look for members of type:

public static final PresenterSlot 

Original issue reported on code.google.com by philippe.beaudoin on 13 Sep 2010 at 3:56

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 22 Sep 2010 at 2:07

GoogleCodeExporter commented 9 years ago
Bumped to 0.6. Enough API changes in 0.5 already.

Original comment by philippe.beaudoin on 28 Oct 2010 at 8:27

GoogleCodeExporter commented 9 years ago
Bumping to 0.7, preparing release 0.6.

Original comment by philippe.beaudoin on 6 Jun 2011 at 8:17

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 1 Feb 2012 at 6:52