发现Eclipse中未解析的插件依赖性 - 编程入门网
作者 佚名技术
来源 NET编程
浏览
发布时间 2012-06-19
of target platform. //step2: Prepare path of links folder. //step3: Get list of files in links folder. //step4: Parse each link file and get the path of linked Eclipse folder. //step5: Prepare a list of all plugin root folders // (Eclipse plugins and linked Eclipse plugins). //step6: 6a. For each plugin root folder, // 6b. go to each plugin directory and get path of plugin.xml. //step7: Parse the plugin.xml file to get plugin id, plugin version, // and store in vectors, lists, etc. //step8: Go back to step 6 to continue with next plugin directory. **/ //step1: Get path of target platform. //Fall back to Eclipse install location if targetplatform in not set. URL platFormURL = Platform.getInstallLocation().getURL(); Location location = Platform.getInstallLocation(); IPath eclipsePath = null ; //Get path of target platform against which the users of this tool //will compile their code. IPath targetPlatFormLocation = new Path(getTargetPlatformPath(true)); if(_useTargetPlatform == false) eclipsePath = new Path(platFormURL.getPath()); else eclipsePath = targetPlatFormLocation; showMessage("Considering target platform to be: " + eclipsePath.toString()); //step2: Prepare path of links folder. //step3: Get list of files in links folder. //step4: Parse each link file and get the path of linked Eclipse folder. IPath linksPath = new Path( eclipsePath.toString() ).append("/links"); String linkedPaths[] = getLinkedPaths(linksPath.toString()); int linkedPathLength = 0; if(null != linkedPaths){ linkedPathLength = linkedPaths.length; } //step5: Prepare a list of all plugin root folders // (Eclipse plugins and linked Eclipse plugins). IPath eclipsePluginRootFolders[] = new IPath[linkedPathLength + 1]; eclipsePluginRootFolders[0] = new Path( eclipsePath.toString() ).append("/plugins"); if(null != linkedPaths){ for(int i=0; i<linkedPaths.length; i++){ eclipsePluginRootFolders[i+1] = new Path(linkedPaths[i]).append("/eclipse/plugins"); } } //step6: 6a. For each plugin root folder, // 6b. go to each plugin directory and get path of plugin.xml. //step7: Parse the plugin.xml file to get plugin id, plugin version, // and store in vectors, lists, etc. Vector vectorsInThisVector = new Vector(); for(int i=0; i<eclipsePluginRootFolders.length; i++){ System.out.println("\n========plugin IDs and Versions in " + eclipsePluginRootFolders[i] + "========"); Vector pluginDataObjs = getPluginDataForAllPlugins( eclipsePluginRootFolders[i].toString()); |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于发现Eclipse中未解析的插件依赖性 - 编程入门网的所有评论