Skip to content

Commit e33349e

Browse files
author
Bogdan Haidu
committed
Include Laravel info on Framwork & Tools option panel
1 parent 5014cce commit e33349e

File tree

8 files changed

+159
-11
lines changed

8 files changed

+159
-11
lines changed

.github/workflows/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## What's changed
44

5-
- create plugin for Netbeans 27
5+
- Include basic info on PHP -> Frameworks & Tools -> Laravel option

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## [1.0.0.14]
4+
5+
- Include basic info on PHP -> Frameworks & Tools -> Laravel option
6+
37
## [1.0.0.13]
48

59
Bug fixes for `view` and `config` method string param autocomplete, CTRL + Click

manifest.mf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ Manifest-Version: 1.0
22
AutoUpdate-Show-In-Client: true
33
OpenIDE-Module: org.netbeans.modules.php.laravel
44
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/php/laravel/resources/Bundle.properties
5-
OpenIDE-Module-Specification-Version: 1.0.0.13
5+
OpenIDE-Module-Specification-Version: 1.0.0.14
66

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
OpenIDE-Module-Display-Category=PHP
22
OpenIDE-Module-Long-Description=\
3-
<h1>Support for Laravel Framework</h1>\n<p>@author Haidu Bogdan</p>\n\n1.0.0.8 - Updates on execution commands<br>
3+
<h1>Support for Laravel Framework</h1>\n<p>@author Haidu Bogdan</p>\n\n1.0.0.14 - Include basic Options text<br>\n1.0.0.8 - Updates on execution commands<br>
44
OpenIDE-Module-Name=Php Laravel Framework
55
OpenIDE-Module-Short-Description=Support for Laravel Framework
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
LaravelOptionsPanel.jLabel1.text=Laravel
2+
LaravelOptionsPanel.noteLabel.text=<html><i>Note:</i></html>
3+
LaravelOptionsPanel.learnMoreLabel.text=<html><a href="#">Learn more</a>
4+
LaravelOptionsPanel.installationInstructionsLabel.text=Installation instructions can be found on Laravel's web site.
5+
LaravelOptionsPanel.versionLabel.text=Requires PHP Interpreter on localhost or
6+
LaravelOptionsPanel.versionLabel1.text=access to a docker container configured in Project Properties
7+
LaravelOptionsPanel.versionLabel2.text=Frameworks -> Laravel

src/org/netbeans/modules/php/laravel/ui/options/LaravelOptionsPanel.form

Lines changed: 73 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,18 @@
1616
<Layout>
1717
<DimensionLayout dim="0">
1818
<Group type="103" groupAlignment="0" attributes="0">
19-
<Group type="102" alignment="0" attributes="0">
19+
<Group type="102" attributes="0">
2020
<EmptySpace max="-2" attributes="0"/>
21-
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
22-
<EmptySpace pref="357" max="32767" attributes="0"/>
21+
<Group type="103" groupAlignment="0" attributes="0">
22+
<Component id="noteLabel" alignment="0" min="-2" max="-2" attributes="0"/>
23+
<Component id="versionLabel" alignment="0" min="-2" max="-2" attributes="0"/>
24+
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
25+
<Component id="installationInstructionsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
26+
<Component id="learnMoreLabel" alignment="0" min="-2" max="-2" attributes="0"/>
27+
<Component id="versionLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
28+
<Component id="versionLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
29+
</Group>
30+
<EmptySpace pref="10" max="32767" attributes="0"/>
2331
</Group>
2432
</Group>
2533
</DimensionLayout>
@@ -28,18 +36,79 @@
2836
<Group type="102" alignment="0" attributes="0">
2937
<EmptySpace max="-2" attributes="0"/>
3038
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
31-
<EmptySpace pref="278" max="32767" attributes="0"/>
39+
<EmptySpace max="-2" attributes="0"/>
40+
<Component id="noteLabel" min="-2" max="-2" attributes="0"/>
41+
<EmptySpace max="-2" attributes="0"/>
42+
<Component id="versionLabel" min="-2" max="-2" attributes="0"/>
43+
<EmptySpace max="-2" attributes="0"/>
44+
<Component id="versionLabel1" min="-2" max="-2" attributes="0"/>
45+
<EmptySpace max="-2" attributes="0"/>
46+
<Component id="versionLabel2" min="-2" max="-2" attributes="0"/>
47+
<EmptySpace type="separate" max="-2" attributes="0"/>
48+
<Component id="installationInstructionsLabel" min="-2" max="-2" attributes="0"/>
49+
<EmptySpace max="-2" attributes="0"/>
50+
<Component id="learnMoreLabel" min="-2" max="-2" attributes="0"/>
51+
<EmptySpace pref="116" max="32767" attributes="0"/>
3252
</Group>
3353
</Group>
3454
</DimensionLayout>
3555
</Layout>
3656
<SubComponents>
3757
<Component class="javax.swing.JLabel" name="jLabel1">
3858
<Properties>
59+
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
60+
<Font name="Cantarell" size="15" style="1"/>
61+
</Property>
3962
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
4063
<ResourceString bundle="org/netbeans/modules/php/laravel/ui/options/Bundle.properties" key="LaravelOptionsPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
4164
</Property>
4265
</Properties>
4366
</Component>
67+
<Component class="javax.swing.JLabel" name="noteLabel">
68+
<Properties>
69+
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
70+
<ResourceString bundle="org/netbeans/modules/php/laravel/ui/options/Bundle.properties" key="LaravelOptionsPanel.noteLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
71+
</Property>
72+
</Properties>
73+
</Component>
74+
<Component class="javax.swing.JLabel" name="versionLabel">
75+
<Properties>
76+
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
77+
<ResourceString bundle="org/netbeans/modules/php/laravel/ui/options/Bundle.properties" key="LaravelOptionsPanel.versionLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
78+
</Property>
79+
</Properties>
80+
</Component>
81+
<Component class="javax.swing.JLabel" name="installationInstructionsLabel">
82+
<Properties>
83+
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
84+
<ResourceString bundle="org/netbeans/modules/php/laravel/ui/options/Bundle.properties" key="LaravelOptionsPanel.installationInstructionsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
85+
</Property>
86+
</Properties>
87+
</Component>
88+
<Component class="javax.swing.JLabel" name="learnMoreLabel">
89+
<Properties>
90+
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
91+
<ResourceString bundle="org/netbeans/modules/php/laravel/ui/options/Bundle.properties" key="LaravelOptionsPanel.learnMoreLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
92+
</Property>
93+
</Properties>
94+
<Events>
95+
<EventHandler event="mouseEntered" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="learnMoreLabelMouseEntered"/>
96+
<EventHandler event="mousePressed" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="learnMoreLabelMousePressed"/>
97+
</Events>
98+
</Component>
99+
<Component class="javax.swing.JLabel" name="versionLabel1">
100+
<Properties>
101+
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
102+
<ResourceString bundle="org/netbeans/modules/php/laravel/ui/options/Bundle.properties" key="LaravelOptionsPanel.versionLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
103+
</Property>
104+
</Properties>
105+
</Component>
106+
<Component class="javax.swing.JLabel" name="versionLabel2">
107+
<Properties>
108+
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
109+
<ResourceString bundle="org/netbeans/modules/php/laravel/ui/options/Bundle.properties" key="LaravelOptionsPanel.versionLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
110+
</Property>
111+
</Properties>
112+
</Component>
44113
</SubComponents>
45114
</Form>

src/org/netbeans/modules/php/laravel/ui/options/LaravelOptionsPanel.java

Lines changed: 72 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ Licensed to the Apache Software Foundation (ASF)
33
*/
44
package org.netbeans.modules.php.laravel.ui.options;
55

6+
import java.awt.Cursor;
7+
import java.net.MalformedURLException;
8+
import java.net.URL;
69
import org.netbeans.modules.php.api.util.UiUtils;
710
import org.netbeans.spi.options.OptionsPanelController;
11+
import org.openide.awt.HtmlBrowser;
12+
import org.openide.util.Exceptions;
813

914
/**
1015
* NOT USED
@@ -34,27 +39,85 @@ public class LaravelOptionsPanel extends javax.swing.JPanel {
3439
private void initComponents() {
3540

3641
jLabel1 = new javax.swing.JLabel();
42+
noteLabel = new javax.swing.JLabel();
43+
versionLabel = new javax.swing.JLabel();
44+
installationInstructionsLabel = new javax.swing.JLabel();
45+
learnMoreLabel = new javax.swing.JLabel();
46+
versionLabel1 = new javax.swing.JLabel();
47+
versionLabel2 = new javax.swing.JLabel();
3748

49+
jLabel1.setFont(new java.awt.Font("Cantarell", 1, 15)); // NOI18N
3850
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(LaravelOptionsPanel.class, "LaravelOptionsPanel.jLabel1.text")); // NOI18N
3951

52+
org.openide.awt.Mnemonics.setLocalizedText(noteLabel, org.openide.util.NbBundle.getMessage(LaravelOptionsPanel.class, "LaravelOptionsPanel.noteLabel.text")); // NOI18N
53+
54+
org.openide.awt.Mnemonics.setLocalizedText(versionLabel, org.openide.util.NbBundle.getMessage(LaravelOptionsPanel.class, "LaravelOptionsPanel.versionLabel.text")); // NOI18N
55+
56+
org.openide.awt.Mnemonics.setLocalizedText(installationInstructionsLabel, org.openide.util.NbBundle.getMessage(LaravelOptionsPanel.class, "LaravelOptionsPanel.installationInstructionsLabel.text")); // NOI18N
57+
58+
org.openide.awt.Mnemonics.setLocalizedText(learnMoreLabel, org.openide.util.NbBundle.getMessage(LaravelOptionsPanel.class, "LaravelOptionsPanel.learnMoreLabel.text")); // NOI18N
59+
learnMoreLabel.addMouseListener(new java.awt.event.MouseAdapter() {
60+
public void mouseEntered(java.awt.event.MouseEvent evt) {
61+
learnMoreLabelMouseEntered(evt);
62+
}
63+
public void mousePressed(java.awt.event.MouseEvent evt) {
64+
learnMoreLabelMousePressed(evt);
65+
}
66+
});
67+
68+
org.openide.awt.Mnemonics.setLocalizedText(versionLabel1, org.openide.util.NbBundle.getMessage(LaravelOptionsPanel.class, "LaravelOptionsPanel.versionLabel1.text")); // NOI18N
69+
70+
org.openide.awt.Mnemonics.setLocalizedText(versionLabel2, org.openide.util.NbBundle.getMessage(LaravelOptionsPanel.class, "LaravelOptionsPanel.versionLabel2.text")); // NOI18N
71+
4072
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
4173
this.setLayout(layout);
4274
layout.setHorizontalGroup(
4375
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
4476
.addGroup(layout.createSequentialGroup()
4577
.addContainerGap()
46-
.addComponent(jLabel1)
47-
.addContainerGap(357, Short.MAX_VALUE))
78+
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
79+
.addComponent(noteLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
80+
.addComponent(versionLabel)
81+
.addComponent(jLabel1)
82+
.addComponent(installationInstructionsLabel)
83+
.addComponent(learnMoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
84+
.addComponent(versionLabel1)
85+
.addComponent(versionLabel2))
86+
.addContainerGap(10, Short.MAX_VALUE))
4887
);
4988
layout.setVerticalGroup(
5089
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
5190
.addGroup(layout.createSequentialGroup()
5291
.addContainerGap()
5392
.addComponent(jLabel1)
54-
.addContainerGap(278, Short.MAX_VALUE))
93+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
94+
.addComponent(noteLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
95+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
96+
.addComponent(versionLabel)
97+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
98+
.addComponent(versionLabel1)
99+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
100+
.addComponent(versionLabel2)
101+
.addGap(18, 18, 18)
102+
.addComponent(installationInstructionsLabel)
103+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
104+
.addComponent(learnMoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
105+
.addContainerGap(116, Short.MAX_VALUE))
55106
);
56107
}// </editor-fold>//GEN-END:initComponents
57108

109+
private void learnMoreLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_learnMoreLabelMouseEntered
110+
evt.getComponent().setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
111+
}//GEN-LAST:event_learnMoreLabelMouseEntered
112+
113+
private void learnMoreLabelMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_learnMoreLabelMousePressed
114+
try {
115+
HtmlBrowser.URLDisplayer.getDefault().showURL(new URL("https://laravel.com/docs/installation")); // NOI18N
116+
} catch (MalformedURLException ex) {
117+
Exceptions.printStackTrace(ex);
118+
}
119+
}//GEN-LAST:event_learnMoreLabelMousePressed
120+
58121
void load() {
59122
//throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
60123
}
@@ -77,6 +140,12 @@ boolean changed() {
77140

78141

79142
// Variables declaration - do not modify//GEN-BEGIN:variables
143+
private javax.swing.JLabel installationInstructionsLabel;
80144
private javax.swing.JLabel jLabel1;
145+
private javax.swing.JLabel learnMoreLabel;
146+
private javax.swing.JLabel noteLabel;
147+
private javax.swing.JLabel versionLabel;
148+
private javax.swing.JLabel versionLabel1;
149+
private javax.swing.JLabel versionLabel2;
81150
// End of variables declaration//GEN-END:variables
82151
}

src/org/netbeans/modules/php/laravel/ui/options/LaravelOptionsPanelController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Licensed to the Apache Software Foundation (ASF)
1515

1616
@UiUtils.PhpOptionsPanelRegistration(
1717
id = LaravelOptionsPanelController.ID,
18-
displayName = "Laravel 9",
18+
displayName = "Laravel",
1919
position = 2200
2020
)
2121
public class LaravelOptionsPanelController extends OptionsPanelController {

0 commit comments

Comments
 (0)