/** For backward compatibility * */ public static RPkgType getPkgType(final String name) { try { return RPkgType.valueOf(name); } catch (final IllegalArgumentException e) { return RPkgType.valueOf(name.toUpperCase()); } }
@Override public IRPkgData addToCache(final IFileStore store, final IProgressMonitor monitor) throws CoreException { final IRPkg pkg = RPkgUtil.checkPkgFileName(store.getName()); final RPkgType type = RPkgUtil.checkPkgType(store.getName(), fRPlatform); fCache.add(pkg.getName(), type, store, monitor); return new RPkgData( pkg.getName(), RNumVersion.NONE, RRepo.WS_CACHE_PREFIX + type.name().toLowerCase()); }