private boolean trySetTargetPlatform(URI targetFileURIToSet, SubMonitor subMonitor, WorkspaceFileTargetHandle fileHandle) throws CoreException {
File targetFile = ((WorkspaceFileTargetHandle) fileHandle).getTargetFile().getLocation().toFile();
URI targetFileURI = URI.createFileURI(targetFile.getAbsolutePath());
if (targetFileURI.equals(targetFileURIToSet)) {
ITargetDefinition targetDefinitionToSet = fileHandle.getTargetDefinition();
if (!targetDefinitionToSet.isResolved()) {
targetDefinitionToSet.resolve(subMonitor.newChild(80));
}
subMonitor.setWorkRemaining(0);
IStatus compare = service.get().compareWithTargetPlatform(targetDefinitionToSet);
if (compare != null && !compare.isOK()) {