1 Star 0 Fork 28

MerlinDust/eclipse

forked from src-openEuler/eclipse 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
eclipse-make-droplets-runnable.patch 2.12 KB
一键复制 编辑 原始数据 按行查看 历史
lyn 提交于 2020-08-20 11:57 +08:00 . update to 4.11-1
From decc6ec5f3c5ce87fa50c2cfe932d66e89496810 Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber@redhat.com>
Date: Wed, 3 Aug 2016 14:57:10 -0400
Subject: [PATCH] p2 Droplets should be recognized as runnable repositories.
Normally, a runnable repository is identified by the 'p2.runnable'
property contained within the artifact repository (artifact.xml).
However, in Fedora we ship p2 Droplets without this file so we need a
way to let methods like getRunnableRepositories in
o.e.equinox.internal.p2.touchpoint.eclipse.Util know that p2 Droplets
are runnable repositories.
Change-Id: I0ad0a7557f998b4d032466f89e6cc76036d1fb38
---
.../ExtensionLocationArtifactRepository.java | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git rt.equinox.p2/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java rt.equinox.p2/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
index 342e33e..425a166 100644
--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
+++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
@@ -260,6 +260,22 @@ public class ExtensionLocationArtifactRepository extends AbstractRepository<IArt
return artifactRepository.getProperties();
}
+ public String getProperty(String key) {
+ if (IArtifactRepository.PROP_RUNNABLE.equals(key)) {
+ String candidate = getLocation().getPath();
+ String fragments = System.getProperty("p2.fragments");
+ if (fragments != null) {
+ String[] rootPaths = fragments.split(",");
+ for (String root : rootPaths) {
+ if (candidate.startsWith(root)) {
+ return Boolean.TRUE.toString();
+ }
+ }
+ }
+ }
+ return super.getProperty(key);
+ }
+
@Override
public String setProperty(String key, String value, IProgressMonitor monitor) {
try {
--
2.7.4
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/DustMerlin/eclipse.git
git@gitee.com:DustMerlin/eclipse.git
DustMerlin
eclipse
eclipse
master

搜索帮助