OSDN Git Service

ログデータ一覧取得のテスト関数を追加。また、SimpleStatusのユーザIDをint型からlong型に変更。
authorspark_xp <spark_xp@d8c9ecd3-d47d-4367-8645-de82c00e513f>
Sat, 7 May 2011 08:47:26 +0000 (08:47 +0000)
committerspark_xp <spark_xp@d8c9ecd3-d47d-4367-8645-de82c00e513f>
Sat, 7 May 2011 08:47:26 +0000 (08:47 +0000)
git-svn-id: http://svn.sourceforge.jp/svnroot/nt-manager/NishioTweetManager/trunk@132 d8c9ecd3-d47d-4367-8645-de82c00e513f

src/twitter/gui/action/TweetMainAction.java
src/twitter/gui/form/NishioTweetManager.java
src/twitter/manage/SimpleStatus.java
src/twitter/manage/StatusXMLConverter.java

index 4a91b4c..a3ee3b2 100644 (file)
@@ -45,6 +45,9 @@ import javax.swing.text.Style;
 import javax.swing.text.StyleConstants;
 import javax.swing.text.html.HTMLDocument;
 import javax.swing.text.html.StyleSheet;
+
+import org.xml.sax.SAXParseException;
+
 import twitter.action.TweetDirectMessageGetter;
 import twitter.action.TweetFavoriteGetter;
 import twitter.action.TweetGetter;
@@ -72,6 +75,7 @@ import twitter.gui.form.HashtagSearchDialog;
 import twitter.gui.form.KeywordSearchDialog;
 import twitter.gui.form.UserListDialog;
 import twitter.gui.form.UserSearchDialog;
+import twitter.log.TwitterLogManager;
 import twitter.manage.TweetConfiguration;
 import twitter.manage.TweetManager;
 import twitter.task.ExistTimerIDException;
@@ -1473,6 +1477,23 @@ public class TweetMainAction {
                        this.setReplyStatus(null);
                }
        }
+       
+       /**
+        * デバッグ用
+        */
+       public void debug() {
+               TwitterLogManager logManager = new TwitterLogManager();
+               try {
+                       List<Status> statuses = logManager.get();
+                       for(Status s : statuses) {
+                               System.out.println(s);
+                       }
+               } catch (SAXParseException e) {
+                       e.printStackTrace();
+               } catch (IOException e) {
+                       e.printStackTrace();
+               }
+       }
 
        /**
         * 基本設定用ダイアログを取得
index 650a7de..dd3c9c5 100644 (file)
@@ -1084,8 +1084,7 @@ public class NishioTweetManager extends javax.swing.JFrame {
        }// GEN-LAST:event_jMenuItem8ActionPerformed
 
        private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jMenuItem9ActionPerformed
-               mainAction.actionShowUserListDialog("nishio_dens",
-                               ListGetterSelection.MEMBERSHIPS);
+               mainAction.debug();
        }// GEN-LAST:event_jMenuItem9ActionPerformed
 
        private void jTextPaneCaretUpdate(javax.swing.event.CaretEvent evt) {// GEN-FIRST:event_jTextPaneCaretUpdate
index 38095f4..1b8906a 100644 (file)
@@ -21,7 +21,7 @@ public class SimpleStatus implements Status {
     private long id = 0;
     private String inReplyToScreenName = null;
     private long inReplyToStatusId = 0;
-    private int inReplyToUserId = 0;
+    private long inReplyToUserId = 0;
     private Place place = null;
     private Status retweetedStatus = null;
     private String source = null;
@@ -245,11 +245,11 @@ public class SimpleStatus implements Status {
     /**
      * inReplyToUserIdを設定します。
      *
-     * @param inReplyToUserId
+     * @param l
      *            inReplyToUserId
      */
-    public void setInReplyToUserId(int inReplyToUserId) {
-        this.inReplyToUserId = inReplyToUserId;
+    public void setInReplyToUserId(long l) {
+        this.inReplyToUserId = l;
     }
 
     /**
index 564b80a..a4db458 100644 (file)
@@ -414,7 +414,7 @@ public class StatusXMLConverter {
                                        status.setInReplyToStatusId(Long.parseLong(replyStatusID));
                                }
                                if (replyUserID != null) {
-                                       status.setInReplyToUserId(Integer.parseInt(replyUserID));
+                                       status.setInReplyToUserId(Long.parseLong(replyUserID));
                                }
                                // TODO: Place
                                // TODO: RetweetStatus ここは実装可能