Deck deck = (Deck) getEditorInput().getAdapter(Deck.class);
deck.reinitialize(CardPool.instance());
}
public void initializeDeckViewer() {
Deck deck = (Deck) getEditorInput().getAdapter(Deck.class);
CardPool.instance().addObserver(this);
deckName.setText(deck.get(DeckConstants.FEATURE_NAME));
deckDesigner.setText(deck.get(DeckConstants.FEATURE_DESIGNER));
deckLegality.setText(deck.get(DeckConstants.FEATURE_TOURNAMENT_LEGALITY));
deckVersion.setText(deck.get(DeckConstants.FEATURE_VERSION));
if(!"".equals(deck.get(DeckConstants.FEATURE_VERSION)) && !bannerGroup.getExpanded())
bannerGroup.setExpanded(true);
deckDCI.setText(deck.get(DeckConstants.FEATURE_DCI));
if(!"".equals(deck.get(DeckConstants.FEATURE_DCI)) && !bannerGroup.getExpanded())
bannerGroup.setExpanded(true);
deckPlayer.setText(deck.get(DeckConstants.FEATURE_PLAYER));
if(!"".equals(deck.get(DeckConstants.FEATURE_PLAYER)) && !bannerGroup.getExpanded())
bannerGroup.setExpanded(true);
deckTournamentTitle.setText(deck.get(DeckConstants.FEATURE_TOURNAMENT_TITLE));
if(!"".equals(deck.get(DeckConstants.FEATURE_TOURNAMENT_TITLE)) && !bannerGroup.getExpanded())
bannerGroup.setExpanded(true);
deckTournamentType.setText(deck.get(DeckConstants.FEATURE_TOURNAMENT_TYPE));
if(!"".equals(deck.get(DeckConstants.FEATURE_TOURNAMENT_TYPE)) && !bannerGroup.getExpanded())
bannerGroup.setExpanded(true);
deckTournamentCity.setText(deck.get(DeckConstants.FEATURE_TOURNAMENT_CITY));
if(!"".equals(deck.get(DeckConstants.FEATURE_TOURNAMENT_CITY)) && !bannerGroup.getExpanded())
bannerGroup.setExpanded(true);
deckTournamentDate.setText(deck.get(DeckConstants.FEATURE_TOURNAMENT_DATE));
if(!"".equals(deck.get(DeckConstants.FEATURE_TOURNAMENT_DATE)) && !bannerGroup.getExpanded())
bannerGroup.setExpanded(true);
deckViewer.setInput(deck);
setDirty(false);