diff --git a/platform/credential-store/src/com/intellij/credentialStore/EnterPasswordComponent.java b/platform/credential-store/src/com/intellij/credentialStore/EnterPasswordComponent.java
index 785707d0e2f7..5fb91e63e7ac 100644
--- a/platform/credential-store/src/com/intellij/credentialStore/EnterPasswordComponent.java
+++ b/platform/credential-store/src/com/intellij/credentialStore/EnterPasswordComponent.java
@@ -20,6 +20,7 @@ import com.intellij.icons.AllIcons;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.ui.ValidationInfo;
import com.intellij.openapi.util.SystemInfo;
+import com.intellij.ui.ComponentsKt;
import com.intellij.ui.layout.LayoutKt;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
@@ -96,6 +97,6 @@ class EnterPasswordComponent {
note = "The passwords will be stored in IDE configuration files with weak protection
(" + subNote + ").";
}
- myPromptLabel = LayoutKt.htmlComponent("Master password is required to convert saved passwords.
" + note, UIUtil.getLabelFont(UIUtil.FontSize.SMALL));
+ myPromptLabel = ComponentsKt.htmlComponent("Master password is required to convert saved passwords.
" + note, UIUtil.getLabelFont(UIUtil.FontSize.SMALL));
}
}
diff --git a/platform/platform-api/src/com/intellij/openapi/diagnostic/ErrorReportSubmitter.java b/platform/platform-api/src/com/intellij/openapi/diagnostic/ErrorReportSubmitter.java
index c68e45189a95..c9c4fbca6a21 100644
--- a/platform/platform-api/src/com/intellij/openapi/diagnostic/ErrorReportSubmitter.java
+++ b/platform/platform-api/src/com/intellij/openapi/diagnostic/ErrorReportSubmitter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2014 JetBrains s.r.o.
+ * Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,6 +48,7 @@ public abstract class ErrorReportSubmitter implements PluginAware {
/**
* @return an action text to be used in Error Reporter user interface, e.g. "Report to JetBrains".
*/
+ @NotNull
public abstract String getReportActionText();
/**
diff --git a/platform/platform-api/src/com/intellij/openapi/ui/dialogBuilder.kt b/platform/platform-api/src/com/intellij/openapi/ui/dialogBuilder.kt
index 04f44c205ac6..3c771baaeb96 100644
--- a/platform/platform-api/src/com/intellij/openapi/ui/dialogBuilder.kt
+++ b/platform/platform-api/src/com/intellij/openapi/ui/dialogBuilder.kt
@@ -15,10 +15,18 @@
*/
package com.intellij.openapi.ui
+import com.intellij.openapi.project.Project
+import java.awt.Component
import javax.swing.JComponent
-fun dialog(title: String, centerPanel: JComponent, resizable: Boolean = true, preferedFocusComponent: JComponent? = null, okActionEnabled: Boolean = true): DialogBuilder {
- val builder = DialogBuilder()
+fun dialog(title: String,
+ centerPanel: JComponent,
+ resizable: Boolean = true,
+ preferedFocusComponent: JComponent? = null,
+ okActionEnabled: Boolean = true,
+ project: Project? = null,
+ parent: Component? = null): DialogBuilder {
+ val builder = if (parent == null) DialogBuilder(project) else DialogBuilder(parent)
builder
.title(title)
.centerPanel(centerPanel)
diff --git a/platform/platform-api/src/com/intellij/ui/components/labels/LinkLabel.java b/platform/platform-api/src/com/intellij/ui/components/labels/LinkLabel.java
index a6960b82d303..8e85f6de64e9 100644
--- a/platform/platform-api/src/com/intellij/ui/components/labels/LinkLabel.java
+++ b/platform/platform-api/src/com/intellij/ui/components/labels/LinkLabel.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2015 JetBrains s.r.o.
+ * Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@ import com.intellij.ui.UI;
import com.intellij.util.ui.JBRectangle;
import com.intellij.util.ui.UIUtil;
import com.intellij.util.ui.accessibility.ScreenReader;
+import gnu.trove.THashSet;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -34,7 +35,6 @@ import javax.accessibility.AccessibleRole;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
-import java.util.HashSet;
import java.util.Set;
/**
@@ -46,7 +46,7 @@ public class LinkLabel extends JLabel {
private LinkListener myLinkListener;
private T myLinkData;
- private static final Set ourVisitedLinks = new HashSet<>();
+ private static final Set ourVisitedLinks = new THashSet<>();
private boolean myIsLinkActive;
@@ -69,6 +69,16 @@ public class LinkLabel extends JLabel {
this(text, icon, aListener, null, null);
}
+ @NotNull
+ public static LinkLabel> create(@Nullable String text, @Nullable Runnable action) {
+ return new LinkLabel<>(text, null, action == null ? null : new LinkListener