Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Commit

Permalink
#55 [Optional Files] Reorder the hint about 'lowercase' and 'injected'.
Browse files Browse the repository at this point in the history
  • Loading branch information
Naoghuman committed Aug 13, 2016
1 parent 42b0157 commit 336dd78
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
1 change: 1 addition & 0 deletions releases/Release_v1.4_2016-MM-dd_HH-mm.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Welcome to `NetBeansIDE-AfterburnerFX-Plugin` with the new release `v1.4`.


#### Refactoring
#55 [Optional Files] Reorder the hint about 'lowercase' and 'injected'.
#48 [Wizard] Simplified the msg for inject xy file.
#46 [Wizard] Simplified the msg for xy to lowercase.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.github.naoghuman.netbeanside.afterburnerfx.plugin;

import com.github.naoghuman.netbeanside.afterburnerfx.plugin.support.IPluginSupport;
import com.github.naoghuman.netbeanside.afterburnerfx.plugin.support.PluginSupport;
import java.awt.Color;
import java.awt.event.ActionEvent;
import javax.swing.JPanel;
Expand Down Expand Up @@ -198,8 +199,7 @@ private void updateTextCreateFollowingFiles() {
if (shouldCSScreated) {
final StringBuilder sb = new StringBuilder();
sb.append("- ").append(packageName).append(cssFileName).append(".css"); // NOI18N
sb.append(cbCSStoLowerCase.isSelected() ? " (lowercase)" : ""); // NOI18N
sb.append(cbShouldCSSinjected.isSelected() ? " (injected)\n" : "\n"); // NOI18N
sb.append(PluginSupport.extractAdditionalInformations(cbShouldCSSinjected.isSelected(), cbCSStoLowerCase.isSelected()));

taInfoOptionalFiles.append(sb.toString());
}
Expand All @@ -212,8 +212,7 @@ private void updateTextCreateFollowingFiles() {
if (shouldPropertiesCreated) {
final StringBuilder sb = new StringBuilder();
sb.append("- ").append(packageName).append(propertiesFileName).append(".properties"); // NOI18N
sb.append(cbPropertiesToLowerCase.isSelected() ? " (lowercase)" : ""); // NOI18N
sb.append(cbShouldPropertiesInjected.isSelected() ? " (injected)\n" : "\n"); // NOI18N
sb.append(PluginSupport.extractAdditionalInformations(cbShouldPropertiesInjected.isSelected(), cbPropertiesToLowerCase.isSelected()));

taInfoOptionalFiles.append(sb.toString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.github.naoghuman.netbeanside.afterburnerfx.plugin;

import com.github.naoghuman.netbeanside.afterburnerfx.plugin.support.IPluginSupport;
import com.github.naoghuman.netbeanside.afterburnerfx.plugin.support.PluginSupport;
import javax.swing.JPanel;
import javax.swing.JTextField;

Expand Down Expand Up @@ -65,16 +66,14 @@ void initValues(String baseName, String packageName, boolean shouldFXMLtoLowerCa
if (shouldCreateCSS) {
final String cssFileName = shouldCSStoLowerCase ? baseName.toLowerCase() : baseName;
sb.append("- ").append(packageName).append(cssFileName).append(".css"); // NOI18N
sb.append(shouldCSStoLowerCase ? " (lowercase)" : ""); // NOI18N
sb.append(shouldInjectCSS ? " (injected)\n" : "\n"); // NOI18N
sb.append(PluginSupport.extractAdditionalInformations(shouldInjectCSS, shouldCSStoLowerCase));
}

// properties
if (shouldCreateProperties) {
final String propertiesFileName = shouldPropertiesToLowerCase ? baseName.toLowerCase() : baseName;
sb.append("- ").append(packageName).append(propertiesFileName).append(".properties"); // NOI18N
sb.append(shouldPropertiesToLowerCase ? " (lowercase)" : ""); // NOI18N
sb.append(shouldInjectProperties ? " (injected)\n" : "\n"); // NOI18N
sb.append(PluginSupport.extractAdditionalInformations(shouldInjectProperties, shouldPropertiesToLowerCase));
}

// configuration.properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ private static boolean existFileName(FileObject targetFolder, String relFileName
: targetFolder.getFileObject(relFileName) != null;
}

public static String extractAdditionalInformations(boolean shouldInject, boolean shouldLowercase) {
final StringBuilder sb = new StringBuilder();
sb.append(""); // NOI18N

if (shouldInject || shouldLowercase) {
sb.append(" ("); // NOI18N
sb.append((shouldInject ) ? "injected" : ""); // NOI18N
sb.append((shouldInject && shouldLowercase) ? ", " : ""); // NOI18N
sb.append((shouldLowercase ) ? "lowercase" : ""); // NOI18N
sb.append(")\n"); // NOI18N
}

return sb.toString();
}

public static String extractClassNameFromPackage(String packageName) {
if (packageName == null) {
return ""; // NOI18N
Expand Down

0 comments on commit 336dd78

Please sign in to comment.