@Override public File getFile(String path, boolean nativeCode) { return bundleFile.getFile(path, nativeCode); }
@Override public File getFile(String path, boolean nativeCode) { return bundleFile.getFile(path, nativeCode); }
@Override public File getFile(String path, boolean nativeCode) { return bundleFile.getFile(path, nativeCode); }
@Override public File getFile(String path, boolean nativeCode) { return bundleFile.getFile(path, nativeCode); }
@Override public File getFile(String path, boolean nativeCode) { return bundleFile.getFile(path, nativeCode); }
@Override public File getFile(String path, boolean nativeCode) { return bundleFile.getFile(path, nativeCode); }
private String findNativePath(List<String> nativePaths, String libname) { int slash = libname.lastIndexOf('/'); if (slash >= 0) libname = libname.substring(slash + 1); for (String nativePath : nativePaths) { slash = nativePath.lastIndexOf('/'); String path = slash < 0 ? nativePath : nativePath.substring(slash + 1); if (path.equals(libname)) { if (nativePath.startsWith(NativeCodeFinder.EXTERNAL_LIB_PREFIX)) { // references an external library; do variable substitution String externalPath = generation.getBundleInfo().getStorage().getConfiguration().substituteVars(nativePath.substring(NativeCodeFinder.EXTERNAL_LIB_PREFIX.length())); File nativeFile = new File(externalPath); return nativeFile.getAbsolutePath(); } // this is a normal library contained within the bundle File nativeFile = generation.getBundleFile().getFile(nativePath, true); if (nativeFile != null) return nativeFile.getAbsolutePath(); } } return null; }
private String findNativePath(List<String> nativePaths, String libname) { int slash = libname.lastIndexOf('/'); if (slash >= 0) libname = libname.substring(slash + 1); for (String nativePath : nativePaths) { slash = nativePath.lastIndexOf('/'); String path = slash < 0 ? nativePath : nativePath.substring(slash + 1); if (path.equals(libname)) { if (nativePath.startsWith(NativeCodeFinder.EXTERNAL_LIB_PREFIX)) { // references an external library; do variable substitution String externalPath = generation.getBundleInfo().getStorage().getConfiguration().substituteVars(nativePath.substring(NativeCodeFinder.EXTERNAL_LIB_PREFIX.length())); File nativeFile = new File(externalPath); return nativeFile.getAbsolutePath(); } // this is a normal library contained within the bundle File nativeFile = generation.getBundleFile().getFile(nativePath, true); if (nativeFile != null) return nativeFile.getAbsolutePath(); } } return null; }
private String findNativePath(List<String> nativePaths, String libname) { int slash = libname.lastIndexOf('/'); if (slash >= 0) libname = libname.substring(slash + 1); for (String nativePath : nativePaths) { slash = nativePath.lastIndexOf('/'); String path = slash < 0 ? nativePath : nativePath.substring(slash + 1); if (path.equals(libname)) { if (nativePath.startsWith(NativeCodeFinder.EXTERNAL_LIB_PREFIX)) { // references an external library; do variable substitution String externalPath = generation.getBundleInfo().getStorage().getConfiguration().substituteVars(nativePath.substring(NativeCodeFinder.EXTERNAL_LIB_PREFIX.length())); File nativeFile = new File(externalPath); return nativeFile.getAbsolutePath(); } // this is a normal library contained within the bundle File nativeFile = generation.getBundleFile().getFile(nativePath, true); if (nativeFile != null) return nativeFile.getAbsolutePath(); } } return null; }
private String findNativePath(List<String> nativePaths, String libname) { int slash = libname.lastIndexOf('/'); if (slash >= 0) libname = libname.substring(slash + 1); for (String nativePath : nativePaths) { slash = nativePath.lastIndexOf('/'); String path = slash < 0 ? nativePath : nativePath.substring(slash + 1); if (path.equals(libname)) { if (nativePath.startsWith(NativeCodeFinder.EXTERNAL_LIB_PREFIX)) { // references an external library; do variable substitution String externalPath = generation.getBundleInfo().getStorage().getConfiguration().substituteVars(nativePath.substring(NativeCodeFinder.EXTERNAL_LIB_PREFIX.length())); File nativeFile = new File(externalPath); return nativeFile.getAbsolutePath(); } // this is a normal library contained within the bundle File nativeFile = generation.getBundleFile().getFile(nativePath, true); if (nativeFile != null) return nativeFile.getAbsolutePath(); } } return null; }
results.add(((Generation) revision.getRevisionInfo()).getBundleFile().getBaseFile()); } else { File result = ((Generation) revision.getRevisionInfo()).getBundleFile().getFile(path, false); if (result != null) results.add(result);
private String searchEclipseVariants(String path) { List<String> ECLIPSE_LIB_VARIANTS = generation.getBundleInfo().getStorage().getConfiguration().ECLIPSE_LIB_VARIANTS; for (String variant : ECLIPSE_LIB_VARIANTS) { BundleFile baseBundleFile = generation.getBundleFile(); BundleEntry libEntry = baseBundleFile.getEntry(variant + path); if (libEntry != null) { File libFile = baseBundleFile.getFile(variant + path, true); if (libFile == null) return null; // see bug 88697 - HP requires libraries to have executable permissions if (org.eclipse.osgi.service.environment.Constants.OS_HPUX.equals(generation.getBundleInfo().getStorage().getConfiguration().getOS())) { try { // use the string array method in case there is a space in the path Runtime.getRuntime().exec(new String[] {"chmod", "755", libFile.getAbsolutePath()}).waitFor(); //$NON-NLS-1$ //$NON-NLS-2$ } catch (Exception e) { e.printStackTrace(); } } return libFile.getAbsolutePath(); } } return null; }
private String searchEclipseVariants(String path) { List<String> ECLIPSE_LIB_VARIANTS = generation.getBundleInfo().getStorage().getConfiguration().ECLIPSE_LIB_VARIANTS; for (String variant : ECLIPSE_LIB_VARIANTS) { BundleFile baseBundleFile = generation.getBundleFile(); BundleEntry libEntry = baseBundleFile.getEntry(variant + path); if (libEntry != null) { File libFile = baseBundleFile.getFile(variant + path, true); if (libFile == null) return null; // see bug 88697 - HP requires libraries to have executable permissions if (org.eclipse.osgi.service.environment.Constants.OS_HPUX.equals(generation.getBundleInfo().getStorage().getConfiguration().getOS())) { try { // use the string array method in case there is a space in the path Runtime.getRuntime().exec(new String[] {"chmod", "755", libFile.getAbsolutePath()}).waitFor(); //$NON-NLS-1$ //$NON-NLS-2$ } catch (Exception e) { e.printStackTrace(); } } return libFile.getAbsolutePath(); } } return null; }
private String searchEclipseVariants(String path) { List<String> ECLIPSE_LIB_VARIANTS = generation.getBundleInfo().getStorage().getConfiguration().ECLIPSE_LIB_VARIANTS; for (String variant : ECLIPSE_LIB_VARIANTS) { BundleFile baseBundleFile = generation.getBundleFile(); BundleEntry libEntry = baseBundleFile.getEntry(variant + path); if (libEntry != null) { File libFile = baseBundleFile.getFile(variant + path, true); if (libFile == null) return null; // see bug 88697 - HP requires libraries to have executable permissions if (org.eclipse.osgi.service.environment.Constants.OS_HPUX.equals(generation.getBundleInfo().getStorage().getConfiguration().getOS())) { try { // use the string array method in case there is a space in the path Runtime.getRuntime().exec(new String[] {"chmod", "755", libFile.getAbsolutePath()}).waitFor(); //$NON-NLS-1$ //$NON-NLS-2$ } catch (Exception e) { e.printStackTrace(); } } return libFile.getAbsolutePath(); } } return null; }
/** * Creates a new ClasspathEntry object for the requested classpath if the source exists. * @param cp the requested classpath. * @param cpGeneration the source generation to search for the classpath * @return a new ClasspathEntry for the requested classpath or null if the source does not exist. */ public ClasspathEntry getClasspath(String cp, Generation cpGeneration) { BundleFile bundlefile = null; File file; BundleEntry cpEntry = cpGeneration.getBundleFile().getEntry(cp); // check for internal library directories in a bundle jar file if (cpEntry != null && cpEntry.getName().endsWith("/")) //$NON-NLS-1$ bundlefile = createBundleFile(cp, cpGeneration); // check for internal library jars else if ((file = cpGeneration.getBundleFile().getFile(cp, false)) != null) bundlefile = createBundleFile(file, cpGeneration); if (bundlefile != null) return createClassPathEntry(bundlefile, cpGeneration); return null; }
/** * Creates a new ClasspathEntry object for the requested classpath if the source exists. * @param cp the requested classpath. * @param cpGeneration the source generation to search for the classpath * @return a new ClasspathEntry for the requested classpath or null if the source does not exist. */ public ClasspathEntry getClasspath(String cp, Generation cpGeneration) { BundleFile bundlefile = null; File file; BundleEntry cpEntry = cpGeneration.getBundleFile().getEntry(cp); // check for internal library directories in a bundle jar file if (cpEntry != null && cpEntry.getName().endsWith("/")) //$NON-NLS-1$ bundlefile = createBundleFile(cp, cpGeneration); // check for internal library jars else if ((file = cpGeneration.getBundleFile().getFile(cp, false)) != null) bundlefile = createBundleFile(file, cpGeneration); if (bundlefile != null) return createClassPathEntry(bundlefile, cpGeneration); return null; }
/** * Creates a new ClasspathEntry object for the requested classpath if the source exists. * @param cp the requested classpath. * @param cpGeneration the source generation to search for the classpath * @return a new ClasspathEntry for the requested classpath or null if the source does not exist. */ public ClasspathEntry getClasspath(String cp, Generation cpGeneration) { BundleFile bundlefile = null; File file; BundleEntry cpEntry = cpGeneration.getBundleFile().getEntry(cp); // check for internal library directories in a bundle jar file if (cpEntry != null && cpEntry.getName().endsWith("/")) //$NON-NLS-1$ bundlefile = createBundleFile(cp, cpGeneration); // check for internal library jars else if ((file = cpGeneration.getBundleFile().getFile(cp, false)) != null) bundlefile = createBundleFile(file, cpGeneration); if (bundlefile != null) return createClassPathEntry(bundlefile, cpGeneration); return null; }
/** * Creates a new ClasspathEntry object for the requested classpath if the source exists. * @param cp the requested classpath. * @param cpGeneration the source generation to search for the classpath * @return a new ClasspathEntry for the requested classpath or null if the source does not exist. */ public ClasspathEntry getClasspath(String cp, Generation cpGeneration) { BundleFile bundlefile = null; File file; BundleEntry cpEntry = cpGeneration.getBundleFile().getEntry(cp); // check for internal library directories in a bundle jar file if (cpEntry != null && cpEntry.getName().endsWith("/")) //$NON-NLS-1$ bundlefile = createBundleFile(cp, cpGeneration); // check for internal library jars else if ((file = cpGeneration.getBundleFile().getFile(cp, false)) != null) bundlefile = createBundleFile(file, cpGeneration); if (bundlefile != null) return createClassPathEntry(bundlefile, cpGeneration); return null; }
/** * Creates a new ClasspathEntry object for the requested classpath if the source exists. * @param cp the requested classpath. * @param cpGeneration the source generation to search for the classpath * @return a new ClasspathEntry for the requested classpath or null if the source does not exist. */ public ClasspathEntry getClasspath(String cp, Generation cpGeneration) { BundleFile bundlefile = null; File file; BundleEntry cpEntry = cpGeneration.getBundleFile().getEntry(cp); // check for internal library directories in a bundle jar file if (cpEntry != null && cpEntry.getName().endsWith("/")) //$NON-NLS-1$ bundlefile = createBundleFile(cp, cpGeneration); // check for internal library jars else if ((file = cpGeneration.getBundleFile().getFile(cp, false)) != null) bundlefile = createBundleFile(file, cpGeneration); if (bundlefile != null) return createClassPathEntry(bundlefile, cpGeneration); return null; }
/** * Creates a new ClasspathEntry object for the requested classpath if the source exists. * @param cp the requested classpath. * @param cpGeneration the source generation to search for the classpath * @return a new ClasspathEntry for the requested classpath or null if the source does not exist. */ public ClasspathEntry getClasspath(String cp, Generation cpGeneration) { BundleFile bundlefile = null; File file; BundleEntry cpEntry = cpGeneration.getBundleFile().getEntry(cp); // check for internal library directories in a bundle jar file if (cpEntry != null && cpEntry.getName().endsWith("/")) //$NON-NLS-1$ bundlefile = createBundleFile(cp, cpGeneration); // check for internal library jars else if ((file = cpGeneration.getBundleFile().getFile(cp, false)) != null) bundlefile = createBundleFile(file, cpGeneration); if (bundlefile != null) return createClassPathEntry(bundlefile, cpGeneration); return null; }