/** * @see org.eclipse.jdt.launching.IVMInstallType#getDefaultLibraryLocations(java.io.File) */ @Override public LibraryLocation[] getDefaultLibraryLocations(File installLocation) { IPath libPath = getDefaultSystemLibrary(installLocation); File lib = libPath.toFile(); if (lib.exists()) { return new LibraryLocation[] {new LibraryLocation(libPath, getDefaultSystemLibrarySource(lib), getDefaultPackageRootPath())}; } return new LibraryLocation[0]; }
/** * @see org.eclipse.jdt.launching.IVMInstallType#getDefaultLibraryLocations(java.io.File) */ @Override public LibraryLocation[] getDefaultLibraryLocations(File installLocation) { IPath libPath = getDefaultSystemLibrary(installLocation); File lib = libPath.toFile(); if (lib.exists()) { return new LibraryLocation[] {new LibraryLocation(libPath, getDefaultSystemLibrarySource(lib), getDefaultPackageRootPath())}; } return new LibraryLocation[0]; }
/** * Constructs a system library from the given execution environment * description file. * * @param baseline owning baseline * @param fileName the file name that corresponds to the stub file for the * corresponding profile * @param profileName the given profile name * @exception CoreException if unable to read the execution environment * description file */ private StubApiComponent(IApiBaseline baseline, String fileName, String profileName) { super(baseline); IPath path = new Path(fileName); fLibraries = new LibraryLocation[] { new LibraryLocation(path, null, null) }; fExecEnv = new String[] { profileName }; fVersion = fExecEnv[0]; setName(fExecEnv[0]); fLocation = path.toOSString(); }
return new LibraryLocation(new Path(jreJar), new Path(jreSrc), new Path(pkgRoot), javadocURL, indexURL , externalAnns == null ? null : new Path(externalAnns));
return new LibraryLocation(new Path(jreJar), new Path(jreSrc), new Path(pkgRoot), javadocURL, indexURL , externalAnns == null ? null : new Path(externalAnns));
LibraryLocation library = new LibraryLocation(libPath, sourcePath, packageRoot, javadocLocation, indexLocation); libraries.add(library); } catch (IOException e) {
LibraryLocation library = new LibraryLocation(libPath, sourcePath, packageRoot, javadocLocation, indexLocation); libraries.add(library); } catch (IOException e) {
/** * Returns an equivalent library location. * * @return library location */ LibraryLocation toLibraryLocation() { return new LibraryLocation(getSystemLibraryPath(), getSystemLibrarySourcePath(), getPackageRootPath(), getJavadocLocation()); }
File lib = path.toFile(); if (lib.exists() && lib.isFile()) { LibraryLocation libraryLocation = new LibraryLocation(path, getDefaultSystemLibrarySource(lib), getDefaultPackageRootPath(),
LibraryLocation libraryLocation = new LibraryLocation(pathName, sourceRootPath, getDefaultPackageRootPath(), getDefaultJavadocLocation(installLocation)); File lib = path.toFile(); if (lib.exists() && lib.isFile()) { LibraryLocation libraryLocation = new LibraryLocation(path, getDefaultSystemLibrarySource(lib), getDefaultPackageRootPath(),
File lib = path.toFile(); if (lib.exists() && lib.isFile()) { LibraryLocation libraryLocation = new LibraryLocation(path, src, Path.EMPTY, url, indexurl); boot.add(libraryLocation);
File lib = path.toFile(); if (lib.exists() && lib.isFile()) { LibraryLocation libraryLocation = new LibraryLocation(path, src, Path.EMPTY, url, indexurl); boot.add(libraryLocation);
final LibraryLocation location = new LibraryLocation(systemLibraryPath, sourcePath, packageRootPath, javadoc); final IClasspathEntry cpEntry = JavaCore.newLibraryEntry(
libs[i] = new LibraryLocation(path, srcPath, rootPath, javadocLocation, null, externalAnnotations); } else { IStatus status = new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR, NLS.bind(LaunchingMessages.JREContainerInitializer_Classpath_entry__0__does_not_refer_to_an_existing_library__2, new String[]{entry.getPath().toString()}), null);
libs[i] = new LibraryLocation(path, srcPath, rootPath, javadocLocation, null, externalAnnotations); } else { IStatus status = new Status(IStatus.ERROR, LaunchingPlugin.getUniqueIdentifier(), IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR, NLS.bind(LaunchingMessages.JREContainerInitializer_Classpath_entry__0__does_not_refer_to_an_existing_library__2, new String[]{entry.getPath().toString()}), null);
packageRootPath = new Path(substitute(packageRootStr)); locations[j] = new LibraryLocation(libPath, sourcePath, packageRootPath, url);
packageRootPath = new Path(substitute(packageRootStr)); locations[j] = new LibraryLocation(libPath, sourcePath, packageRootPath, url);
locations[i] = new LibraryLocation(libraryPaths[i], sourcePaths[i], sourceRootPaths[i], javadocLocations[i], indexes[i], annotationPaths[i]);
locations[i] = new LibraryLocation(libraryPaths[i], sourcePaths[i], sourceRootPaths[i], javadocLocations[i], indexes[i], annotationPaths[i]);
/** * Open the file selection dialog, and add the return jars as libraries. */ private void add(IStructuredSelection selection) { IDialogSettings dialogSettings= JDIDebugUIPlugin.getDefault().getDialogSettings(); String lastUsedPath= dialogSettings.get(LAST_PATH_SETTING); if (lastUsedPath == null) { lastUsedPath= ""; //$NON-NLS-1$ } FileDialog dialog= new FileDialog(fLibraryViewer.getControl().getShell(), SWT.MULTI); dialog.setText(JREMessages.VMLibraryBlock_10); dialog.setFilterExtensions(new String[] {"*.jar;*.zip"}); //$NON-NLS-1$ dialog.setFilterPath(lastUsedPath); String res= dialog.open(); if (res == null) { return; } String[] fileNames= dialog.getFileNames(); int nChosen= fileNames.length; IPath filterPath= new Path(dialog.getFilterPath()); LibraryLocation[] libs= new LibraryLocation[nChosen]; for (int i= 0; i < nChosen; i++) { libs[i]= new LibraryLocation(filterPath.append(fileNames[i]).makeAbsolute(), Path.EMPTY, Path.EMPTY); } dialogSettings.put(LAST_PATH_SETTING, filterPath.toOSString()); fLibraryContentProvider.add(libs, selection); }