retrieval. Trying to use the event broker, no luck...pull/1/head
@@ -12,6 +12,9 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.17.0", | |||||
org.eclipse.e4.ui.di;bundle-version="1.2.700", | org.eclipse.e4.ui.di;bundle-version="1.2.700", | ||||
org.eclipse.e4.core.di.extensions;bundle-version="0.15.400", | org.eclipse.e4.core.di.extensions;bundle-version="0.15.400", | ||||
javax.annotation;bundle-version="1.2.0", | javax.annotation;bundle-version="1.2.0", | ||||
org.eclipse.jface;bundle-version="3.18.0" | org.eclipse.jface;bundle-version="3.18.0", | ||||
org.eclipse.e4.core.services;bundle-version="2.2.100", | |||||
org.eclipse.osgi.services;bundle-version="3.8.0", | |||||
javax.inject;bundle-version="1.0.0" | |||||
Import-Package: org.eclipse.e4.ui.model.application.descriptor.basic, | Import-Package: org.eclipse.e4.ui.model.application.descriptor.basic, | ||||
org.eclipse.e4.ui.model.application.ui.basic | org.eclipse.e4.ui.model.application.ui.basic |
@@ -1,6 +1,6 @@ | |||||
package xyz.veronie.bgg.data; | package xyz.veronie.bgg.data; | ||||
/// This class contains and handles the result table for initial BGG result | /// This class contains and handles the result table for BGG things | ||||
public class BggResult { | public class BggResult { | ||||
} | } |
@@ -0,0 +1,17 @@ | |||||
package xyz.veronie.bgg.data; | |||||
public interface EventConstants { | |||||
String TOPIC_CONFIG_CHANGED = "CONFIG_CHANGED/*"; | |||||
String TOPIC_FILTER_CHANGED = "CONFIG_CHANGED/FILTER"; | |||||
String TOPIC_SUBTYPE_CHANGED = "CONFIG_CHANGED/SUBTYPE"; | |||||
String TOPIC_USERFLAG_CHANGED = "CONFIG_CHANGED/USERFLAG"; | |||||
String TOPIC_ACTION_CHANGED = "CONFIG_CHANGED/ACTION"; | |||||
String TOPIC_USER_CHANGED = "CONFIG_CHANGED/USER"; | |||||
} |
@@ -0,0 +1,15 @@ | |||||
package xyz.veronie.bgg.data; | |||||
public enum FilterFlagState { | |||||
IS(0), ISNOT(1), IGNORE(2); | |||||
private int state; | |||||
private FilterFlagState(int state) { | |||||
this.state = state; | |||||
} | |||||
public int get() { | |||||
return this.state; | |||||
} | |||||
} |
@@ -1,4 +1,4 @@ | |||||
package xyz.veronie.bgg.ui.contributions; | package xyz.veronie.bgg.data; | ||||
public enum ResultAction { | public enum ResultAction { | ||||
ADD("add"), | ADD("add"), |
@@ -0,0 +1,20 @@ | |||||
package xyz.veronie.bgg.data; | |||||
import java.util.HashMap; | |||||
/// DTO / container for configuration of result download | |||||
public class ResultConfig { | |||||
// TODO: integrate different filters (or extend?) | |||||
public HashMap<Subtype,Boolean> subTypes; | |||||
public ResultAction action; | |||||
public SourceFilter source; | |||||
public String user; | |||||
public HashMap<UserFlag, FilterFlagState> userFlags; | |||||
public Integer geeklistId; | |||||
public Integer familyId; | |||||
// TODO: add others | |||||
} |
@@ -0,0 +1,59 @@ | |||||
package xyz.veronie.bgg.data; | |||||
import javax.inject.Inject; | |||||
import org.eclipse.e4.core.di.annotations.Optional; | |||||
import org.eclipse.e4.ui.di.UIEventTopic; | |||||
public class ResultConfigManager { | |||||
private ResultConfig resultConfig = new ResultConfig(); | |||||
@Inject | |||||
@Optional | |||||
private void subscribeTopicSourceFilterChanged | |||||
(@UIEventTopic(EventConstants.TOPIC_FILTER_CHANGED) | |||||
SourceFilter source) { | |||||
getResultConfig().source = source; | |||||
} | |||||
@Inject | |||||
@Optional | |||||
private void subscribeTopicSubtypesChanged | |||||
(@UIEventTopic(EventConstants.TOPIC_SUBTYPE_CHANGED) | |||||
Subtype subtype, Boolean checked) { | |||||
getResultConfig().subTypes.put(subtype, checked); | |||||
} | |||||
@Inject | |||||
@Optional | |||||
private void subscribeTopicUserChanged | |||||
(@UIEventTopic(EventConstants.TOPIC_USER_CHANGED) | |||||
String user) { | |||||
System.out.println("set user to '" + user + "'"); | |||||
getResultConfig().user = user; | |||||
} | |||||
@Inject | |||||
@Optional | |||||
private void subscribeTopicUserFlagChanged | |||||
(@UIEventTopic(EventConstants.TOPIC_USERFLAG_CHANGED) | |||||
UserFlag flag, FilterFlagState state) { | |||||
getResultConfig().userFlags.put(flag, state); | |||||
} | |||||
@Inject | |||||
@Optional | |||||
private void subscribeTopicResultActionChanged | |||||
(@UIEventTopic(EventConstants.TOPIC_ACTION_CHANGED) | |||||
ResultAction action) { | |||||
getResultConfig().action = action; | |||||
} | |||||
public ResultConfig getResultConfig() { | |||||
return resultConfig; | |||||
} | |||||
} |
@@ -1,4 +1,4 @@ | |||||
package xyz.veronie.bgg.ui.contributions; | package xyz.veronie.bgg.data; | ||||
public enum SourceFilter { | public enum SourceFilter { | ||||
@@ -1,4 +1,4 @@ | |||||
package xyz.veronie.bgg.ui.contributions; | package xyz.veronie.bgg.data; | ||||
public enum Subtype { | public enum Subtype { | ||||
BOARDGAME("Board games", "boardgame"), | BOARDGAME("Board games", "boardgame"), |
@@ -0,0 +1,24 @@ | |||||
package xyz.veronie.bgg.data; | |||||
public enum UserFlag { | |||||
OWN("owned"), | |||||
PREVIOUSLY_OWNED("previously owned"), | |||||
FOR_TRADE("for trade"), | |||||
WANTED("wanted"), | |||||
WTP("want to play"), | |||||
WTB("want to buy"), | |||||
WISHLIST("on wishlist"), | |||||
PREORDERED("preordered"); | |||||
private String flag; | |||||
private UserFlag(String flag) { | |||||
this.flag = flag; | |||||
} | |||||
@Override | |||||
public String toString() { | |||||
return this.flag; | |||||
} | |||||
} |
@@ -1,6 +0,0 @@ | |||||
package xyz.veronie.bgg.ui.contributions; | |||||
/// this represents a result of bgg "things" | |||||
public class BggResult { | |||||
} |
@@ -1,30 +0,0 @@ | |||||
package xyz.veronie.bgg.ui.contributions; | |||||
/// container for configuration of result download | |||||
public class ResultConfig { | |||||
// TODO: integrate different filters (or extend?) | |||||
private SourceFilter source; | |||||
private Subtype subpage; | |||||
private ResultAction action; | |||||
public SourceFilter getSource() { | |||||
return source; | |||||
} | |||||
public void setSource(SourceFilter source) { | |||||
this.source = source; | |||||
} | |||||
public Subtype getSubpage() { | |||||
return subpage; | |||||
} | |||||
public void setSubpage(Subtype subpage) { | |||||
this.subpage = subpage; | |||||
} | |||||
public ResultAction getAction() { | |||||
return action; | |||||
} | |||||
public void setAction(ResultAction action) { | |||||
this.action = action; | |||||
} | |||||
} |
@@ -1,4 +1,4 @@ | |||||
package xyz.veronie.bgg.ui.contributions; | package xyz.veronie.bgg.ui.filters; | ||||
import org.eclipse.swt.SWT; | import org.eclipse.swt.SWT; | ||||
import org.eclipse.swt.layout.GridData; | import org.eclipse.swt.layout.GridData; |
@@ -1,7 +1,10 @@ | |||||
package xyz.veronie.bgg.ui.contributions; | package xyz.veronie.bgg.ui.filters; | ||||
import java.util.HashMap; | import java.util.HashMap; | ||||
import javax.inject.Inject; | |||||
import org.eclipse.e4.core.services.events.IEventBroker; | |||||
import org.eclipse.swt.SWT; | import org.eclipse.swt.SWT; | ||||
import org.eclipse.swt.events.FocusEvent; | import org.eclipse.swt.events.FocusEvent; | ||||
import org.eclipse.swt.events.FocusListener; | import org.eclipse.swt.events.FocusListener; | ||||
@@ -14,65 +17,36 @@ import org.eclipse.swt.widgets.Combo; | |||||
import org.eclipse.swt.widgets.Composite; | import org.eclipse.swt.widgets.Composite; | ||||
import org.eclipse.swt.widgets.Label; | import org.eclipse.swt.widgets.Label; | ||||
import xyz.veronie.bgg.data.EventConstants; | |||||
import xyz.veronie.bgg.data.FilterFlagState; | |||||
import xyz.veronie.bgg.data.UserFlag; | |||||
enum FilterState { | |||||
IS(0), ISNOT(1), IGNORE(2); | |||||
private int state; | |||||
private FilterState(int state) { | |||||
this.state = state; | |||||
} | |||||
public int get() { | |||||
return this.state; | |||||
} | |||||
} | |||||
enum UserFlag { | |||||
OWN("owned"), | |||||
PREVIOUSLY_OWNED("previously owned"), | |||||
FOR_TRADE("for trade"), | |||||
WANTED("wanted"), | |||||
WTP("want to play"), | |||||
WTB("want to buy"), | |||||
WISHLIST("on wishlist"), | |||||
PREORDERED("preordered"); | |||||
private String flag; | |||||
private UserFlag(String flag) { | |||||
this.flag = flag; | |||||
} | |||||
@Override | |||||
public String toString() { | |||||
return this.flag; | |||||
} | |||||
} | |||||
/// These are the controls to retrieve thing IDs for a given BGG user | /// These are the controls to retrieve thing IDs for a given BGG user | ||||
/// Filters can be set for the state of the thing in the user's collection | /// Filters can be set for the state of the thing in the user's collection | ||||
/// (i.e. owned, previously owned, wishlist, etc.) | /// (i.e. owned, previously owned, wishlist, etc.) | ||||
public class BggUserSourceFilter { | public class BggUserSourceFilter { | ||||
// TODO: have to protect this static because threading? | |||||
private static String user = ""; | |||||
private static HashMap<UserFlag, FilterState> flags = new HashMap<UserFlag, FilterState>() { | @Inject | ||||
private IEventBroker eventBroker; | |||||
private HashMap<UserFlag, FilterFlagState> flags = new HashMap<UserFlag, FilterFlagState>() { | |||||
private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
{ | { | ||||
put(UserFlag.OWN, FilterState.IS); | put(UserFlag.OWN, FilterFlagState.IS); | ||||
put(UserFlag.PREVIOUSLY_OWNED, FilterState.ISNOT); | put(UserFlag.PREVIOUSLY_OWNED, FilterFlagState.ISNOT); | ||||
put(UserFlag.FOR_TRADE, FilterState.IGNORE); | put(UserFlag.FOR_TRADE, FilterFlagState.IGNORE); | ||||
put(UserFlag.WANTED, FilterState.IGNORE); | put(UserFlag.WANTED, FilterFlagState.IGNORE); | ||||
put(UserFlag.WTP, FilterState.IGNORE); | put(UserFlag.WTP, FilterFlagState.IGNORE); | ||||
put(UserFlag.WTB, FilterState.IGNORE); | put(UserFlag.WTB, FilterFlagState.IGNORE); | ||||
put(UserFlag.WISHLIST, FilterState.IGNORE); | put(UserFlag.WISHLIST, FilterFlagState.IGNORE); | ||||
put(UserFlag.PREORDERED, FilterState.IGNORE); | put(UserFlag.PREORDERED, FilterFlagState.IGNORE); | ||||
}}; | }}; | ||||
public static void create(Composite parent, int style) { | public void create(Composite parent, int style) { | ||||
GridLayout filterLayout = new GridLayout(4, false); | GridLayout filterLayout = new GridLayout(4, false); | ||||
parent.setLayout(filterLayout); | parent.setLayout(filterLayout); | ||||
@@ -86,7 +60,6 @@ public class BggUserSourceFilter { | |||||
cbUserName.addSelectionListener(new SelectionAdapter() { | cbUserName.addSelectionListener(new SelectionAdapter() { | ||||
public void widgetDefaultSelected(SelectionEvent e) { | public void widgetDefaultSelected(SelectionEvent e) { | ||||
setUser(cbUserName.getText()); | setUser(cbUserName.getText()); | ||||
System.out.println("set user to '" + getUser() + "'"); | |||||
} | } | ||||
}); | }); | ||||
cbUserName.addFocusListener(new FocusListener() { | cbUserName.addFocusListener(new FocusListener() { | ||||
@@ -134,27 +107,26 @@ public class BggUserSourceFilter { | |||||
// Filters are tri-state: include iff has flag, include iff it does not have the flag, | // Filters are tri-state: include iff has flag, include iff it does not have the flag, | ||||
// don't care if it has that flag. | // don't care if it has that flag. | ||||
// TODO: create a three-way toggle button instead. | // TODO: create a three-way toggle button instead. | ||||
private static void makeFilter(Composite parent, UserFlag key) { | private void makeFilter(Composite parent, UserFlag key) { | ||||
Combo filterCombo = new Combo(parent, SWT.READ_ONLY); | Combo filterCombo = new Combo(parent, SWT.READ_ONLY); | ||||
filterCombo.add("is"); | filterCombo.add("is"); | ||||
filterCombo.add("is not"); | filterCombo.add("is not"); | ||||
filterCombo.add("ignored"); | filterCombo.add("ignored"); | ||||
filterCombo.select(flags.get(key).get()); | filterCombo.select(flags.get(key).get()); | ||||
filterCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); | filterCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); | ||||
// TODO: add listener - send a CONFIG_CHANGED event when something changes | |||||
Label filterLabel = new Label(parent, SWT.LEFT); | Label filterLabel = new Label(parent, SWT.LEFT); | ||||
filterLabel.setText(key.toString()); | filterLabel.setText(key.toString()); | ||||
filterLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); | filterLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); | ||||
} | } | ||||
public void setUser(String user) { | |||||
public static String getUser() { | if(eventBroker != null) { | ||||
return user; | eventBroker.post(EventConstants.TOPIC_USER_CHANGED, user); | ||||
} | } else { | ||||
System.out.println("null???"); | |||||
} | |||||
public static void setUser(String user) { | |||||
BggUserSourceFilter.user = user; | |||||
} | } | ||||
} | } |
@@ -1,4 +1,4 @@ | |||||
package xyz.veronie.bgg.ui.contributions; | package xyz.veronie.bgg.ui.filters; | ||||
import org.eclipse.swt.SWT; | import org.eclipse.swt.SWT; | ||||
import org.eclipse.swt.events.FocusEvent; | import org.eclipse.swt.events.FocusEvent; |
@@ -1,4 +1,4 @@ | |||||
package xyz.veronie.bgg.ui.contributions; | package xyz.veronie.bgg.ui.filters; | ||||
import org.eclipse.swt.SWT; | import org.eclipse.swt.SWT; | ||||
import org.eclipse.swt.events.FocusEvent; | import org.eclipse.swt.events.FocusEvent; |
@@ -1,4 +1,4 @@ | |||||
package xyz.veronie.bgg.ui.contributions; | package xyz.veronie.bgg.ui.filters; | ||||
import org.eclipse.swt.SWT; | import org.eclipse.swt.SWT; | ||||
import org.eclipse.swt.layout.GridData; | import org.eclipse.swt.layout.GridData; |
@@ -1,4 +1,4 @@ | |||||
package xyz.veronie.bgg.ui.contributions; | package xyz.veronie.bgg.ui.filters; | ||||
import org.eclipse.swt.SWT; | import org.eclipse.swt.SWT; | ||||
import org.eclipse.swt.layout.GridData; | import org.eclipse.swt.layout.GridData; |
@@ -1,4 +1,4 @@ | |||||
package xyz.veronie.bgg.ui.contributions; | package xyz.veronie.bgg.ui.filters; | ||||
import java.util.HashMap; | import java.util.HashMap; | ||||
@@ -9,13 +9,15 @@ import org.eclipse.swt.widgets.Button; | |||||
import org.eclipse.swt.widgets.Composite; | import org.eclipse.swt.widgets.Composite; | ||||
import org.eclipse.swt.widgets.Group; | import org.eclipse.swt.widgets.Group; | ||||
import xyz.veronie.bgg.data.Subtype; | |||||
public class ThingFilterGroup { | public class ThingFilterGroup { | ||||
private HashMap<Subtype, Button> buttons; | private HashMap<Subtype, Button> buttons; | ||||
public void create(Composite parent) { | public void create(Composite parent) { | ||||
Group gSubtype = new Group(parent, SWT.LEFT); | Group gSubtype = new Group(parent, SWT.LEFT); | ||||
gSubtype.setText("Subtypes"); | gSubtype.setText("Subtypes"); | ||||
gSubtype.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, false, false)); | gSubtype.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); | ||||
gSubtype.setLayout(new GridLayout(1, false)); | gSubtype.setLayout(new GridLayout(1, false)); | ||||
buttons = new HashMap<Subtype, Button>(); | buttons = new HashMap<Subtype, Button>(); | ||||
@@ -23,13 +25,14 @@ public class ThingFilterGroup { | |||||
for (Subtype st : Subtype.values()) { | for (Subtype st : Subtype.values()) { | ||||
Button bb = new Button(gSubtype, SWT.CHECK); | Button bb = new Button(gSubtype, SWT.CHECK); | ||||
bb.setText(st.toString()); | bb.setText(st.toString()); | ||||
bb.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); | |||||
if(st == Subtype.BOARDGAME) { | if(st == Subtype.BOARDGAME) { | ||||
// initially, only boardgame is checked | // initially, only boardgame is checked | ||||
bb.setEnabled(true); | bb.setSelection(true); | ||||
} else { | } else { | ||||
bb.setEnabled(false); | bb.setSelection(false); | ||||
} | } | ||||
bb.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); | // TODO: add listener to buttons. Send event with checked subtypes when something changes. | ||||
buttons.put(st, bb); | buttons.put(st, bb); | ||||
} | } | ||||
} | } |
@@ -1,4 +1,4 @@ | |||||
package xyz.veronie.bgg.ui.contributions; | package xyz.veronie.bgg.ui.filters; | ||||
import org.eclipse.swt.SWT; | import org.eclipse.swt.SWT; | ||||
import org.eclipse.swt.layout.GridData; | import org.eclipse.swt.layout.GridData; |
@@ -8,11 +8,12 @@ import org.eclipse.swt.layout.GridData; | |||||
import org.eclipse.swt.widgets.Composite; | import org.eclipse.swt.widgets.Composite; | ||||
import org.eclipse.swt.widgets.Label; | import org.eclipse.swt.widgets.Label; | ||||
import xyz.veronie.bgg.data.ResultConfigManager; | |||||
public class BggResultPart { | public class BggResultPart { | ||||
@PostConstruct | @PostConstruct | ||||
public void createControls(Composite parent) { | public void createControls(Composite parent) { | ||||
Composite main = new Composite(parent, SWT.FILL); | Composite main = new Composite(parent, SWT.FILL); | ||||
Label lblTable = new Label(main, SWT.LEFT); | Label lblTable = new Label(main, SWT.LEFT); | ||||
@@ -24,17 +24,17 @@ import org.eclipse.swt.widgets.Display; | |||||
import org.eclipse.swt.widgets.Group; | import org.eclipse.swt.widgets.Group; | ||||
import org.eclipse.swt.widgets.Label; | import org.eclipse.swt.widgets.Label; | ||||
import xyz.veronie.bgg.ui.contributions.AgeSourceFilter; | import xyz.veronie.bgg.data.ResultAction; | ||||
import xyz.veronie.bgg.ui.contributions.BggUserSourceFilter; | import xyz.veronie.bgg.data.ResultConfigManager; | ||||
import xyz.veronie.bgg.ui.contributions.FamilySourceFilter; | import xyz.veronie.bgg.data.SourceFilter; | ||||
import xyz.veronie.bgg.ui.contributions.GeeklistSourceFilter; | import xyz.veronie.bgg.ui.filters.AgeSourceFilter; | ||||
import xyz.veronie.bgg.ui.contributions.RankSourceFilter; | import xyz.veronie.bgg.ui.filters.BggUserSourceFilter; | ||||
import xyz.veronie.bgg.ui.contributions.ResultAction; | import xyz.veronie.bgg.ui.filters.FamilySourceFilter; | ||||
import xyz.veronie.bgg.ui.contributions.SearchSourceFilter; | import xyz.veronie.bgg.ui.filters.GeeklistSourceFilter; | ||||
import xyz.veronie.bgg.ui.contributions.SourceFilter; | import xyz.veronie.bgg.ui.filters.RankSourceFilter; | ||||
import xyz.veronie.bgg.ui.contributions.Subtype; | import xyz.veronie.bgg.ui.filters.SearchSourceFilter; | ||||
import xyz.veronie.bgg.ui.contributions.ThingFilterGroup; | import xyz.veronie.bgg.ui.filters.ThingFilterGroup; | ||||
import xyz.veronie.bgg.ui.contributions.YearSourceFilter; | import xyz.veronie.bgg.ui.filters.YearSourceFilter; | ||||
@@ -42,11 +42,16 @@ import xyz.veronie.bgg.ui.contributions.YearSourceFilter; | |||||
/// There are different ways to configure which IDs to retrieve. | /// There are different ways to configure which IDs to retrieve. | ||||
public class LoadFromBggPart { | public class LoadFromBggPart { | ||||
// TODO: figure out how to make sure this is a singleton | |||||
private ResultConfigManager resultConfigManager; | |||||
LoadFromBggPart() { | |||||
resultConfigManager = new ResultConfigManager(); | |||||
} | |||||
@PostConstruct | @PostConstruct | ||||
public void createControls(Composite parent) { | public void createControls(Composite parent) { | ||||
Composite main = new Composite(parent, SWT.FILL); | Composite main = new Composite(parent, SWT.FILL); | ||||
main.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); | main.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); | ||||
@@ -82,6 +87,10 @@ public class LoadFromBggPart { | |||||
// choose the bgg sub-site | // choose the bgg sub-site | ||||
Label lblSubtype = new Label(dlConfigGroup, SWT.LEFT); | |||||
lblSubtype.setText("Subtypes: "); | |||||
lblSubtype.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, false, false)); | |||||
ThingFilterGroup gSubtypes = new ThingFilterGroup(); | ThingFilterGroup gSubtypes = new ThingFilterGroup(); | ||||
gSubtypes.create(dlConfigGroup); | gSubtypes.create(dlConfigGroup); | ||||
@@ -143,11 +152,12 @@ public class LoadFromBggPart { | |||||
if(selection.size() == 0) return; | if(selection.size() == 0) return; | ||||
if(selection.getFirstElement() == SourceFilter.BGG_USER) { | if(selection.getFirstElement() == SourceFilter.BGG_USER) { | ||||
if(BggUserSourceFilter.getUser().isEmpty()) { | String user = resultConfigManager.getResultConfig().user; | ||||
if(user == null || user.isEmpty()) { | |||||
System.out.println("Please enter a user name."); | System.out.println("Please enter a user name."); | ||||
return; | return; | ||||
} | } | ||||
System.out.println("...for user '" + BggUserSourceFilter.getUser() + "'"); | System.out.println("...for user '" + user + "'"); | ||||
} else if(selection.getFirstElement() == SourceFilter.GEEKLIST) { | } else if(selection.getFirstElement() == SourceFilter.GEEKLIST) { | ||||
System.out.println("...for geeklist id '" + GeeklistSourceFilter.getGeeklistId() + "'"); | System.out.println("...for geeklist id '" + GeeklistSourceFilter.getGeeklistId() + "'"); | ||||
} else if(selection.getFirstElement() == SourceFilter.FAMILY) { | } else if(selection.getFirstElement() == SourceFilter.FAMILY) { | ||||
@@ -156,8 +166,6 @@ public class LoadFromBggPart { | |||||
} | } | ||||
}); | }); | ||||
btDownload.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, false, false)); | btDownload.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, false, false)); | ||||
main.pack(); | main.pack(); | ||||
@@ -177,7 +185,8 @@ public class LoadFromBggPart { | |||||
switch(elem) { | switch(elem) { | ||||
case BGG_USER: | case BGG_USER: | ||||
System.out.println("construct " + elem); | System.out.println("construct " + elem); | ||||
BggUserSourceFilter.create(parent, SWT.FILL); | BggUserSourceFilter f = new BggUserSourceFilter(); | ||||
f.create(parent, SWT.FILL); | |||||
break; | break; | ||||
case GEEKLIST: | case GEEKLIST: | ||||
System.out.println("construct " + elem); | System.out.println("construct " + elem); | ||||