Converting EMF Resource to Platform Resource (IFile)

Posted at 2014/02/18 08:02 // in Programming // by Daniel

Converting EMF Resource to Platform Resource (IFile)
Simple one:

EObject eObject = ...;
Resource eResource = eObject.eResource();
URI eUri = eResource.getURI();
if (eUri.isPlatformResource()) {
String platformString = eUri.toPlatformString(true);
return ResourcesPlugin.getWorkspace().getRoot().findMember(platformString);
}
return null;

http://blog.eclipse-tips.com/2008/03/converting-emf-resource-to-platform.html

active project 얻기
http://wiki.eclipse.org/FAQ_How_do_I_access_the_active_project%3F

크리에이티브 커먼즈 라이센스
Creative Commons License