Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2010 itemis AG ( and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at /
 package org.eclipse.xtext.ui.resource;
import  org.eclipse.core.resources.IResource;
import  org.eclipse.jdt.core.IPackageFragmentRoot;

Sven Efftinge - Initial contribution and API
public class JarEntryURIHelper {
	public static URI getUriForPackageFragmentRoot(IPackageFragmentRoot root) {
		IResource underlyingResource = root.getResource();
		if (underlyingResource == null) {
			return URI.createFileURI(root.getPath().toString());
else {
			return URI.createPlatformResourceURI(underlyingResource.getFullPath().toString(), true);
New to GrepCode? Check out our FAQ X