From 33b9237e81058d1c69f2d8fe254c8f6c2c549099 Mon Sep 17 00:00:00 2001 From: veronie Date: Sun, 31 Jan 2021 18:31:13 +0100 Subject: [PATCH 1/2] Using a card layout to manage which filter is displayed. --- xyz.veronie.bgg.ui/META-INF/MANIFEST.MF | 1 + .../bgg/ui/filters/BggUserSourceFilter.java | 41 ---- ...java => BggUserSourceFilterComposite.java} | 34 ++- ....java => FamilySourceFilterComposite.java} | 6 +- ...ava => GeeklistSourceFilterComposite.java} | 6 +- .../xyz/veronie/bgg/ui/parts/FetchPart.java | 197 ++++++++++-------- 6 files changed, 134 insertions(+), 151 deletions(-) delete mode 100644 xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/BggUserSourceFilter.java rename xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/{composites/BggUserSourceComposite.java => BggUserSourceFilterComposite.java} (88%) rename xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/{FamilySourceFilter.java => FamilySourceFilterComposite.java} (94%) rename xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/{GeeklistSourceFilter.java => GeeklistSourceFilterComposite.java} (93%) diff --git a/xyz.veronie.bgg.ui/META-INF/MANIFEST.MF b/xyz.veronie.bgg.ui/META-INF/MANIFEST.MF index 2987afd..38494a4 100644 --- a/xyz.veronie.bgg.ui/META-INF/MANIFEST.MF +++ b/xyz.veronie.bgg.ui/META-INF/MANIFEST.MF @@ -21,6 +21,7 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: javax.annotation;version="1.0.0";resolution:=optional, javax.inject;version="1.0.0", org.eclipse.e4.core.commands, + org.eclipse.e4.core.contexts;version="1.7.0", org.eclipse.e4.ui.model.application.descriptor.basic, org.eclipse.e4.ui.model.application.ui.basic Automatic-Module-Name: de.wt.secondtry diff --git a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/BggUserSourceFilter.java b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/BggUserSourceFilter.java deleted file mode 100644 index 50fd5d8..0000000 --- a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/BggUserSourceFilter.java +++ /dev/null @@ -1,41 +0,0 @@ -package xyz.veronie.bgg.ui.filters; - -import javax.inject.Inject; - -import org.eclipse.e4.core.di.annotations.Creatable; -import org.eclipse.e4.core.services.events.IEventBroker; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; - -import xyz.veronie.bgg.result.ResultConfigManager; -import xyz.veronie.bgg.ui.filters.composites.BggUserSourceComposite; -import xyz.veronie.bgg.ui.helpers.BatLayouts; - - -/// 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 -/// (i.e. owned, previously owned, wishlist, etc.) -@Creatable -public class BggUserSourceFilter { - - @Inject private IEventBroker eventBroker; - @Inject private ResultConfigManager configManager; - - public void create(Composite parent, int style) { - - Composite mainCompo = new Composite(parent, SWT.FILL); - GridLayout gl_mainCompo = new GridLayout(5, false); - BatLayouts.applyZeroSpacing(gl_mainCompo); - mainCompo.setLayout(gl_mainCompo); - mainCompo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - - new BggUserSourceComposite(mainCompo, SWT.NONE, eventBroker, configManager); - - mainCompo.pack(); - parent.pack(); - parent.layout(true, true); - } - -} diff --git a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/composites/BggUserSourceComposite.java b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/BggUserSourceFilterComposite.java similarity index 88% rename from xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/composites/BggUserSourceComposite.java rename to xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/BggUserSourceFilterComposite.java index c1e6438..f11860d 100644 --- a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/composites/BggUserSourceComposite.java +++ b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/BggUserSourceFilterComposite.java @@ -1,8 +1,11 @@ -package xyz.veronie.bgg.ui.filters.composites; +package xyz.veronie.bgg.ui.filters; import java.util.ArrayList; import java.util.List; +import javax.annotation.PostConstruct; +import javax.inject.Inject; + import org.eclipse.e4.core.services.events.IEventBroker; import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.ComboViewer; @@ -23,22 +26,15 @@ import xyz.veronie.bgg.result.ResultConfigManager; import xyz.veronie.bgg.types.EventConstants; import xyz.veronie.bgg.types.Subtype; import xyz.veronie.bgg.types.UserFlag; +import xyz.veronie.bgg.ui.filters.composites.FilterFlagComposite; -public class BggUserSourceComposite extends Composite { +public class BggUserSourceFilterComposite { - private IEventBroker eventBroker; - - /** - * Create the composite. - * @param parent - * @param style - */ - public BggUserSourceComposite(Composite parent, int style, - IEventBroker eventBroker, ResultConfigManager configManager) - { - super(parent, style); - this.eventBroker = eventBroker; - + @Inject private IEventBroker eventBroker; + @Inject private ResultConfigManager configManager; + + @PostConstruct + public void postConstruct(Composite parent) { Composite main = new Composite(parent, SWT.FILL); main.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); main.setLayout(new GridLayout(1, false)); @@ -108,7 +104,8 @@ public class BggUserSourceComposite extends Composite { new FilterFlagComposite(centerComposite, UserFlag.RATED, configManager, eventBroker); new FilterFlagComposite(centerComposite, UserFlag.COMMENT, configManager, eventBroker); - this.pack(); + parent.pack(); + parent.layout(true, true); } @@ -128,9 +125,4 @@ public class BggUserSourceComposite extends Composite { return subtypes; } - - @Override - protected void checkSubclass() { - // Disable the check that prevents subclassing of SWT components - } } diff --git a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/FamilySourceFilter.java b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/FamilySourceFilterComposite.java similarity index 94% rename from xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/FamilySourceFilter.java rename to xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/FamilySourceFilterComposite.java index 1880b02..db3839d 100644 --- a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/FamilySourceFilter.java +++ b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/FamilySourceFilterComposite.java @@ -3,6 +3,7 @@ package xyz.veronie.bgg.ui.filters; import java.util.ArrayList; import java.util.List; +import javax.annotation.PostConstruct; import javax.inject.Inject; import org.eclipse.e4.core.di.annotations.Creatable; @@ -34,14 +35,15 @@ import xyz.veronie.bgg.ui.helpers.BatLayouts; /// These are the controls to retrieve thing IDs for a given family ID @Creatable -public class FamilySourceFilter { +public class FamilySourceFilterComposite { @Inject private IEventBroker eventBroker; @Inject private ResultConfigManager configManager; private StyledText confLabel; private Combo cbFamilyId; - public void create(Composite parent, int style) { + @PostConstruct + public void postConstruct(Composite parent) { Composite mainCompo = new Composite(parent, SWT.FILL); GridLayout gl_mainCompo = new GridLayout(2, false); BatLayouts.applyZeroSpacing(gl_mainCompo); diff --git a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/GeeklistSourceFilter.java b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/GeeklistSourceFilterComposite.java similarity index 93% rename from xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/GeeklistSourceFilter.java rename to xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/GeeklistSourceFilterComposite.java index 9a5b01d..f991931 100644 --- a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/GeeklistSourceFilter.java +++ b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/GeeklistSourceFilterComposite.java @@ -1,5 +1,6 @@ package xyz.veronie.bgg.ui.filters; +import javax.annotation.PostConstruct; import javax.inject.Inject; import org.eclipse.e4.core.di.annotations.Creatable; @@ -24,7 +25,7 @@ import xyz.veronie.bgg.ui.helpers.BatLayouts; /// These are the controls to retrieve thing IDs for a given family ID @Creatable -public class GeeklistSourceFilter { +public class GeeklistSourceFilterComposite { @Inject private IEventBroker eventBroker; @Inject private ResultConfigManager configManager; @@ -32,7 +33,8 @@ public class GeeklistSourceFilter { private StyledText confLabel; private Combo cbGeeklistId; - public void create(Composite parent, int style) { + @PostConstruct + public void postConstruct(Composite parent) { Composite mainCompo = new Composite(parent, SWT.FILL); GridLayout gl_mainCompo = new GridLayout(2, false); BatLayouts.applyZeroSpacing(gl_mainCompo); diff --git a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/parts/FetchPart.java b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/parts/FetchPart.java index 5b798c3..7205410 100644 --- a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/parts/FetchPart.java +++ b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/parts/FetchPart.java @@ -7,6 +7,9 @@ import java.util.List; import javax.annotation.PostConstruct; import javax.inject.Inject; +import org.eclipse.e4.core.contexts.ContextInjectionFactory; +import org.eclipse.e4.core.contexts.EclipseContextFactory; +import org.eclipse.e4.core.contexts.IEclipseContext; import org.eclipse.e4.core.services.events.IEventBroker; import org.eclipse.e4.ui.model.application.MApplication; import org.eclipse.e4.ui.model.application.ui.basic.MPart; @@ -15,13 +18,15 @@ import org.eclipse.e4.ui.workbench.modeling.EPartService; import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.StackLayout; import org.eclipse.swt.events.MouseAdapter; import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; import org.eclipse.wb.swt.ResourceManager; import org.eclipse.wb.swt.SWTResourceManager; @@ -33,9 +38,9 @@ import xyz.veronie.bgg.result.ThingProvider; import xyz.veronie.bgg.types.EventConstants; import xyz.veronie.bgg.types.ResultAction; import xyz.veronie.bgg.types.SourceFilter; -import xyz.veronie.bgg.ui.filters.BggUserSourceFilter; -import xyz.veronie.bgg.ui.filters.FamilySourceFilter; -import xyz.veronie.bgg.ui.filters.GeeklistSourceFilter; +import xyz.veronie.bgg.ui.filters.BggUserSourceFilterComposite; +import xyz.veronie.bgg.ui.filters.FamilySourceFilterComposite; +import xyz.veronie.bgg.ui.filters.GeeklistSourceFilterComposite; import xyz.veronie.bgg.ui.helpers.BatColors; import xyz.veronie.bgg.ui.helpers.BatLayouts; @@ -44,14 +49,12 @@ public class FetchPart { @Inject private ResultConfigManager configManager; - // inject all source filter composites - @Inject private BggUserSourceFilter bggUserSourceFilter; - @Inject private GeeklistSourceFilter geeklistSourceFilter; - @Inject private FamilySourceFilter familySourceFilter; - @Inject private IEventBroker eventBroker; + @Inject + private IEclipseContext context; + @Inject private MApplication application; @@ -74,6 +77,16 @@ public class FetchPart { private Composite main; private Composite filterComposite; + private Composite userFilterPage; + + private Composite familyPage; + + private StackLayout filterLayout; + + private Composite geeklistPage; + + private Composite centerComposite; + @Inject public FetchPart() { @@ -106,47 +119,26 @@ public class FetchPart { btnGeeklist = new Button(buttonRow, SWT.NONE); btnGeeklist.setImage(ResourceManager.getPluginImage("xyz.veronie.bgg.ui", "icons/noun_List_60x60.png")); - - - btnBggUser.addMouseListener(new MouseAdapter() { - @Override - public void mouseUp(MouseEvent e) { - selectFilter(SourceFilter.BGG_USER); - } - }); - btnFamily.addMouseListener(new MouseAdapter() { - @Override - public void mouseUp(MouseEvent e) { - selectFilter(SourceFilter.FAMILY); - } - }); - - btnGeeklist.addMouseListener(new MouseAdapter() { - @Override - public void mouseUp(MouseEvent e) { - selectFilter(SourceFilter.GEEKLIST); - } - }); - - Composite centerComposite = new Composite(main, SWT.NONE); - centerComposite.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, true, 1, 1)); + centerComposite = new Composite(main, SWT.NONE); + centerComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); GridLayout gl_centerComposite = new GridLayout(1, false); BatLayouts.applyStandardSpacing(gl_centerComposite); centerComposite.setLayout(gl_centerComposite); + + createFilterComposites(centerComposite); - filterComposite = new Composite(centerComposite, SWT.NONE); - filterComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND)); - filterComposite.setBackgroundMode(SWT.INHERIT_FORCE); - filterComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); - GridLayout gl_filterComposite = new GridLayout(1, false); - BatLayouts.applyStandardSpacing(gl_filterComposite); - filterComposite.setLayout(gl_filterComposite); + // init filter using config manager + SourceFilter source = configManager.getResultConfig().source; + selectSource(source); - + createApplyToResultRow(); + } + + private void createApplyToResultRow() { Composite applyComposite = new Composite(main, SWT.NONE); GridLayout gl_applyComposite = new GridLayout(5, false); BatLayouts.applyStandardSpacing(gl_applyComposite); @@ -202,75 +194,110 @@ public class FetchPart { fetchEntries(ResultAction.SUBTRACT); } }); - - // init filter using config manager - SourceFilter source = configManager.getResultConfig().source; - selectFilter(source); - showFilter(filterComposite, source); - - } - private void selectFilter(SourceFilter source) { - configManager.getResultConfig().source = source; + private void createFilterComposites(Composite parent) { + + filterComposite = new Composite(parent, SWT.NONE); + filterComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND)); + filterComposite.setBackgroundMode(SWT.INHERIT_FORCE); + filterLayout = new StackLayout(); + filterComposite.setLayout(filterLayout); + filterComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + userFilterPage = new Composite(filterComposite, SWT.FILL); + GridLayout gl_userFilter = new GridLayout(2, false); + BatLayouts.applyZeroSpacing(gl_userFilter); + userFilterPage.setLayout(gl_userFilter); + userFilterPage.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + IEclipseContext userFilterCtx = EclipseContextFactory.create(); + userFilterCtx.set(Composite.class, userFilterPage); // parent + ContextInjectionFactory.make(BggUserSourceFilterComposite.class, context, userFilterCtx); + btnBggUser.addSelectionListener(new SelectionListener() { + @Override + public void widgetSelected(SelectionEvent e) { + selectSource(SourceFilter.BGG_USER); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) {} + + }); + + + + familyPage = new Composite(filterComposite, SWT.FILL); + GridLayout gl_familyFilter = new GridLayout(2, false); + BatLayouts.applyZeroSpacing(gl_familyFilter); + familyPage.setLayout(gl_familyFilter); + familyPage.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + IEclipseContext familyFilterCtx = EclipseContextFactory.create(); + familyFilterCtx.set(Composite.class, familyPage); // parent + ContextInjectionFactory.make(FamilySourceFilterComposite.class, context, familyFilterCtx);; + btnFamily.addSelectionListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + selectSource(SourceFilter.FAMILY); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) {} + + }); + + + geeklistPage = new Composite(filterComposite, SWT.FILL); + GridLayout gl_geeklistFilter = new GridLayout(2, false); + BatLayouts.applyZeroSpacing(gl_geeklistFilter); + geeklistPage.setLayout(gl_geeklistFilter); + geeklistPage.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + IEclipseContext geeklistFilterCtx = EclipseContextFactory.create(); + geeklistFilterCtx.set(Composite.class, geeklistPage); // parent + ContextInjectionFactory.make(GeeklistSourceFilterComposite.class, context, geeklistFilterCtx); + btnGeeklist.addSelectionListener(new SelectionListener() { + + @Override + public void widgetSelected(SelectionEvent e) { + selectSource(SourceFilter.GEEKLIST); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) {} + + }); + } + + private void selectSource(SourceFilter source) { switch(source) { - default: case BGG_USER: - btnBggUser.setFocus(); + filterLayout.topControl = userFilterPage; btnBggUser.setBackground(BatColors.getButtonBgColor()); btnFamily.setBackground(null); btnGeeklist.setBackground(null); break; case FAMILY: - btnFamily.setFocus(); + filterLayout.topControl = familyPage; btnBggUser.setBackground(null); btnFamily.setBackground(BatColors.getButtonBgColor()); btnGeeklist.setBackground(null); break; case GEEKLIST: - btnGeeklist.setFocus(); + filterLayout.topControl = geeklistPage; btnBggUser.setBackground(null); btnFamily.setBackground(null); btnGeeklist.setBackground(BatColors.getButtonBgColor()); break; } - showFilter(filterComposite, source); + + filterComposite.pack(); + centerComposite.layout(true,true); eventBroker.send(EventConstants.TOPIC_SOURCE_CHANGED, source); } - - - /// show different filter controls depending on selection in cbSource ComboViewer - private void showFilter(Composite parent, SourceFilter source) { - // clean up - for(Control child : parent.getChildren()) { - child.dispose(); - } - - // create a new filter area based on selection: - switch(source) { - default: - case BGG_USER: - System.out.println("construct " + source); - bggUserSourceFilter.create(parent, SWT.FILL); - break; - case GEEKLIST: - System.out.println("construct " + source); - geeklistSourceFilter.create(parent, SWT.FILL); - break; - case FAMILY: - System.out.println("construct " + source); - familySourceFilter.create(parent, SWT.FILL); - break; - } - main.pack(); - main.layout(true, true); - } - - private void fetchEntries(ResultAction action) { Object fetchId = getFetchId(); if(fetchId == null) return; From 47d47e40ad7487d45a3b610696b3814713f1f008 Mon Sep 17 00:00:00 2001 From: veronie Date: Sun, 31 Jan 2021 18:35:42 +0100 Subject: [PATCH 2/2] Renamed Filter classes. They aren't Composites themselves. --- ...FilterComposite.java => BggUserSourceFilter.java} | 2 +- ...eFilterComposite.java => FamilySourceFilter.java} | 2 +- ...ilterComposite.java => GeeklistSourceFilter.java} | 2 +- .../src/xyz/veronie/bgg/ui/parts/FetchPart.java | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) rename xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/{BggUserSourceFilterComposite.java => BggUserSourceFilter.java} (96%) rename xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/{FamilySourceFilterComposite.java => FamilySourceFilter.java} (96%) rename xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/{GeeklistSourceFilterComposite.java => GeeklistSourceFilter.java} (96%) diff --git a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/BggUserSourceFilterComposite.java b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/BggUserSourceFilter.java similarity index 96% rename from xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/BggUserSourceFilterComposite.java rename to xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/BggUserSourceFilter.java index f11860d..6ec3f55 100644 --- a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/BggUserSourceFilterComposite.java +++ b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/BggUserSourceFilter.java @@ -28,7 +28,7 @@ import xyz.veronie.bgg.types.Subtype; import xyz.veronie.bgg.types.UserFlag; import xyz.veronie.bgg.ui.filters.composites.FilterFlagComposite; -public class BggUserSourceFilterComposite { +public class BggUserSourceFilter { @Inject private IEventBroker eventBroker; @Inject private ResultConfigManager configManager; diff --git a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/FamilySourceFilterComposite.java b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/FamilySourceFilter.java similarity index 96% rename from xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/FamilySourceFilterComposite.java rename to xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/FamilySourceFilter.java index db3839d..87d63d8 100644 --- a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/FamilySourceFilterComposite.java +++ b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/FamilySourceFilter.java @@ -35,7 +35,7 @@ import xyz.veronie.bgg.ui.helpers.BatLayouts; /// These are the controls to retrieve thing IDs for a given family ID @Creatable -public class FamilySourceFilterComposite { +public class FamilySourceFilter { @Inject private IEventBroker eventBroker; @Inject private ResultConfigManager configManager; diff --git a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/GeeklistSourceFilterComposite.java b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/GeeklistSourceFilter.java similarity index 96% rename from xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/GeeklistSourceFilterComposite.java rename to xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/GeeklistSourceFilter.java index f991931..ea66648 100644 --- a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/GeeklistSourceFilterComposite.java +++ b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/filters/GeeklistSourceFilter.java @@ -25,7 +25,7 @@ import xyz.veronie.bgg.ui.helpers.BatLayouts; /// These are the controls to retrieve thing IDs for a given family ID @Creatable -public class GeeklistSourceFilterComposite { +public class GeeklistSourceFilter { @Inject private IEventBroker eventBroker; @Inject private ResultConfigManager configManager; diff --git a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/parts/FetchPart.java b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/parts/FetchPart.java index 7205410..04c9cb4 100644 --- a/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/parts/FetchPart.java +++ b/xyz.veronie.bgg.ui/src/xyz/veronie/bgg/ui/parts/FetchPart.java @@ -38,9 +38,9 @@ import xyz.veronie.bgg.result.ThingProvider; import xyz.veronie.bgg.types.EventConstants; import xyz.veronie.bgg.types.ResultAction; import xyz.veronie.bgg.types.SourceFilter; -import xyz.veronie.bgg.ui.filters.BggUserSourceFilterComposite; -import xyz.veronie.bgg.ui.filters.FamilySourceFilterComposite; -import xyz.veronie.bgg.ui.filters.GeeklistSourceFilterComposite; +import xyz.veronie.bgg.ui.filters.BggUserSourceFilter; +import xyz.veronie.bgg.ui.filters.FamilySourceFilter; +import xyz.veronie.bgg.ui.filters.GeeklistSourceFilter; import xyz.veronie.bgg.ui.helpers.BatColors; import xyz.veronie.bgg.ui.helpers.BatLayouts; @@ -213,7 +213,7 @@ public class FetchPart { userFilterPage.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); IEclipseContext userFilterCtx = EclipseContextFactory.create(); userFilterCtx.set(Composite.class, userFilterPage); // parent - ContextInjectionFactory.make(BggUserSourceFilterComposite.class, context, userFilterCtx); + ContextInjectionFactory.make(BggUserSourceFilter.class, context, userFilterCtx); btnBggUser.addSelectionListener(new SelectionListener() { @Override @@ -235,7 +235,7 @@ public class FetchPart { familyPage.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); IEclipseContext familyFilterCtx = EclipseContextFactory.create(); familyFilterCtx.set(Composite.class, familyPage); // parent - ContextInjectionFactory.make(FamilySourceFilterComposite.class, context, familyFilterCtx);; + ContextInjectionFactory.make(FamilySourceFilter.class, context, familyFilterCtx);; btnFamily.addSelectionListener(new SelectionListener() { @Override @@ -256,7 +256,7 @@ public class FetchPart { geeklistPage.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); IEclipseContext geeklistFilterCtx = EclipseContextFactory.create(); geeklistFilterCtx.set(Composite.class, geeklistPage); // parent - ContextInjectionFactory.make(GeeklistSourceFilterComposite.class, context, geeklistFilterCtx); + ContextInjectionFactory.make(GeeklistSourceFilter.class, context, geeklistFilterCtx); btnGeeklist.addSelectionListener(new SelectionListener() { @Override