/** * Returns all VM connector extensions. * * @return VM connectors * @since 2.0 */ public static IVMConnector[] getVMConnectors() { return LaunchingPlugin.getDefault().getVMConnectors(); }
/** * Returns the preference store for the launching plug-in. * * @return the preference store for the launching plug-in * @since 2.0 */ @SuppressWarnings("deprecation") public static Preferences getPreferences() { return LaunchingPlugin.getDefault().getPluginPreferences(); }
/** * Returns the VM connector defined with the specified identifier, * or <code>null</code> if none. * * @param id VM connector identifier * @return VM connector or <code>null</code> if none * @since 2.0 */ public static IVMConnector getVMConnector(String id) { return LaunchingPlugin.getDefault().getVMConnector(id); }
/** * Returns all VM connector extensions. * * @return VM connectors * @since 2.0 */ public static IVMConnector[] getVMConnectors() { return LaunchingPlugin.getDefault().getVMConnectors(); }
/** * Logs the specified status * @param status the status to log */ public static void log(IStatus status) { getDefault().getLog().log(status); }
/** * Returns the VM connector defined with the specified identifier, * or <code>null</code> if none. * * @param id VM connector identifier * @return VM connector or <code>null</code> if none * @since 2.0 */ public static IVMConnector getVMConnector(String id) { return LaunchingPlugin.getDefault().getVMConnector(id); }
/** * Returns the preference store for the launching plug-in. * * @return the preference store for the launching plug-in * @since 2.0 */ @SuppressWarnings("deprecation") public static Preferences getPreferences() { return LaunchingPlugin.getDefault().getPluginPreferences(); }
/** * Logs the specified status * @param status the status to log */ public static void log(IStatus status) { getDefault().getLog().log(status); }
/** * Return a <code>java.io.File</code> object that corresponds to the specified * <code>IPath</code> in the plug-in directory. * * @param path the path to look for in the launching bundle * @return the {@link File} from the bundle or <code>null</code> */ public static File getFileInPlugin(IPath path) { try { URL installURL = new URL(getDefault().getBundle().getEntry("/"), path.toString()); //$NON-NLS-1$ URL localURL = FileLocator.toFileURL(installURL); return new File(localURL.getFile()); } catch (IOException ioe) { return null; } }
/** * Return a <code>java.io.File</code> object that corresponds to the specified * <code>IPath</code> in the plug-in directory. * * @param path the path to look for in the launching bundle * @return the {@link File} from the bundle or <code>null</code> */ public static File getFileInPlugin(IPath path) { try { URL installURL = new URL(getDefault().getBundle().getEntry("/"), path.toString()); //$NON-NLS-1$ URL localURL = FileLocator.toFileURL(installURL); return new File(localURL.getFile()); } catch (IOException ioe) { return null; } }
/** * Saves the library info in a local workspace state location */ private static void saveLibraryInfo() { try { String xml = getLibraryInfoAsXML(); IPath libPath = getDefault().getStateLocation(); libPath = libPath.append("libraryInfos.xml"); //$NON-NLS-1$ File file = libPath.toFile(); if (!file.exists()) { file.createNewFile(); } try (OutputStream stream = new BufferedOutputStream(new FileOutputStream(file))) { stream.write(xml.getBytes("UTF8")); //$NON-NLS-1$ } } catch (IOException e) { log(e); } catch (CoreException e) { log(e); } }
/** * Saves the library info in a local workspace state location */ private static void saveLibraryInfo() { try { String xml = getLibraryInfoAsXML(); IPath libPath = getDefault().getStateLocation(); libPath = libPath.append("libraryInfos.xml"); //$NON-NLS-1$ File file = libPath.toFile(); if (!file.exists()) { file.createNewFile(); } try (OutputStream stream = new BufferedOutputStream(new FileOutputStream(file))) { stream.write(xml.getBytes("UTF8")); //$NON-NLS-1$ } } catch (IOException e) { log(e); } catch (CoreException e) { log(e); } }
IPath libPath = getDefault().getStateLocation(); libPath = libPath.append(".install.xml"); //$NON-NLS-1$ File file = libPath.toFile();
IPath libPath = getDefault().getStateLocation(); libPath = libPath.append(".install.xml"); //$NON-NLS-1$ File file = libPath.toFile();
IRuntimeClasspathEntry2 entry = LaunchingPlugin.getDefault().newRuntimeClasspathEntry(id); NodeList list = root.getChildNodes(); Node node = null;
IRuntimeClasspathEntry2 entry = LaunchingPlugin.getDefault().newRuntimeClasspathEntry(id); NodeList list = root.getChildNodes(); Node node = null;
IPath libPath = getDefault().getStateLocation(); libPath = libPath.append("libraryInfos.xml"); //$NON-NLS-1$ File file = libPath.toFile();
IPath libPath = getDefault().getStateLocation(); libPath = libPath.append("libraryInfos.xml"); //$NON-NLS-1$ File file = libPath.toFile();
IPath stateLocation= LaunchingPlugin.getDefault().getStateLocation(); IPath stateFile= stateLocation.append("vmConfiguration.xml"); //$NON-NLS-1$ File file = new File(stateFile.toOSString());
IPath stateLocation= LaunchingPlugin.getDefault().getStateLocation(); IPath stateFile= stateLocation.append("vmConfiguration.xml"); //$NON-NLS-1$ File file = new File(stateFile.toOSString());