@Override IPath buildChildPath(IPath parent, String key) { IPath nextPath = Path.EMPTY.append(parent); nextPath.setDevice(key); return nextPath; }
@Override IPath buildChildPath(IPath parent, String key) { IPath nextPath = Path.EMPTY.append(parent); nextPath.setDevice(key); return nextPath; }
@Override public IPath computePath(File source) { IPath result = new Path(source.getAbsolutePath()); IPath rootPath = new Path(root.getAbsolutePath()); result = result.removeFirstSegments(rootPath.matchingFirstSegments(result)); return result.setDevice(null); }
public IPath computePath(File source) { IPath sourcePath = new Path(source.getAbsolutePath()); sourcePath = sourcePath.removeFirstSegments(Math.max(0, sourcePath.segmentCount() - segmentsToKeep)); return sourcePath.setDevice(null); }
public IPath computePath(File source) { String prefix = filesMap.get(source); IPath result = null; if (prefix.startsWith(PROVIDED_PATH)) { // the desired path is provided in the map result = new Path(prefix.substring(10)); } else { //else the map contains a prefix which must be stripped from the path result = new Path(source.getAbsolutePath()); IPath rootPath = new Path(prefix); result = result.removeFirstSegments(rootPath.matchingFirstSegments(result)); } return result.setDevice(null); }
public IPath computePath(File source) { IPath result = new Path(source.getAbsolutePath()); IPath rootPath = new Path(root.getAbsolutePath()); result = result.removeFirstSegments(rootPath.matchingFirstSegments(result)); return result.setDevice(null); }
public IPath computePath(File source) { IPath result = new Path(source.getAbsolutePath()); IPath rootPath = new Path(root.getAbsolutePath()); result = result.removeFirstSegments(rootPath.matchingFirstSegments(result)); return result.setDevice(null); }
public IPath computePath(File source) { IPath result = new Path(source.getAbsolutePath()); IPath rootPath = new Path(root.getAbsolutePath()); result = result.removeFirstSegments(rootPath.matchingFirstSegments(result)); return result.setDevice(null); }
public IPath computePath(File source) { IPath sourcePath = new Path(source.getAbsolutePath()); sourcePath = sourcePath.removeFirstSegments(Math.max(0, sourcePath.segmentCount() - segmentsToKeep)); return sourcePath.setDevice(null); }
@Override public IPath computePath(File source) { IPath sourcePath = new Path(source.getAbsolutePath()); sourcePath = sourcePath.removeFirstSegments(Math.max(0, sourcePath.segmentCount() - segmentsToKeep)); return sourcePath.setDevice(null); }
public LocalSite(IPath path) { if (path.getDevice() != null) fPath = path.setDevice(path.getDevice().toUpperCase(Locale.ENGLISH)); else fPath = path; fPlugins = new ArrayList<>(); }
public IPath computePath(File source) { IPath sourcePath = new Path(source.getAbsolutePath()); sourcePath = sourcePath.removeFirstSegments(Math.max(0, sourcePath.segmentCount() - segmentsToKeep)); return sourcePath.setDevice(null); }
private IPath fixDevice(IPath path) { if (path != null && path.getDevice() != null) { return path.setDevice(path.getDevice().toUpperCase()); } if (Platform.OS_WIN32.equals(Platform.getOS()) && path != null && path.toString().startsWith("//")) { String server = path.segment(0); String pathStr = path.toString().replace(server, server.toUpperCase()); return new Path(pathStr); } return path; }
public LocalSite(IPath path) { if (path.getDevice() != null) fPath = path.setDevice(path.getDevice().toUpperCase(Locale.ENGLISH)); else fPath = path; fPlugins = new ArrayList(); }
public IPath getPathExtension() { return new Path(getText()).removeFirstSegments(1).setDevice(null); }
public IPath getPathExtension() { return new Path(getText()).removeFirstSegments(1).setDevice(null); }
public String[] getRelativePluginList() { String[] list = new String[fPlugins.size()]; for (int i = 0; i < fPlugins.size(); i++) { IPluginModelBase model = fPlugins.get(i); IPath location = new Path(model.getInstallLocation()); // defect 37319 if (location.segmentCount() > 2) location = location.removeFirstSegments(location.segmentCount() - 2); //31489 - entry must be relative list[i] = location.setDevice(null).makeRelative().toString(); } return list; } }
static public IResource findWorkspaceResource(IPath path) { IWorkspaceRoot ws = ResourcesPlugin.getWorkspace().getRoot(); IPath wsPath = ws.getLocation(); if (wsPath.isPrefixOf(path)) { path = path.removeFirstSegments(wsPath.segmentCount()); path = path.setDevice(null); } return ws.findMember(path); }
public void load(BundleDescription description, PDEState state) { IPath path = new Path(description.getLocation()); String device = path.getDevice(); if (device != null) path = path.setDevice(device.toUpperCase()); setInstallLocation(path.toOSString()); fLocalization = state.getBundleLocalization(description.getBundleId()); super.load(description, state); }
@Override public void load(BundleDescription description, PDEState state) { IPath path = new Path(description.getLocation()); String device = path.getDevice(); if (device != null) path = path.setDevice(device.toUpperCase()); setInstallLocation(path.toOSString()); fLocalization = state.getBundleLocalization(description.getBundleId()); super.load(description, state); }