Link Eclipse file object with RTC one
Hello, I'm trying to find a way to map eclipse IFile resource with RTC IFileItem. Simply I want to receive from eclipse command selection a RTC IFileItem object. I was able to establish how to get IFile but it's not what I need. Currently implementation is following:
ISelection selection = HandlerUtil.getCurrentSelection(event);
if (selection instanceof IStructuredSelection) {
IStructuredSelection ssel = (IStructuredSelection) selection;
Object obj = ssel.getFirstElement();
IFile selectedFile = (IFile) Platform.getAdapterManager().getAdapter(obj, IFile.class);
if (selectedFile == null) {
if (obj instanceof IAdaptable) {
selectedFile = (IFile) ((IAdaptable) obj).getAdapter(IFile.class);
}
}
if (selectedFile != null) {
//do sth
}
}
Moreover is there a way to check file path relying on LoadRule? Let's say that I need to get path of particular file from one LoadRule in other LoadRule.
One answer
I found following topic:
https://jazz.net/forum/questions/241349/what-is-the-java-api-to-check-the-loaded-project-in-sandbox-belong-to-which-rtc-component
It seems that it could help, but I'm not able to found IShareable class in documentation, looks like it was deleted. But what is replacement for it?