Created
October 24, 2012 15:48
-
-
Save rgarat/3946873 to your computer and use it in GitHub Desktop.
LinkDirInEclipse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IProject project = request.getProject(); | |
IFolder link = project.getFolder("assets"); | |
IPath location = new Path(assetsDir); | |
if (workspace.validateLinkLocation(link, location).isOK()) { | |
try { | |
link.createLink(location, IResource.NONE, null); | |
} catch (CoreException e) { | |
throw new RuntimeException(e); | |
} | |
} else { | |
// invalid location, throw an exception or warn user | |
System.out.println("LinkDir not valid"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment