本文整理了Java中org.eclipse.equinox.internal.frameworkadmin.utils.Utils.getClausesManifestMainAttributes()
方法的一些代码示例,展示了Utils.getClausesManifestMainAttributes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.getClausesManifestMainAttributes()
方法的具体详情如下:
包路径:org.eclipse.equinox.internal.frameworkadmin.utils.Utils
类名称:Utils
方法名:getClausesManifestMainAttributes
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.frameworkadmin.equinox
public static File isSystemBundle(BundleInfo bundleInfo) {
if (bundleInfo == null || bundleInfo.getLocation() == null)
return null;
URI bundleLocation = bundleInfo.getLocation();
try {
String[] clauses = Utils.getClausesManifestMainAttributes(bundleLocation, Constants.BUNDLE_SYMBOLICNAME);
if (bundleLocation.getPath().indexOf(EquinoxConstants.FW_SYMBOLIC_NAME) > 0)
if (EquinoxConstants.PERSISTENT_DIR_NAME.equals(Utils.getPathFromClause(clauses[0])))
return new File(bundleLocation);
} catch (RuntimeException e) {
e.printStackTrace();
}
return null;
}
代码示例来源:origin: org.eclipse.equinox.frameworkadmin/equinox
public static File isSystemBundle(BundleInfo bundleInfo) {
if (bundleInfo == null || bundleInfo.getLocation() == null)
return null;
URI bundleLocation = bundleInfo.getLocation();
try {
String[] clauses = Utils.getClausesManifestMainAttributes(bundleLocation, Constants.BUNDLE_SYMBOLICNAME);
if (bundleLocation.getPath().indexOf(EquinoxConstants.FW_SYMBOLIC_NAME) > 0)
if (EquinoxConstants.PERSISTENT_DIR_NAME.equals(Utils.getPathFromClause(clauses[0])))
return new File(bundleLocation);
} catch (RuntimeException e) {
e.printStackTrace();
}
return null;
}
代码示例来源:origin: org.eclipse.equinox.frameworkadmin/equinox
private BundleInfo convertSystemBundle(BundleDescription toConvert) {
// Converting the System Bundle
boolean markedAsStarted = false;
int sl = BundleInfo.NO_LEVEL;
URI location = null;
String symbolicNameTarget = toConvert.getSymbolicName();
Version versionTarget = toConvert.getVersion();
try {
File fwJar = manipulator.getLauncherData().getFwJar();
if (fwJar != null) {
URI fwJarLocation = fwJar.toURI();
String[] clauses = Utils.getClausesManifestMainAttributes(fwJarLocation, Constants.BUNDLE_SYMBOLICNAME);
String fwJarSymbolicName = Utils.getPathFromClause(clauses[0]);
String fwJarVersionSt = Utils.getManifestMainAttributes(fwJarLocation, Constants.BUNDLE_VERSION);
if (fwJarSymbolicName.equals(symbolicNameTarget) && fwJarVersionSt.equals(versionTarget.toString())) {
location = fwJarLocation;
markedAsStarted = true;
}
}
} catch (FrameworkAdminRuntimeException e1) {
Log.log(LogService.LOG_ERROR, "", e1); //$NON-NLS-1$
}
return createBundleInfo(toConvert, markedAsStarted, sl, location, null);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.frameworkadmin.equinox
private BundleInfo convertSystemBundle(BundleDescription toConvert) {
// Converting the System Bundle
boolean markedAsStarted = false;
int sl = BundleInfo.NO_LEVEL;
URI location = null;
String symbolicNameTarget = toConvert.getSymbolicName();
Version versionTarget = toConvert.getVersion();
try {
File fwJar = manipulator.getLauncherData().getFwJar();
if (fwJar != null) {
URI fwJarLocation = fwJar.toURI();
String[] clauses = Utils.getClausesManifestMainAttributes(fwJarLocation, Constants.BUNDLE_SYMBOLICNAME);
String fwJarSymbolicName = Utils.getPathFromClause(clauses[0]);
String fwJarVersionSt = Utils.getManifestMainAttributes(fwJarLocation, Constants.BUNDLE_VERSION);
if (fwJarSymbolicName.equals(symbolicNameTarget) && fwJarVersionSt.equals(versionTarget.toString())) {
location = fwJarLocation;
markedAsStarted = true;
}
}
} catch (FrameworkAdminRuntimeException e1) {
Log.log(LogService.LOG_ERROR, "", e1); //$NON-NLS-1$
}
return createBundleInfo(toConvert, markedAsStarted, sl, location, null);
}
内容来源于网络,如有侵权,请联系作者删除!