	protected IGenPackageFinderResult findGenPackage(ConcreteSyntax syntax, String nsURI, final ResourceSet rs, URI genModelURI) {
		Resource genModelResource = null;
		try {
			genModelResource = rs.getResource(genModelURI, true);
		} catch (Exception e) {}
		EList<EObject> contents = null; 
		if (genModelResource != null) {
			contents = genModelResource.getContents();	
		}
		if (contents != null && contents.size() > 0) {
			GenModel genModel = (GenModel) contents.get(0);
			File ecoreFile = null;
			if (Platform.isRunning()) {
				boolean reloadEnabled = OptionManager.INSTANCE.getBooleanOptionValue(syntax, ICodeGenOptions.RELOAD_GENERATOR_MODEL);
				if (reloadEnabled) {
					genModel = reloadGeneratorModel(genModel);
				}
				List<GenFeature> allGenFeatures = genModel.getAllGenFeatures();
				for (GenFeature genFeature : allGenFeatures) {
					final Resource resource = genFeature.getEcoreFeature().eResource();
					if (resource == null) {
						continue;
					}
					URI uri = resource.getURI();
					if (uri == null) {
						continue;
					}
					IResource ecoreMember = ResourcesPlugin.getWorkspace().getRoot().findMember(uri.toPlatformString(true));
					ecoreFile = ecoreMember.getLocation().toFile();
					break;
				}
			}
			Map<String, GenPackage> packages =  MetamodelManager.getGenPackages(genModel);
			for (String uri : packages.keySet()) {
				if (uri == null) {
					continue;
				}
				if (uri.equals(nsURI)) {
					return new GenPackageInFileResult(packages.get(nsURI), ecoreFile);
				}
			}
		}
		return null;
	}

	protected IGenPackageFinderResult findGenPackage(ConcreteSyntax syntax, String nsURI, final ResourceSet rs, URI genModelURI) {
		Resource genModelResource = null;
		try {
			genModelResource = rs.getResource(genModelURI, true);
		} catch (Exception e) {}
		EList<EObject> contents = null; 
		if (genModelResource != null) {
			contents = genModelResource.getContents();	
		}
		if (contents != null && contents.size() > 0) {
			GenModel genModel = (GenModel) contents.get(0);
			File ecoreFile = null;
			if (Platform.isRunning()) {
				boolean reloadEnabled = OptionManager.INSTANCE.getBooleanOptionValue(syntax, ICodeGenOptions.RELOAD_GENERATOR_MODEL);
				if (reloadEnabled) {
					genModel = reloadGeneratorModel(genModel);
				}
				List<GenFeature> allGenFeatures = genModel.getAllGenFeatures();
				for (GenFeature genFeature : allGenFeatures) {
					final Resource resource = genFeature.getEcoreFeature().eResource();
					if (resource == null) {
						continue;
					}
					URI uri = resource.getURI();
					if (uri == null) {
						continue;
					}
					IResource ecoreMember = ResourcesPlugin.getWorkspace().getRoot().findMember(uri.toPlatformString(true));
					if (ecoreMember != null) {
						ecoreFile = ecoreMember.getLocation().toFile();
					}
					break;
				}
			}
			Map<String, GenPackage> packages =  MetamodelManager.getGenPackages(genModel);
			for (String uri : packages.keySet()) {
				if (uri == null) {
					continue;
				}
				if (uri.equals(nsURI)) {
					return new GenPackageInFileResult(packages.get(nsURI), ecoreFile);
				}
			}
		}
		return null;
	}
