Skip to content

Commit

Permalink
IPackageProvider - and UddlPackageProvider
Browse files Browse the repository at this point in the history
This provides the same packages as the AbstractValidator for the same
project - but it's public.
  • Loading branch information
steve-hickman-epistimis committed Jan 21, 2024
1 parent 1e1d1ba commit 4b9a225
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.epistimis.uddl.extension.ConceptualObservableExt;
import com.epistimis.uddl.extension.UddlElementExt;
import com.epistimis.uddl.scoping.IndexUtilities;
import com.epistimis.uddl.scoping.UddlPackageProvider;
//import com.epistimis.uddl.scoping.UddlGlobalScopeProvider;
import com.epistimis.uddl.scoping.UddlResourceDescriptionStrategy;

Expand Down Expand Up @@ -139,4 +140,10 @@ public Class<? extends com.epistimis.uddl.extension.ConceptualEntityExt> bindCon
return ConceptualEntityExt.class;
}

// -------- Other providers --------------------------------
public Class<? extends com.epistimis.uddl.scoping.IPackageProvider> bindIPackageProvider() {
return UddlPackageProvider.class;
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
*
*/
package com.epistimis.uddl.scoping;

import java.util.List;

import org.eclipse.emf.ecore.EPackage;

/**
* Provides the same EPackage access that Validators do - except this is public instead of protected
*/
public interface IPackageProvider {


List<EPackage> getEPackages() ;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
*
*/
package com.epistimis.uddl.scoping;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.emf.ecore.EPackage;

/**
* Provides the same EPackage access that Validators do - except this is public instead of protected
*/
public class UddlPackageProvider implements IPackageProvider {

@Override
public List<EPackage> getEPackages() {
List<EPackage> result = new ArrayList<EPackage>();
result.add(com.epistimis.uddl.uddl.UddlPackage.eINSTANCE);
return result;
}

}

0 comments on commit 4b9a225

Please sign in to comment.