mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
LicenseeInfoProvider must not be a service - services are initialized later
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.intellij.ui;
|
||||
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -24,8 +23,11 @@ import java.util.Date;
|
||||
* @author yole
|
||||
*/
|
||||
public abstract class LicenseeInfoProvider {
|
||||
public static LicenseeInfoProvider ourInstance;
|
||||
|
||||
@Nullable
|
||||
public static LicenseeInfoProvider getInstance() {
|
||||
return ServiceManager.getService(LicenseeInfoProvider.class);
|
||||
return ourInstance;
|
||||
}
|
||||
|
||||
public abstract String getLicensedToMessage();
|
||||
|
||||
@@ -56,8 +56,10 @@ public class Splash extends JDialog {
|
||||
g.setColor(textColor);
|
||||
LicenseeInfoProvider provider = LicenseeInfoProvider.getInstance();
|
||||
if (provider != null) {
|
||||
g.drawString(provider.getLicensedToMessage(), x + 20, y + height - 52);
|
||||
g.drawString(provider.getLicenseRestrictionsMessage(), x + 20, y + height - 32);
|
||||
final String licensedToMessage = provider.getLicensedToMessage();
|
||||
final String licenseRestrictionsMessage = provider.getLicenseRestrictionsMessage();
|
||||
g.drawString(licensedToMessage, x + 20, y + height - 52);
|
||||
g.drawString(licenseRestrictionsMessage, x + 20, y + height - 32);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user