• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

テキストの各行をキーと値に分離し、複数テキストファイルを読み込み、キーを突き合わせ照合し、その結果を表示するGUIユーテリティです。


Commit MetaInfo

修订版9c045045f3fa1a98c7098f56885ca94dbdc93c71 (tree)
时间2011-10-12 02:05:44
作者seraphy <seraphy@192....>
Commiterseraphy

Log Message

ライブラリ追加、ソース修正

更改概述

差异

--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
11 /build/
2-/nbproject/private/
\ No newline at end of file
2+/nbproject/private/
3+/dist/
\ No newline at end of file
Binary files /dev/null and b/lib/AppleJavaExtensions.jar differ
Binary files /dev/null and b/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar differ
Binary files /dev/null and b/lib/JWSAntTasks/org-netbeans-modules-javawebstart-anttasks.jar differ
Binary files /dev/null and b/lib/beans-binding/beansbinding-1.2.1-doc.zip differ
Binary files /dev/null and b/lib/beans-binding/beansbinding-1.2.1.jar differ
Binary files /dev/null and b/lib/commons-lang3-3.0.1.jar differ
--- /dev/null
+++ b/lib/nblibraries.properties
@@ -0,0 +1,19 @@
1+libs.beans-binding.classpath=\
2+ ${base}/beans-binding/beansbinding-1.2.1.jar
3+libs.beans-binding.javadoc=\
4+ ${base}/beans-binding/beansbinding-1.2.1-doc.zip
5+libs.CopyLibs.classpath=\
6+ ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
7+libs.JWSAntTasks.classpath=\
8+ ${base}/JWSAntTasks/org-netbeans-modules-javawebstart-anttasks.jar
9+libs.swing-app-framework.classpath=\
10+ ${base}/swing-app-framework/appframework-1.0.3.jar:\
11+ ${base}/swing-app-framework/swing-worker-1.1.jar
12+libs.swing-app-framework.javadoc=\
13+ ${base}/swing-app-framework/appframework-1.0.3-doc.zip
14+libs.swing-layout.classpath=\
15+ ${base}/swing-layout/swing-layout-1.0.4.jar
16+libs.swing-layout.javadoc=\
17+ ${base}/swing-layout/swing-layout-1.0.4-doc.zip
18+libs.swing-layout.src=\
19+ ${base}/swing-layout/swing-layout-1.0.4-src.zip!/swing-layout-1.0.4/src/java/
Binary files /dev/null and b/lib/swing-app-framework/appframework-1.0.3-doc.zip differ
Binary files /dev/null and b/lib/swing-app-framework/appframework-1.0.3.jar differ
Binary files /dev/null and b/lib/swing-app-framework/swing-worker-1.1.jar differ
Binary files /dev/null and b/lib/swing-layout/swing-layout-1.0.4-doc.zip differ
Binary files /dev/null and b/lib/swing-layout/swing-layout-1.0.4-src.zip differ
Binary files /dev/null and b/lib/swing-layout/swing-layout-1.0.4.jar differ
--- a/nbproject/build-impl.xml
+++ b/nbproject/build-impl.xml
@@ -43,18 +43,43 @@ is divided into following sections:
4343 <property file="nbproject/private/configs/${config}.properties"/>
4444 <property file="nbproject/private/private.properties"/>
4545 </target>
46- <target depends="-pre-init,-init-private" name="-init-user">
46+ <target name="-pre-init-libraries">
47+ <property location="./lib/nblibraries.properties" name="libraries.path"/>
48+ <dirname file="${libraries.path}" property="libraries.dir.nativedirsep"/>
49+ <pathconvert dirsep="/" property="libraries.dir">
50+ <path path="${libraries.dir.nativedirsep}"/>
51+ </pathconvert>
52+ <basename file="${libraries.path}" property="libraries.basename" suffix=".properties"/>
53+ <available file="${libraries.dir}/${libraries.basename}-private.properties" property="private.properties.available"/>
54+ </target>
55+ <target depends="-pre-init-libraries" if="private.properties.available" name="-init-private-libraries">
56+ <loadproperties encoding="ISO-8859-1" srcfile="${libraries.dir}/${libraries.basename}-private.properties">
57+ <filterchain>
58+ <replacestring from="$${base}" to="${libraries.dir}"/>
59+ <escapeunicode/>
60+ </filterchain>
61+ </loadproperties>
62+ </target>
63+ <target depends="-pre-init,-init-private,-init-private-libraries" name="-init-libraries">
64+ <loadproperties encoding="ISO-8859-1" srcfile="${libraries.path}">
65+ <filterchain>
66+ <replacestring from="$${base}" to="${libraries.dir}"/>
67+ <escapeunicode/>
68+ </filterchain>
69+ </loadproperties>
70+ </target>
71+ <target depends="-pre-init,-init-private,-init-libraries" name="-init-user">
4772 <property file="${user.properties.file}"/>
4873 <!-- The two properties below are usually overridden -->
4974 <!-- by the active platform. Just a fallback. -->
5075 <property name="default.javac.source" value="1.4"/>
5176 <property name="default.javac.target" value="1.4"/>
5277 </target>
53- <target depends="-pre-init,-init-private,-init-user" name="-init-project">
78+ <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project">
5479 <property file="nbproject/configs/${config}.properties"/>
5580 <property file="nbproject/project.properties"/>
5681 </target>
57- <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
82+ <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init">
5883 <available file="${manifest.file}" property="manifest.available"/>
5984 <condition property="splashscreen.available">
6085 <and>
@@ -205,7 +230,7 @@ is divided into following sections:
205230 <!-- Empty placeholder for easier customization. -->
206231 <!-- You can override this target in the ../build.xml file. -->
207232 </target>
208- <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
233+ <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check">
209234 <fail unless="src.dir">Must set src.dir</fail>
210235 <fail unless="test.src.dir">Must set test.src.dir</fail>
211236 <fail unless="build.dir">Must set build.dir</fail>
@@ -556,7 +581,7 @@ is divided into following sections:
556581 <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
557582 <property name="ap.cmd.line.internal" value=""/>
558583 </target>
559- <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
584+ <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
560585 <!--
561586 ===================
562587 COMPILATION SECTION
--- a/nbproject/genfiles.properties
+++ b/nbproject/genfiles.properties
@@ -1,8 +1,8 @@
1-build.xml.data.CRC32=6bcbf639
1+build.xml.data.CRC32=2c6ec66d
22 build.xml.script.CRC32=269ca5bc
33 build.xml.stylesheet.CRC32=28e38971@1.44.1.45
44 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
55 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6-nbproject/build-impl.xml.data.CRC32=6bcbf639
7-nbproject/build-impl.xml.script.CRC32=a933e583
6+nbproject/build-impl.xml.data.CRC32=2c6ec66d
7+nbproject/build-impl.xml.script.CRC32=550200f7
88 nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -26,8 +26,8 @@ dist.jar=${dist.dir}/TextKeyMatcher.jar
2626 dist.javadoc.dir=${dist.dir}/javadoc
2727 endorsed.classpath=
2828 excludes=
29-file.reference.AppleJavaExtensions.jar=/Users/seraphy/Documents/workspace/CharacterManaJ/extlib/AppleJavaExtensions.jar
30-file.reference.commons-lang3-3.0.1.jar=/archives/Libs/commons-lang3-3.0.1/commons-lang3-3.0.1.jar
29+file.reference.AppleJavaExtensions.jar=lib/AppleJavaExtensions.jar
30+file.reference.commons-lang3-3.0.1.jar=lib/commons-lang3-3.0.1.jar
3131 file.reference.javaws.jar=/System/Library/Frameworks/JavaVM.framework/Resources/Deploy.bundle/Contents/Home/lib/javaws.jar
3232 includes=**
3333 jar.archive.disabled=${jnlp.enabled}
@@ -40,8 +40,8 @@ javac.classpath=\
4040 ${libs.swing-layout.classpath}:\
4141 ${file.reference.commons-lang3-3.0.1.jar}
4242 # Space-separated list of extra javac options
43-javac.compilerargs=
44-javac.deprecation=false
43+javac.compilerargs=-Xlint:unchecked
44+javac.deprecation=true
4545 javac.processorpath=\
4646 ${javac.classpath}
4747 javac.source=1.6
--- a/nbproject/project.xml
+++ b/nbproject/project.xml
@@ -18,6 +18,9 @@
1818 <root id="test.src.dir"/>
1919 </test-roots>
2020 </data>
21+ <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
22+ <definitions>./lib/nblibraries.properties</definitions>
23+ </libraries>
2124 <swingapp xmlns="http://www.netbeans.org/ns/form-swingapp/1">
2225 <application-class name="textkeymatcher.TextKeyMatcherApp"/>
2326 </swingapp>
--- a/src/textkeymatcher/entity/KeyMatchedDataModel.java
+++ b/src/textkeymatcher/entity/KeyMatchedDataModel.java
@@ -90,7 +90,9 @@ public class KeyMatchedDataModel {
9090
9191 } else if (datas[column] instanceof List) {
9292 // すでに2要素以上ある場合
93- ((List<String>) datas[column]).add(value);
93+ @SuppressWarnings("unchecked")
94+ List<String> lst = (List<String>) datas[column];
95+ lst.add(value);
9496
9597 } else {
9698 // すでに存在する場合はリストにつめ直す.
@@ -122,7 +124,9 @@ public class KeyMatchedDataModel {
122124 Object data = datas[column];
123125 if (data != null && data instanceof List) {
124126 // リスト格納であれば、要素数を返す
125- return ((List<String>) data).size();
127+ @SuppressWarnings("unchecked")
128+ List<String> lst = (List<String>) datas[column];
129+ return lst.size();
126130 }
127131 // リストでなければ単一要素なので1を返す
128132 return 1;
@@ -137,6 +141,7 @@ public class KeyMatchedDataModel {
137141 return "";
138142 }
139143 if (data instanceof List) {
144+ @SuppressWarnings("unchecked")
140145 List<String> lst = ((List<String>) data);
141146 if (rowIndex >= 0 && rowIndex < lst.size()) {
142147 // 複数データならば存在する行分だけ
--- a/src/textkeymatcher/service/KeyMatcher.java
+++ b/src/textkeymatcher/service/KeyMatcher.java
@@ -5,14 +5,13 @@
55 package textkeymatcher.service;
66
77 import java.math.BigDecimal;
8-import java.util.Comparator;
98 import org.apache.commons.lang3.StringUtils;
109
1110 /**
1211 *
1312 * @author seraphy
1413 */
15-public enum KeyMatcher implements Comparator<String> {
14+public enum KeyMatcher {
1615
1716 TEXT(){
1817 @Override
@@ -120,7 +119,8 @@ public enum KeyMatcher implements Comparator<String> {
120119 return val.hashCode();
121120 }
122121 },;
123-
122+
123+ public abstract int compare(String k1, String k2);
124124
125125 public abstract String getNormalize(String org);
126126