Skip to content

Commit 6a2b461

Browse files
Added the Learn more link to the Addobe Commerce only message
1 parent 60cee1b commit 6a2b461

File tree

2 files changed

+61
-13
lines changed

2 files changed

+61
-13
lines changed

src/com/magento/idea/magento2uct/execution/configurations/UctSettingsEditor.form

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<grid id="27dc6" binding="contentPanel" layout-manager="GridLayoutManager" row-count="18" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
44
<margin top="0" left="0" bottom="0" right="0"/>
55
<constraints>
6-
<xy x="20" y="20" width="983" height="502"/>
6+
<xy x="20" y="20" width="983" height="546"/>
77
</constraints>
88
<properties/>
99
<border type="none"/>
@@ -204,18 +204,6 @@
204204
</component>
205205
</children>
206206
</grid>
207-
<component id="3d7cc" class="javax.swing.JLabel" binding="licenseWarning">
208-
<constraints>
209-
<grid row="15" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
210-
</constraints>
211-
<properties>
212-
<font size="12" style="1"/>
213-
<foreground color="-2730672"/>
214-
<icon value="general/warning.png"/>
215-
<text value="Adobe Commerce only"/>
216-
<toolTipText value="You should have Magento authentication keys"/>
217-
</properties>
218-
</component>
219207
<component id="939a8" class="com.intellij.openapi.ui.LabeledComponent" binding="modulePath" custom-create="true">
220208
<constraints>
221209
<grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
@@ -242,6 +230,52 @@
242230
<text value="Path To Analyse"/>
243231
</properties>
244232
</component>
233+
<grid id="e16e0" binding="adobeCommercePanel" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
234+
<margin top="4" left="0" bottom="2" right="0"/>
235+
<constraints>
236+
<grid row="15" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
237+
</constraints>
238+
<properties/>
239+
<border type="none"/>
240+
<children>
241+
<component id="3d7cc" class="javax.swing.JLabel" binding="licenseWarning">
242+
<constraints>
243+
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
244+
</constraints>
245+
<properties>
246+
<font size="12" style="1"/>
247+
<foreground color="-2730672"/>
248+
<horizontalAlignment value="2"/>
249+
<horizontalTextPosition value="11"/>
250+
<icon value="general/warning.png"/>
251+
<text value="Adobe Commerce only."/>
252+
<toolTipText value="You should have Magento authentication keys"/>
253+
</properties>
254+
</component>
255+
<hspacer id="1b4d9">
256+
<constraints>
257+
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
258+
</constraints>
259+
</hspacer>
260+
<component id="4a88f" class="org.jdesktop.swingx.JXHyperlink" binding="learnMoreLink">
261+
<constraints>
262+
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="2" indent="0" use-parent-layout="false"/>
263+
</constraints>
264+
<properties>
265+
<actionCommand value=""/>
266+
<clickedColor color="-11176758"/>
267+
<font size="12"/>
268+
<hideActionText value="false"/>
269+
<horizontalAlignment value="2"/>
270+
<horizontalTextPosition value="11"/>
271+
<inheritsPopupMenu value="false"/>
272+
<label value="Learn more."/>
273+
<margin top="0" left="0" bottom="0" right="0"/>
274+
<text value="Learn more."/>
275+
</properties>
276+
</component>
277+
</children>
278+
</grid>
245279
</children>
246280
</grid>
247281
</form>

src/com/magento/idea/magento2uct/execution/configurations/UctSettingsEditor.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
import com.magento.idea.magento2uct.versioning.SupportedVersion;
2727
import java.awt.Color;
2828
import java.awt.Container;
29+
import java.net.URI;
30+
import java.net.URISyntaxException;
2931
import javax.swing.JComboBox;
3032
import javax.swing.JComponent;
3133
import javax.swing.JLabel;
@@ -38,6 +40,10 @@
3840

3941
public class UctSettingsEditor extends SettingsEditor<UctRunConfiguration> {
4042

43+
private static final String LEARN_MORE_URI =
44+
"https://docs.magento.com/user-guide/getting-started.html#product-editions";
45+
private static final String LEARN_MORE_TEXT = "Learn more. ";
46+
4147
private final Project project;
4248
private String uctExecutablePath;
4349

@@ -66,6 +72,8 @@ public class UctSettingsEditor extends SettingsEditor<UctRunConfiguration> {
6672
private JLabel licenseWarning;//NOPMD
6773
private JLabel modulePathComment;//NOPMD
6874
private JLabel modulePathLabel;//NOPMD
75+
private JXHyperlink learnMoreLink;//NOPMD
76+
private JPanel adobeCommercePanel;//NOPMD
6977

7078
/**
7179
* Form constructor.
@@ -78,6 +86,12 @@ public UctSettingsEditor(final @NotNull Project project) {
7886
this.project = project;
7987
initializeComboboxSources();
8088
validateSettingsForm();
89+
try {
90+
learnMoreLink.setURI(new URI(LEARN_MORE_URI));
91+
learnMoreLink.setText(LEARN_MORE_TEXT);
92+
} catch (URISyntaxException exception) {
93+
learnMoreLink.setVisible(false);
94+
}
8195
infoLabel.setForeground(JBColor.blue);
8296
infoLabel2.setForeground(JBColor.blue);
8397
uctLookupFailedWarning.setForeground(JBColor.orange);

0 commit comments

Comments
 (0)