/** * Returns the dev.properties as a property store. * * @return properties */ protected static Properties getDevProperties() { if (fgIsDev) { if (fgDevProperties == null) { fgDevProperties = new Properties(); if (fgDevPropertiesURL != null) { try { URL url = new URL(fgDevPropertiesURL); String path = url.getFile(); if (path != null && path.length() > 0) { File file = new File(path); if (file.exists()) { BufferedInputStream stream = null; try { stream = new BufferedInputStream(new FileInputStream(file)); fgDevProperties.load(stream); } catch (FileNotFoundException e) { PDECore.log(e); } catch (IOException e) { PDECore.log(e); } finally { if (stream != null) stream.close(); } } } } catch (MalformedURLException e) { PDECore.log(e); } catch (IOException e) { PDECore.log(e); } } } return fgDevProperties; } return null; }
/** * Computes the set of implicit dependencies from the {@link PDEPreferencesManager} * * @return a set if bundle ids */ private static String[] getImplicitDependencies() { try { ITargetPlatformService service = (ITargetPlatformService) PDECore.getDefault().acquireService(ITargetPlatformService.class.getName()); if (service != null) { NameVersionDescriptor[] implicit = service.getWorkspaceTargetDefinition().getImplicitDependencies(); if (implicit != null) { String[] result = new String[implicit.length]; for (int i = 0; i < implicit.length; i++) { result[i] = implicit[i].getId(); } return result; } } } catch (CoreException e) { PDECore.log(e); } return new String[0]; }