Skip to content

Commit f1b4ddc

Browse files
committed
Merge branch 'nb80' into nb81
Conflicts: pom.xml
2 parents 532b3c5 + 09ff650 commit f1b4ddc

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.junichi11</groupId>
55
<artifactId>netbeans-github-issues</artifactId>
6-
<version>0.2.1</version>
6+
<version>0.2.2-SNAPSHOT</version>
77
<packaging>nbm</packaging>
88
<build>
99
<plugins>

src/main/java/com/junichi11/netbeans/modules/github/issues/GitHubIssuesConfig.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
import java.text.ParseException;
5050
import java.text.SimpleDateFormat;
5151
import java.util.ArrayList;
52-
import java.util.Arrays;
5352
import java.util.Date;
5453
import java.util.prefs.BackingStoreException;
5554
import java.util.prefs.Preferences;
@@ -261,9 +260,16 @@ public String[] getTemplateNames() {
261260
names.add(DEFAULT_TEMPLATE_NAME);
262261
Preferences preferences = getPreferences().node(TEMPLATE);
263262
try {
263+
// contains the default template if it was edited
264264
String[] childrenNames = preferences.keys();
265-
names.addAll(Arrays.asList(childrenNames));
266-
return names.toArray(new String[childrenNames.length + 1]);
265+
int count = 1; // default template
266+
for (String childName : childrenNames) {
267+
if (!childName.equals(DEFAULT_TEMPLATE_NAME)) {
268+
names.add(childName);
269+
count++;
270+
}
271+
}
272+
return names.toArray(new String[count]);
267273
} catch (BackingStoreException ex) {
268274
Exceptions.printStackTrace(ex);
269275
}

src/main/java/com/junichi11/netbeans/modules/github/issues/issue/ui/InsertTemplatePanel.form

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
3232
<StringArray count="0"/>
3333
</Property>
34-
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
35-
<ResourceString bundle="com/junichi11/netbeans/modules/github/issues/issue/ui/Bundle.properties" key="InsertTemplatePanel.templatesComboBox.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
36-
</Property>
3734
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
3835
<Dimension value="[200, 27]"/>
3936
</Property>

src/main/java/com/junichi11/netbeans/modules/github/issues/issue/ui/InsertTemplatePanel.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ private void initComponents() {
7777

7878
templatesComboBox = new javax.swing.JComboBox<String>();
7979

80-
templatesComboBox.setToolTipText(org.openide.util.NbBundle.getMessage(InsertTemplatePanel.class, "InsertTemplatePanel.templatesComboBox.toolTipText")); // NOI18N
8180
templatesComboBox.setPreferredSize(new java.awt.Dimension(200, 27));
8281

8382
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);

src/main/resources/com/junichi11/netbeans/modules/github/issues/issue/ui/Bundle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ GitHubIssuePanel.insertTemplateButton.toolTipText=Insert Template
5656
GitHubIssuePanel.insertTemplateButton.text=
5757
GitHubIssuePanel.manageTemplatesButton.toolTipText=Manage Templates
5858
GitHubIssuePanel.manageTemplatesButton.text=
59-
InsertTemplatePanel.templatesComboBox.toolTipText=
6059
TemplatePanel.nameLabel.text=Name:
6160
TemplatePanel.nameTextField.text=
6261
TemplatePanel.errorLabel.text=ERROR

0 commit comments

Comments
 (0)