本文整理匯總了Java中org.eclipse.emf.ecore.resource.ResourceSet.getURIConverter方法的典型用法代碼示例。如果您正苦於以下問題:Java ResourceSet.getURIConverter方法的具體用法?Java ResourceSet.getURIConverter怎麽用?Java ResourceSet.getURIConverter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.emf.ecore.resource.ResourceSet
的用法示例。
在下文中一共展示了ResourceSet.getURIConverter方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: provides
import org.eclipse.emf.ecore.resource.ResourceSet; //導入方法依賴的package包/類
@Override
public boolean provides(ResourceSet set) {
final boolean res;
if (set != null && set.getURIConverter() != null) {
URIConverter converter = set.getURIConverter();
if (converter.getURIHandlers().size() > 0) {
res = converter.getURIHandlers().get(0) instanceof DebugURIHandler;
} else {
res = false;
}
} else {
res = false;
}
return res;
}
示例2: registerScheme
import org.eclipse.emf.ecore.resource.ResourceSet; //導入方法依賴的package包/類
/**
* Configure the resourceSet such that it understands the n4js scheme. Use the given classLoader to lookup the
* resources.
*
* @param classLoader
* the classLoader to use.
*/
public void registerScheme(ResourceSet resourceSet, @SuppressWarnings("hiding") ClassLoader classLoader) {
// tell EMF to resolve a classpath URI which actually has not been a classpath URI (but a SCHEME/n4js
// URI):
URIConverter converter = resourceSet.getURIConverter();
if (registerScheme(converter, classLoader)) {
ExecutionEnvironmentDescriptor descriptor = new ExecutionEnvironmentDescriptor(resourceSet, classLoader);
register(resourceSet, descriptor);
}
}