• R/O
  • SSH
  • HTTPS

chaplet: 提交


Commit MetaInfo

修訂35 (tree)
時間2007-07-10 01:05:05
作者koe

Log Message

プロットの開示と手札をあげるアクションを実装

Change Summary

差異

--- chaplet/trunk/src/nova/jp/sf/chaplet/nova/server/ExchangePlotAction.java (revision 34)
+++ chaplet/trunk/src/nova/jp/sf/chaplet/nova/server/ExchangePlotAction.java (nonexistent)
@@ -1,41 +0,0 @@
1-/* ExchangePlotAction.java
2- * 作成日: 2004/09/30
3- */
4-package jp.sf.chaplet.nova.server;
5-
6-import java.io.IOException;
7-
8-import jp.sf.chaplet.ActionResult;
9-import jp.sf.chaplet.core.server.ClientProxy;
10-import jp.sf.chaplet.core.server.ServerAction;
11-
12-/**
13- * ExchangePlotAction<br>
14- *
15- * @author koe
16- * @version $Id$
17- */
18-public class ExchangePlotAction extends ServerAction {
19-
20- /**
21- * @see jp.sf.chaplet.core.server.ServerAction#execute(java.lang.String[], jp.sf.chaplet.core.server.ClientProxy)
22- */
23- public ActionResult execute(String[] request, ClientProxy proxy)
24- throws IOException {
25- Hand myHand = ((NovaServerPlugin)getPlugin()).getHandManager().getHandOf(proxy.getSessionId());
26- int toNo = Integer.parseInt(request[1]);
27- if(myHand.removeCard(0, request[2])){
28- myHand.addCard(0, request[3]);
29- myHand.addCard(toNo, request[2]);
30- request[0] = "ok/" + request[1];
31- proxy.sendMessage(request);
32- sendStatus();
33- return ActionResult.OK_NEXT;
34- } else {
35- String[] resp = {"ng/" + request[0]};
36- proxy.sendMessage(resp);
37- return ActionResult.ERROR;
38- }
39- }
40-
41-}
Deleted: svn:keywords
## -1 +0,0 ##
-" Date Revision Author HeadURL Id "
\ No newline at end of property
--- chaplet/trunk/src/nova/jp/sf/chaplet/nova/server/CardManager.java (revision 34)
+++ chaplet/trunk/src/nova/jp/sf/chaplet/nova/server/CardManager.java (revision 35)
@@ -9,7 +9,6 @@
99 import java.io.FileReader;
1010 import java.io.IOException;
1111 import java.util.ArrayList;
12-import java.util.Iterator;
1312 import java.util.Map;
1413
1514 /**
@@ -222,9 +221,9 @@
222221 return card;
223222 }
224223
225- public void setThrownAway(ArrayList cards){
226- for (Iterator iter = cards.iterator(); iter.hasNext();) {
227- setThrownAway((String) iter.next());
224+ public void setThrownAway(ArrayList<String> cards){
225+ for (String card : cards){
226+ setThrownAway(card);
228227 }
229228 }
230229
--- chaplet/trunk/src/nova/jp/sf/chaplet/nova/server/NovaServerPlugin.java (revision 34)
+++ chaplet/trunk/src/nova/jp/sf/chaplet/nova/server/NovaServerPlugin.java (revision 35)
@@ -71,6 +71,7 @@
7171 addAction("nova:givecard", new GiveCardAction());
7272 addAction("nova:tohand", new PlotToHandAction());
7373 addAction("nova:init", new InitializeAction());
74+ addAction("nova:showplot", new ShowPlotAction());
7475
7576 NovaConfig config = (NovaConfig) StorageUtils.load(NovaConfig.NAME, NovaConfig.class);
7677 tarotManager.setConfig(config);
--- chaplet/trunk/src/nova/jp/sf/chaplet/nova/server/Hand.java (revision 34)
+++ chaplet/trunk/src/nova/jp/sf/chaplet/nova/server/Hand.java (revision 35)
@@ -29,8 +29,7 @@
2929
3030 public String handString(){
3131 StringBuffer sb = new StringBuffer(" ");
32- for(Iterator iter = cardMap.keySet().iterator(); iter.hasNext();){
33- Integer key = (Integer) iter.next();
32+ for(Integer key : cardMap.keySet()){
3433 if(key.intValue() != 0){
3534 ArrayList<String> list = cardMap.get(key);
3635 int numReaction = 0;
@@ -112,12 +111,12 @@
112111 */
113112 public String toString() {
114113 StringBuffer sb = new StringBuffer(getName());
115- for(Iterator mapIter = cardMap.keySet().iterator(); mapIter.hasNext();){
116- Integer key = (Integer) mapIter.next();
117- ArrayList cardList = (ArrayList)cardMap.get(key);
114+ for(Iterator<Integer> mapIter = cardMap.keySet().iterator(); mapIter.hasNext();){
115+ Integer key = mapIter.next();
116+ ArrayList<String> cardList = (ArrayList<String>)cardMap.get(key);
118117 sb.append('[');
119118 sb.append(key.intValue());
120- for (Iterator iter = cardList.iterator(); iter.hasNext();) {
119+ for (Iterator<String> iter = cardList.iterator(); iter.hasNext();) {
121120 sb.append(',');
122121 sb.append(iter.next());
123122 }
@@ -235,9 +234,8 @@
235234 */
236235 public int getProtOrder(int protNo) {
237236 int order = 0;
238- Set keySet = cardMap.keySet();
239- for (Iterator iter = keySet.iterator(); iter.hasNext();) {
240- Integer key = (Integer) iter.next();
237+ Set<Integer> keySet = cardMap.keySet();
238+ for (Integer key : keySet){
241239 if(key.intValue() == protNo){
242240 return order;
243241 } else {
@@ -285,11 +283,10 @@
285283 * @return
286284 */
287285 public int[] getPlotNoList() {
288- Set set = cardMap.keySet();
286+ Set<Integer> set = cardMap.keySet();
289287 int[] plotNos = new int[set.size() - 1];
290288 int i = 0;
291- for (Iterator iter = set.iterator(); iter.hasNext();) {
292- Integer element = (Integer) iter.next();
289+ for (Integer element : set){
293290 if(element.intValue() > 0){
294291 plotNos[i] = element.intValue();
295292 i++;
--- chaplet/trunk/src/nova/jp/sf/chaplet/nova/server/ShowPlotAction.java (nonexistent)
+++ chaplet/trunk/src/nova/jp/sf/chaplet/nova/server/ShowPlotAction.java (revision 35)
@@ -0,0 +1,31 @@
1+/**
2+ *
3+ */
4+package jp.sf.chaplet.nova.server;
5+
6+import java.io.IOException;
7+
8+import jp.sf.chaplet.ActionResult;
9+import jp.sf.chaplet.core.server.ClientProxy;
10+import jp.sf.chaplet.core.server.ServerAction;
11+
12+/**
13+ * ShowPlotAction<br>
14+ * @version $Id$
15+ */
16+public class ShowPlotAction extends ServerAction {
17+
18+ /**
19+ * @see jp.sf.chaplet.core.server.ServerAction#execute(java.lang.String[], jp.sf.chaplet.core.server.ClientProxy)
20+ */
21+ @Override
22+ public ActionResult execute(String[] request, ClientProxy proxy) throws IOException {
23+ String[] response = new String[3];
24+ response[0] = request[0];
25+ response[1] = getUserManager().getName(proxy.getSessionId());
26+ response[2] = request[1];
27+ sendLog(response);
28+ return ActionResult.OK_NEXT;
29+ }
30+
31+}
Added: svn:keywords
## -0,0 +1 ##
+" Date Revision Author HeadURL Id "
\ No newline at end of property
--- chaplet/trunk/src/nova/jp/sf/chaplet/nova/server/TarotManager.java (revision 34)
+++ chaplet/trunk/src/nova/jp/sf/chaplet/nova/server/TarotManager.java (revision 35)
@@ -99,11 +99,11 @@
9999 reset();
100100 }
101101 int nextIndex = (int) (Math.random() * (reminderSet.size()));
102- Iterator iterator = reminderSet.iterator();
102+ Iterator<Integer> iterator = reminderSet.iterator();
103103 for(int i = 0; i < nextIndex - 1; i++){
104104 iterator.next();
105105 }
106- Integer key = (Integer) iterator.next();
106+ Integer key = iterator.next();
107107
108108 current = tarotMap.get(key);
109109
--- chaplet/trunk/src/nova/jp/sf/chaplet/nova/ui/NovaView.java (revision 34)
+++ chaplet/trunk/src/nova/jp/sf/chaplet/nova/ui/NovaView.java (revision 35)
@@ -5,6 +5,7 @@
55 import java.awt.GridBagConstraints;
66 import java.awt.GridBagLayout;
77 import java.awt.Insets;
8+import java.awt.Rectangle;
89 import java.awt.event.ActionEvent;
910 import java.awt.event.ActionListener;
1011
@@ -31,6 +32,8 @@
3132 import jp.sf.chaplet.nova.Plot;
3233 import jp.sf.chaplet.nova.PlotChara;
3334 import application.ApplicationContext;
35+import javax.swing.JPopupMenu;
36+import javax.swing.JMenuItem;
3437
3538 /**
3639 * NovaView。
@@ -67,6 +70,10 @@
6770 private JButton initButton = null;
6871 private JButton removeCharacterButton = null;
6972 private JButton toReactionButton = null;
73+ private JButton otherFuncButton = null;
74+ private JPopupMenu otherFuncPopup = null; // @jve:decl-index=0:visual-constraint="398,206"
75+ private JMenuItem giveCardItem = null;
76+ private JMenuItem showPlotItem = null;
7077
7178 /**
7279 * This is the default constructor
@@ -206,6 +213,11 @@
206213 */
207214 private JPanel getButtonPanel() {
208215 if (buttonPanel == null) {
216+ GridBagConstraints gridBagConstraints17 = new GridBagConstraints();
217+ gridBagConstraints17.gridx = 0;
218+ gridBagConstraints17.fill = GridBagConstraints.HORIZONTAL;
219+ gridBagConstraints17.insets = new Insets(2, 0, 2, 0);
220+ gridBagConstraints17.gridy = 3;
209221 GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
210222 gridBagConstraints4.gridx = 0;
211223 gridBagConstraints4.fill = GridBagConstraints.HORIZONTAL;
@@ -214,6 +226,7 @@
214226 GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
215227 gridBagConstraints3.gridx = 0;
216228 gridBagConstraints3.insets = new Insets(2, 0, 2, 0);
229+ gridBagConstraints3.fill = GridBagConstraints.HORIZONTAL;
217230 gridBagConstraints3.gridy = 1;
218231 GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
219232 gridBagConstraints2.anchor = GridBagConstraints.CENTER;
@@ -224,6 +237,7 @@
224237 buttonPanel.add(getFeedButton(), gridBagConstraints2);
225238 buttonPanel.add(getToPileButton(), gridBagConstraints3);
226239 buttonPanel.add(getYamabikiButton(), gridBagConstraints4);
240+ buttonPanel.add(getOtherFuncButton(), gridBagConstraints17);
227241 }
228242 return buttonPanel;
229243 }
@@ -647,6 +661,80 @@
647661 return toReactionButton;
648662 }
649663
664+ /**
665+ * This method initializes otherFuncButton
666+ *
667+ * @return javax.swing.JButton
668+ */
669+ private JButton getOtherFuncButton() {
670+ if (otherFuncButton == null) {
671+ otherFuncButton = new JButton();
672+ otherFuncButton.setText("その他");
673+ otherFuncButton.addActionListener(new java.awt.event.ActionListener() {
674+ public void actionPerformed(java.awt.event.ActionEvent e) {
675+ Rectangle bounds = getOtherFuncButton().getBounds();
676+ getOtherFuncPopup().show(getButtonPanel(), bounds.x, bounds.y + bounds.height);
677+ }
678+ });
679+ }
680+ return otherFuncButton;
681+ }
682+
683+ /**
684+ * This method initializes otherFuncPopup
685+ *
686+ * @return javax.swing.JPopupMenu
687+ */
688+ private JPopupMenu getOtherFuncPopup() {
689+ if (otherFuncPopup == null) {
690+ otherFuncPopup = new JPopupMenu();
691+ otherFuncPopup.add(getGiveCardItem());
692+ otherFuncPopup.add(getShowPlotItem());
693+ otherFuncPopup.addFocusListener(new java.awt.event.FocusAdapter() {
694+ public void focusLost(java.awt.event.FocusEvent e) {
695+ otherFuncPopup.setVisible(false);
696+ }
697+ });
698+ }
699+ return otherFuncPopup;
700+ }
701+
702+ /**
703+ * This method initializes giveCardItem
704+ *
705+ * @return javax.swing.JMenuItem
706+ */
707+ private JMenuItem getGiveCardItem() {
708+ if (giveCardItem == null) {
709+ giveCardItem = new JMenuItem();
710+ giveCardItem.setText("手札を渡す");
711+ giveCardItem.addActionListener(new java.awt.event.ActionListener() {
712+ public void actionPerformed(java.awt.event.ActionEvent e) {
713+ actionMap.get("giveCard").actionPerformed(e);
714+ }
715+ });
716+ }
717+ return giveCardItem;
718+ }
719+
720+ /**
721+ * This method initializes showPlotItem
722+ *
723+ * @return javax.swing.JMenuItem
724+ */
725+ private JMenuItem getShowPlotItem() {
726+ if (showPlotItem == null) {
727+ showPlotItem = new JMenuItem();
728+ showPlotItem.setText("プロットを見せる");
729+ showPlotItem.addActionListener(new java.awt.event.ActionListener() {
730+ public void actionPerformed(java.awt.event.ActionEvent e) {
731+ actionMap.get("showPlot").actionPerformed(e);
732+ }
733+ });
734+ }
735+ return showPlotItem;
736+ }
737+
650738 public static void main(String[] args) {
651739 JFrame frame = new JFrame("card");
652740 frame.add(new NovaView());
--- chaplet/trunk/src/nova/jp/sf/chaplet/nova/client/ExchangePlotAction.java (revision 34)
+++ chaplet/trunk/src/nova/jp/sf/chaplet/nova/client/ExchangePlotAction.java (nonexistent)
@@ -1,34 +0,0 @@
1-/* ExchangePlotAction.java
2- * 作成日: 2004/09/30
3- */
4-package jp.sf.chaplet.nova.client;
5-
6-import jp.sf.chaplet.ActionResult;
7-import jp.sf.chaplet.core.client.ClientAction;
8-import jp.sf.chaplet.nova.ui.INovaView;
9-
10-/**
11- * ExchangePlotAction<br>
12- *
13- * @author koe
14- * @version $Id$
15- */
16-public class ExchangePlotAction extends ClientAction {
17- /**
18- * @see jp.sf.chaplet.core.client.ClientAction#responseRecieved(java.lang.String[])
19- */
20- public ActionResult responseRecieved(String[] response) {
21- int toNo = Integer.parseInt(response[1]);
22- String card = response[2];
23- INovaView view = ((NovaClientPlugin)getPlugin()).getNovaView();
24- String[] fromHand = view.getHand();
25- for (int i = 0; i < fromHand.length; i++) {
26- if(fromHand[i].equals(response[2])){
27- fromHand[i] = response[3];
28- break;
29- }
30- }
31- view.exchangePlot(toNo, response[3], response[2]);
32- return ActionResult.OK_NEXT;
33- }
34-}
Deleted: svn:keywords
## -1 +0,0 ##
-" Date Revision Author HeadURL Id "
\ No newline at end of property
--- chaplet/trunk/src/nova/jp/sf/chaplet/nova/client/NovaClientPlugin.java (revision 34)
+++ chaplet/trunk/src/nova/jp/sf/chaplet/nova/client/NovaClientPlugin.java (revision 35)
@@ -3,11 +3,14 @@
33 */
44 package jp.sf.chaplet.nova.client;
55
6+import java.awt.Component;
67 import java.util.ArrayList;
78 import java.util.List;
89
10+import javax.swing.JOptionPane;
911 import javax.swing.JPanel;
1012
13+import jp.sf.chaplet.UserStatus;
1114 import jp.sf.chaplet.core.client.ClientPlugin;
1215 import jp.sf.chaplet.core.ui.IPluginView;
1316 import jp.sf.chaplet.core.ui.IPrefView;
@@ -46,6 +49,7 @@
4649 addAction("nova:status", new SetStatusAction());
4750 addAction("nova:givecard", new GiveCardAction());
4851 addAction("nova:tohand", new PlotToHandAction());
52+ addAction("nova:showplot", new ShowPlotAction());
4953
5054 view = new NovaView();
5155 view.setController(this);
@@ -217,14 +221,6 @@
217221 getConnection().sendMessage(new String[]{"nova:init"});
218222 }
219223
220- public void exchange(String handCard, String plotCard, int plotNo){
221- getConnection().sendMessage(new String[]{"nova:exchange", String.valueOf(plotNo), handCard, plotCard});
222- }
223-
224- public void giveCard(String card, String user){
225- getConnection().sendMessage(new String[]{"nova:givecard", user, card});
226- }
227-
228224 /**
229225 * @see jp.sf.chaplet.core.client.ClientPlugin#getPluginView()
230226 */
@@ -256,4 +252,42 @@
256252 prefList.add(new BasicPrefPanel());
257253 return prefList;
258254 }
255+
256+ @Action
257+ public void giveCard(){
258+ Card card = (Card) view.getHandList().getSelectedValue();
259+ if(card == null){
260+ return;
261+ }
262+
263+ UserStatus[] users = getController().getUsers();
264+ UserStatus user = (UserStatus) JOptionPane.showInputDialog((Component) getController().getView(),
265+ "カードを渡すユーザを選択して下さい。",
266+ "ユーザの選択",
267+ JOptionPane.OK_CANCEL_OPTION, null, users, null);
268+ if(user != null){
269+ getConnection().sendMessage(new String[]{"nova:givecard", user.getSessionId(), card.toString()});
270+ }
271+ }
272+
273+ @Action
274+ public void showPlot(){
275+ int rowIndex = view.getPlotTable().getSelectedRow();
276+ if(rowIndex < 0){
277+ rowIndex = 0;
278+ }
279+ if(view.getPlotTable().getRowCount() < rowIndex){
280+ return;
281+ }
282+ PlotChara chara = view.getPlotTableModel().indexOf(rowIndex);
283+ int columnIndex = view.getPlotTable().getSelectedColumn();
284+ if(columnIndex <= 0){
285+ return;
286+ }
287+ Plot plot = view.getPlotTableModel().getPlot(chara.getCharaNo(), columnIndex - 1);
288+
289+ if(plot != null){
290+ getConnection().sendMessage(new String[]{"nova:showplot", plot.getCard().toString()});
291+ }
292+ }
259293 }
--- chaplet/trunk/src/nova/jp/sf/chaplet/nova/client/ShowPlotAction.java (nonexistent)
+++ chaplet/trunk/src/nova/jp/sf/chaplet/nova/client/ShowPlotAction.java (revision 35)
@@ -0,0 +1,24 @@
1+/**
2+ *
3+ */
4+package jp.sf.chaplet.nova.client;
5+
6+import jp.sf.chaplet.ActionResult;
7+import jp.sf.chaplet.core.client.ClientAction;
8+import jp.sf.chaplet.nova.NovaUtil;
9+
10+/**
11+ * ShowPlotAction<br>
12+ * @version $Id$
13+ */
14+public class ShowPlotAction extends ClientAction {
15+ /**
16+ * @see jp.sf.chaplet.core.client.ClientAction#messageRecieved(java.lang.String[])
17+ */
18+ @Override
19+ public ActionResult messageRecieved(String[] message) {
20+ appendFunctionLog("カード機能", message[1],
21+ NovaUtil.toVisibleStyle(message[2]) + " (プロットを開示)");
22+ return ActionResult.OK_NEXT;
23+ }
24+}
Added: svn:keywords
## -0,0 +1 ##
+" Date Revision Author HeadURL Id "
\ No newline at end of property
--- chaplet/trunk/src/core/jp/sf/chaplet/UserStatus.java (revision 34)
+++ chaplet/trunk/src/core/jp/sf/chaplet/UserStatus.java (revision 35)
@@ -36,6 +36,14 @@
3636 this.status.add(status);
3737 this.sessionId = sessionId;
3838 }
39+
40+ /**
41+ * @see java.lang.Object#toString()
42+ */
43+ @Override
44+ public String toString() {
45+ return name;
46+ }
3947
4048 /**
4149 * @return name
--- chaplet/trunk/src/core/jp/sf/chaplet/StorageUtils.java (revision 34)
+++ chaplet/trunk/src/core/jp/sf/chaplet/StorageUtils.java (revision 35)
@@ -32,6 +32,7 @@
3232 }
3333 }
3434
35+ @SuppressWarnings("unchecked")
3536 public static final Object load(String name, Class theClass){
3637 Object obj = load(name);
3738 if(obj == null){
--- chaplet/trunk/src/core/jp/sf/chaplet/Configuration.java (revision 34)
+++ chaplet/trunk/src/core/jp/sf/chaplet/Configuration.java (revision 35)
@@ -6,7 +6,6 @@
66 package jp.sf.chaplet;
77
88 import java.util.ArrayList;
9-import java.util.Iterator;
109 import java.util.List;
1110 import java.util.Properties;
1211
@@ -140,13 +139,9 @@
140139 // }
141140 // }
142141 /**
143- * プラグインを含むイテレータを返す。
142+ * プラグインのリストを返す。
144143 * @return
145144 */
146- public Iterator pluginIterator() {
147- return pluginList.iterator();
148- }
149-
150145 public List<Plugin> getPlugins(){
151146 return pluginList;
152147 }
--- chaplet/trunk/src/core/jp/sf/chaplet/core/server/ChatServer.java (revision 34)
+++ chaplet/trunk/src/core/jp/sf/chaplet/core/server/ChatServer.java (revision 35)
@@ -244,7 +244,7 @@
244244 * プロキシ一覧にアクセスするイテレータを取得する。
245245 * @return イテレータ
246246 */
247- public Iterator getProxyIterator(){
247+ public Iterator<ClientProxy> getProxyIterator(){
248248 return proxyList.iterator();
249249 }
250250
@@ -289,8 +289,7 @@
289289 * @return プロキシ
290290 */
291291 public ClientProxy getProxy(String name){
292- for (Iterator iter = proxyList.iterator(); iter.hasNext();) {
293- ClientProxy proxy = (ClientProxy) iter.next();
292+ for (ClientProxy proxy : proxyList){
294293 if(proxy.getSessionId().equals(name)){
295294 return proxy;
296295 }
@@ -347,8 +346,7 @@
347346 * サーバの開始をリスナーに伝える。
348347 */
349348 private void notifyServerStarted(){
350- for (Iterator iter = listenerList.iterator(); iter.hasNext();) {
351- IServerListener listener = (IServerListener) iter.next();
349+ for (IServerListener listener : listenerList) {
352350 listener.serverStarted();
353351 }
354352 }
--- chaplet/trunk/src/core/jp/sf/chaplet/core/ui/BasicPrefPanel.java (revision 34)
+++ chaplet/trunk/src/core/jp/sf/chaplet/core/ui/BasicPrefPanel.java (revision 35)
@@ -222,8 +222,10 @@
222222 } catch (NumberFormatException e1) {
223223 }
224224 color = JColorChooser.showDialog(BasicPrefPanel.this, "文字色(通常)", color);
225- getNormalFontColorText().setText(Integer.toHexString(color.getRGB() | 0xff000000).substring(2));
226- changeCSS();
225+ if(color != null){
226+ getNormalFontColorText().setText(Integer.toHexString(color.getRGB() | 0xff000000).substring(2));
227+ changeCSS();
228+ }
227229 }
228230 });
229231 }
--- chaplet/trunk/src/core/jp/sf/chaplet/core/client/ChatClient.java (revision 34)
+++ chaplet/trunk/src/core/jp/sf/chaplet/core/client/ChatClient.java (revision 35)
@@ -383,10 +383,11 @@
383383 }
384384 }
385385
386- public Iterator pluginIterator() {
386+ public Iterator<ClientPlugin> pluginIterator() {
387387 return pluginMap.values().iterator();
388388 }
389389
390+ @SuppressWarnings("unchecked")
390391 @Action
391392 public Task reload() {
392393 return new Task() {
@@ -796,4 +797,10 @@
796797 public void removeUser(){
797798
798799 }
800+
801+ public UserStatus[] getUsers(){
802+ UserStatus[] users = new UserStatus[status.length];
803+ System.arraycopy(status, 0, users, 0, status.length);
804+ return users;
805+ }
799806 }
--- chaplet/trunk/src/core/jp/sf/chaplet/ConfigLoader.java (revision 34)
+++ chaplet/trunk/src/core/jp/sf/chaplet/ConfigLoader.java (revision 35)
@@ -15,7 +15,6 @@
1515 import java.io.InputStream;
1616 import java.util.ArrayList;
1717 import java.util.HashMap;
18-import java.util.Iterator;
1918 import java.util.Properties;
2019 import java.util.jar.Attributes;
2120 import java.util.jar.JarFile;
@@ -260,8 +259,7 @@
260259 * プラグインオブジェクトをインスタンス化する。
261260 */
262261 void instansiatePlugins(){
263- for(Iterator iter = conf.pluginIterator(); iter.hasNext();){
264- Plugin plugin = (Plugin) iter.next();
262+ for(Plugin plugin : conf.getPlugins()){
265263 try {
266264 plugin.instansiate();
267265 } catch (Exception e) {
Show on old repository browser