public static File getEclipseInstallationDirectory() { return new File(Platform.getInstallLocation().getURL().getFile()); }
public OSGiConsole(final OSGiConsoleFactory factory) { super(NLS.bind(PDEUIMessages.OSGiConsole_name, Platform.getInstallLocation().getURL().getPath()), TYPE, null, true); session = new ConsoleSession() { @Override public OutputStream getOutput() { return newOutputStream(); } @Override public InputStream getInput() { return getInputStream(); } @Override protected void doClose() { factory.closeConsole(OSGiConsole.this); } }; }
@Override public String getValue(String variable, IResource resource) { URL installURL = Platform.getInstallLocation().getURL(); try { return URIUtil.toURI(installURL).toASCIIString(); } catch (URISyntaxException e) { return null; } } }
private IPath getJarredPluginPath(Bundle bundle) { Path runtimeLibFullPath = null; String jarPluginLocation = bundle.getLocation().substring(7); Path jarPluginPath = new Path(jarPluginLocation); // handle case where jars are installed outside of eclipse installation if (jarPluginPath.isAbsolute()) runtimeLibFullPath = jarPluginPath; // handle normal case where all plugins under eclipse install else { String installPath = Platform.getInstallLocation().getURL().getPath(); runtimeLibFullPath = new Path(installPath+"/"+jarPluginLocation); //$NON-NLS-1$ } return runtimeLibFullPath; }
/** * Returns the location of the default target platform, namely the location * of the host (running) instance of Eclipse. * * @return the location of the default target platform */ public static String getDefaultLocation() { Location location = Platform.getInstallLocation(); if (location != null) { URL url = Platform.getInstallLocation().getURL(); IPath path = new Path(url.getFile()).removeTrailingSeparator(); return path.toOSString(); } return ""; //$NON-NLS-1$ }
@Override public String getValue(String variable, IResource resource) { URL installURL = Platform.getInstallLocation().getURL(); try { return URIUtil.toURI(installURL).toASCIIString(); } catch (URISyntaxException e) { return null; } } }
@Override public String getValue(String variable, IResource resource) { URL installURL = Platform.getInstallLocation().getURL(); try { return URIUtil.toURI(installURL).toASCIIString(); } catch (URISyntaxException e) { return null; } } }
/** * Returns the location of the default target platform, namely the location * of the host (running) instance of Eclipse. * * @return the location of the default target platform */ public static String getDefaultLocation() { URL installURL = Platform.getInstallLocation().getURL(); IPath path = new Path(installURL.getFile()).removeTrailingSeparator(); return path.toOSString(); }
/** * This is fragile. Use with care. * @return a String representing the path to the wala.core plugin installation */ public static String getWalaCorePluginHome() { if (CorePlugin.getDefault() == null) { return null; } String install = Platform.getInstallLocation().getURL().getPath(); Bundle b = Platform.getBundle("com.ibm.wala.core"); String l = b.getLocation(); if (l.startsWith("update@")) { l = l.replace("update@", ""); } if (l.startsWith("reference:file:")) { return l.replace("reference:file:",""); } else { return install + File.separator + l; } }
File installDirectory = new File(Platform.getInstallLocation().getURL().getFile());
@Override public String resolveValue(IDynamicVariable variable, String argument) throws CoreException { Location installLocation = Platform.getInstallLocation(); if (installLocation != null) { URL url = installLocation.getURL(); if (url != null) { // Try to convert the URL to an OS string, to be consistent with // how other variables, like ${workspace_loc} resolve. See // ResourceResolver.translateToValue(). [bugzilla 263535] String file = url.getFile(); IPath path = Path.fromOSString(file); String osstr = path.toOSString(); if (osstr.length() != 0) { return osstr; } if (file.length() != 0) { return file; } } } return null; }
@Override public String resolveValue(IDynamicVariable variable, String argument) throws CoreException { Location installLocation = Platform.getInstallLocation(); if (installLocation != null) { URL url = installLocation.getURL(); if (url != null) { // Try to convert the URL to an OS string, to be consistent with // how other variables, like ${workspace_loc} resolve. See // ResourceResolver.translateToValue(). [bugzilla 263535] String file = url.getFile(); IPath path = Path.fromOSString(file); String osstr = path.toOSString(); if (osstr.length() != 0) { return osstr; } if (file.length() != 0) { return file; } } } return null; }
bundleLocation = Platform.getInstallLocation().getURL().getPath() + bundleLocation;
@Override public String resolveValue(IDynamicVariable variable, String argument) throws CoreException { if ("ARCH".equals(argument)) { //$NON-NLS-1$ return Platform.getOSArch(); } else if ("ECLIPSE_HOME".equals(argument)) { //$NON-NLS-1$ URL installURL = Platform.getInstallLocation().getURL(); IPath ppath = new Path(installURL.getFile()).removeTrailingSeparator(); return getCorrectPath(ppath.toOSString()); } else if ("NL".equals(argument)) { //$NON-NLS-1$ return Platform.getNL(); } else if ("OS".equals(argument)) { //$NON-NLS-1$ return Platform.getOS(); } else if ("WS".equals(argument)) { //$NON-NLS-1$ return Platform.getWS(); } return null; }
Location location = Platform.getInstallLocation(); if (location != null) { URL url = location.getURL();
Location location = Platform.getInstallLocation(); if(location != null) { URL url = location.getURL();
Location location = Platform.getInstallLocation(); if (location != null) { URL url = location.getURL();
Location location = Platform.getInstallLocation(); if (location != null) { URL url = location.getURL();