本文整理汇总了Java中com.intellij.ui.LicensingFacade类的典型用法代码示例。如果您正苦于以下问题:Java LicensingFacade类的具体用法?Java LicensingFacade怎么用?Java LicensingFacade使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LicensingFacade类属于com.intellij.ui包,在下文中一共展示了LicensingFacade类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initLicensingInfo
import com.intellij.ui.LicensingFacade; //导入依赖的package包/类
protected void initLicensingInfo(@NotNull UpdateChannel channel, @NotNull BuildInfo build) {
LicensingFacade facade = LicensingFacade.getInstance();
if (facade != null) {
mySubscriptionLicense = facade.isSubscriptionLicense();
if (!channel.getLicensing().equals(UpdateChannel.LICENSING_EAP)) {
int majorVersion = build.getMajorVersion();
if (majorVersion < 0) {
majorVersion = channel.getMajorVersion(); // fallback
}
final Boolean paidUpgrade = facade.isPaidUpgrade(majorVersion, build.getReleaseDate());
if (paidUpgrade == Boolean.TRUE) {
myPaidUpgrade = true;
myLicenseInfo = IdeBundle.message("updates.channel.key.needed", channel.getEvalDays());
}
else if (paidUpgrade == Boolean.FALSE) {
myLicenseInfo = IdeBundle.message("updates.channel.existing.key");
}
}
else {
myLicenseInfo = IdeBundle.message("updates.channel.bundled.key");
}
}
}
示例2: initInfo
import com.intellij.ui.LicensingFacade; //导入依赖的package包/类
private void initInfo() {
StringBuilder builder = new StringBuilder();
builder.append("<head>").append(UIUtil.getCssFontDeclaration(UIUtil.getLabelFont())).append("</head><body>");
builder.append("<b>").append(myChannel.getName()).append("</b><br>");
builder.append(StringUtil.formatLinks(myChannel.getLatestBuild().getMessage())).append("<br><br>");
LicensingFacade facade = LicensingFacade.getInstance();
if (facade != null) {
if (!myChannel.getLicensing().equals(UpdateChannel.LICENSING_EAP)) {
Boolean paidUpgrade = facade.isPaidUpgrade(myChannel.getMajorVersion(), myChannel.getLatestBuild().getReleaseDate());
if (paidUpgrade != null) {
if (paidUpgrade) {
builder.append("You can evaluate the new version for ")
.append(myChannel.getEvalDays())
.append(" days or buy a license key or an upgrade online.");
myShowUpgradeButton = true;
}
else {
builder.append("The new version can be used with your existing license key.");
}
}
}
else {
builder.append("The new version has an expiration date and does not require a license key.");
}
}
myInformationText = XmlStringUtil.wrapInHtml(builder);
}
示例3: isDiscountTargetGroup
import com.intellij.ui.LicensingFacade; //导入依赖的package包/类
private boolean isDiscountTargetGroup() {
LicensingFacade licensingFacade = LicensingFacade.getInstance();
return licensingFacade == null || licensingFacade.isEvaluationLicense() || PlatformUtils.isIdeaCommunity();
}
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:5,代码来源:HybrisProjectManagerListener.java
示例4: getRegisteredTo
import com.intellij.ui.LicensingFacade; //导入依赖的package包/类
@Nullable
protected String getRegisteredTo() {
final LicensingFacade instance = LicensingFacade.getInstance();
return null == instance ? null : instance.getLicensedToMessage();
}
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:7,代码来源:DefaultStatsCollector.java
示例5: isEvaluationLicense
import com.intellij.ui.LicensingFacade; //导入依赖的package包/类
private static boolean isEvaluationLicense() {
final LicensingFacade provider = LicensingFacade.getInstance();
return provider != null && provider.isEvaluationLicense();
}