⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bundleutils.java

📁 Python Development Environment (Python IDE plugin for Eclipse). Features editor, code completion, re
💻 JAVA
字号:
package org.python.pydev.core.bundle;

import java.io.File;
import java.net.URL;

import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;

public class BundleUtils {

	public static File getRelative(IPath relative, Bundle bundle) {
		try {
			URL bundleURL = Platform.find(bundle, relative);
		    URL fileURL;
	        fileURL = Platform.asLocalURL(bundleURL);
	        File f = new File(fileURL.getPath());
	
	        return f;
	    } catch (Exception e) {
	        throw new RuntimeException("Can't find relative path:"+relative+" within:"+bundle, e);
	    }
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -