From 6b347172449f9553694aa12c9229bc7643a504fb Mon Sep 17 00:00:00 2001 From: Steve Hickman Date: Fri, 22 Dec 2023 14:39:28 -0800 Subject: [PATCH] Updated DI - inject less / update RuntimeModule with injectable classes Also reorganize RuntimeModule to group all 'standard' (XText based) interfaces at the top of the file. --- .../com/epistimis/uddl/EntityProcessor.java | 3 -- .../epistimis/uddl/NavigationUtilities.java | 1 - .../com/epistimis/uddl/UddlRuntimeModule.java | 52 +++++++++++-------- 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/com.epistimis.uddl/src/com/epistimis/uddl/EntityProcessor.java b/com.epistimis.uddl/src/com/epistimis/uddl/EntityProcessor.java index bb5067c..ed33e49 100644 --- a/com.epistimis.uddl/src/com/epistimis/uddl/EntityProcessor.java +++ b/com.epistimis.uddl/src/com/epistimis/uddl/EntityProcessor.java @@ -56,9 +56,6 @@ public abstract class EntityProcessor bindIQualifiedNameProvider() { // TODO Auto-generated method stub return UddlQNP.class; } + + /** + * Enable this if there are performance issues with name resolution. And then + * look at the strategy to see what should be excluded from the index + */ + public Class bindIDefaultResourceDescriptionStrategy() { + return UddlResourceDescriptionStrategy.class; + } + +// // Enable imports by uncommenting this. The default is to import anything visible in a project +// // See section 3.3.1,3.3.2 of the Advanced XText Manual PDF +// // or https://blogs.itemis.com/en/in-five-minutes-to-transitive-imports-within-a-dsl-with-xtext +// @Override +// public +// Class bindIGlobalScopeProvider() { +// return UddlGlobalScopeProvider.class; +// } + + public Class bindIQualifiedNameConverter() { + return IQualifiedNameConverter.DefaultImpl.class; + } + /** * Inject this if you want the additional methods provided by this QNP * @return @@ -51,10 +73,10 @@ public Class bindIndexUtilities() { } - public Class bindIQualifiedNameConverter() { - return IQualifiedNameConverter.DefaultImpl.class; + public Class bindCLPExtractors() { + return CLPExtractors.class; } - + public Class bindConceptualQueryProcessor() { return ConceptualQueryProcessor.class; } @@ -65,29 +87,13 @@ public Class bindPlatformQueryProcessor() { return PlatformQueryProcessor.class; } - public Class bindCLPExtractors() { - return CLPExtractors.class; - } - + // ----------- Taxonomy processors public Class bindLogicalEnumeratedProcessor() { return LogicalEnumeratedProcessor.class; } - - /** - * Enable this if there are performance issues with name resolution. And then - * look at the strategy to see what should be excluded from the index - */ - public Class bindIDefaultResourceDescriptionStrategy() { - return UddlResourceDescriptionStrategy.class; + public Class bindTaxonomyBaseProcessor() { + return TaxonomyBaseProcessor.class; } - -// // Enable imports by uncommenting this. The default is to import anything visible in a project -// // See section 3.3.1,3.3.2 of the Advanced XText Manual PDF -// // or https://blogs.itemis.com/en/in-five-minutes-to-transitive-imports-within-a-dsl-with-xtext -// @Override -// public -// Class bindIGlobalScopeProvider() { -// return UddlGlobalScopeProvider.class; -// } + }