private IPath getPath(Element element) throws IOException { String pathString= element.getAttribute("path"); //$NON-NLS-1$ if (pathString.length() == 0) throw new IOException(JarPackagerMessages.JarPackageReader_error_tagPathNotFound); return Path.fromPortableString(element.getAttribute("path")); //$NON-NLS-1$ }
private IPath getPath(Element element) throws IOException { String pathString= element.getAttribute("path"); //$NON-NLS-1$ if (pathString.length() == 0) throw new IOException(JarPackagerMessages.JarPackageReader_error_tagPathNotFound); return Path.fromPortableString(element.getAttribute("path")); //$NON-NLS-1$ }
private static IPath decodePath(String str) { if ("#".equals(str)) { //$NON-NLS-1$ return null; } else if ("&".equals(str)) { //$NON-NLS-1$ return Path.EMPTY; } else { return Path.fromPortableString(decode(str)); } }
static private IPath convertToProperCase(IPath path) { if (Platform.getOS().equals(Platform.OS_WIN32)) return Path.fromPortableString(path.toPortableString().toLowerCase()); return path; }
private IPath loadPath() throws IOException { if (loadBoolean()) return null; String portableString = loadString(); IPath path = (IPath) this.allPaths.get(portableString); if (path == null) { path = Path.fromPortableString(portableString); this.allPaths.put(portableString, path); } return path; }
private IPath loadPath() throws IOException { if (loadBoolean()) return null; String portableString = loadString(); IPath path = (IPath) this.allPaths.get(portableString); if (path == null) { path = Path.fromPortableString(portableString); this.allPaths.put(portableString, path); } return path; }
static private IPath convertToProperCase(IPath path) { if (Platform.getOS().equals(Platform.OS_WIN32)) return Path.fromPortableString(path.toPortableString().toLowerCase()); return path; }
@Override public IPath getFullPath() { try { return Path.fromPortableString(URIUtil.fromString(script.getUrl()).getPath()); } catch (URISyntaxException e) { throw new RuntimeException(e); } }
public URI resolveVariable(String variable) { LinkedList<String> variableStack = new LinkedList<>(); String value = resolveVariable(variable, variableStack); if (value != null) { try { return URI.create(value); } catch (IllegalArgumentException e) { return URIUtil.toURI(Path.fromPortableString(value)); } } return null; }
static private IPath convertToProperCase(IPath path) { if (Platform.getOS().equals(Platform.OS_WIN32)) return Path.fromPortableString(path.toPortableString().toLowerCase()); return path; }
private IPath convertToProperCase(IPath path) { if (Platform.getOS().equals(Platform.OS_WIN32)) return Path.fromPortableString(path.toPortableString() .toLowerCase()); return path; }
@Override public StandardSREInstall clone() { final StandardSREInstall clone = (StandardSREInstall) super.clone(); clone.jarFile = this.jarFile == null ? null : Path.fromPortableString(clone.jarFile.toPortableString()); return clone; }
@Override public void configure(ProjectConfigurationRequest request, IProgressMonitor monitor) throws CoreException { ConfigurationHelper.convertToLaunchpadProject(request.getProject(), Path.fromPortableString("src/main/provisioning")); } }
private Repository getRepositoryForPath(String containerPath) { IPath path = Path.fromPortableString(containerPath); IContainer mappedContainer = ResourcesPlugin.getWorkspace().getRoot() .getContainerForLocation(path); GitProjectData projectData = GitProjectData.get((IProject) mappedContainer); if (projectData == null) return null; RepositoryMapping mapping = projectData.getRepositoryMapping(mappedContainer); if (mapping != null) return mapping.getRepository(); return null; }
private URI getXpandAdviceFileFromWorkspace(String xpandAdvice) { URI xpandAdviceFileURI = null; IResource resource = EcorePlugin.getWorkspaceRoot().findMember(Path.fromPortableString(xpandAdvice)); if (resource != null && resource.exists()) { xpandAdviceFileURI = URI.createURI(resource.getLocationURI().toString()); } return xpandAdviceFileURI; }
@Override public void deleteConfigurationItem(String path) throws Exception, ReadOnlyConfigurationException { // Obtain the file IFile file = this.project.getFile(Path.fromPortableString(path)); // Do nothing if file not exists if (!(file.exists())) { return; } // Delete the file file.delete(true, this.monitor); }
private String createFileName() { String suggestedFileName = getCommit() != null ? CreatePatchOperation .suggestFileName(getCommit()) : getRepository().getWorkTree() .getName().concat(".patch"); //$NON-NLS-1$ String path = getDialogSettings().get(PATH_KEY); if (path != null) return Path.fromPortableString(path).append(suggestedFileName).toOSString(); return (new File(System.getProperty("user.dir", ""), suggestedFileName)).getPath(); //$NON-NLS-1$ //$NON-NLS-2$ }
private Image getWorkingSetImage() { if (workingSetImage == null) { URL iconUrl = FileLocator.find(WorkbenchNavigatorPlugin.getDefault().getBundle(), Path.fromPortableString("icons/full/obj16/otherprojects_workingsets.png"), //$NON-NLS-1$ Collections.emptyMap()); workingSetImage = ImageDescriptor.createFromURL(iconUrl).createImage(); } return workingSetImage; }
private void xmlReadManifest(JarPackageData jarPackage, Element element) throws java.io.IOException { if (element.getNodeName().equals("manifest")) { //$NON-NLS-1$ jarPackage.setManifestVersion(element.getAttribute("manifestVersion")); //$NON-NLS-1$ jarPackage.setUsesManifest(getBooleanAttribute(element, "usesManifest")); //$NON-NLS-1$ jarPackage.setReuseManifest(getBooleanAttribute(element, "reuseManifest")); //$NON-NLS-1$ jarPackage.setSaveManifest(getBooleanAttribute(element,"saveManifest")); //$NON-NLS-1$ jarPackage.setGenerateManifest(getBooleanAttribute(element, "generateManifest")); //$NON-NLS-1$ jarPackage.setManifestLocation(Path.fromPortableString(element.getAttribute("manifestLocation"))); //$NON-NLS-1$ jarPackage.setManifestMainClass(getMainClass(element)); xmlReadSealingInfo(jarPackage, element); } }
private void xmlReadManifest(JarPackageData jarPackage, Element element) throws java.io.IOException { if (element.getNodeName().equals("manifest")) { //$NON-NLS-1$ jarPackage.setManifestVersion(element.getAttribute("manifestVersion")); //$NON-NLS-1$ jarPackage.setUsesManifest(getBooleanAttribute(element, "usesManifest")); //$NON-NLS-1$ jarPackage.setReuseManifest(getBooleanAttribute(element, "reuseManifest")); //$NON-NLS-1$ jarPackage.setSaveManifest(getBooleanAttribute(element,"saveManifest")); //$NON-NLS-1$ jarPackage.setGenerateManifest(getBooleanAttribute(element, "generateManifest")); //$NON-NLS-1$ jarPackage.setManifestLocation(Path.fromPortableString(element.getAttribute("manifestLocation"))); //$NON-NLS-1$ jarPackage.setManifestMainClass(getMainClass(element)); xmlReadSealingInfo(jarPackage, element); } }