Mercurial > hg > Database > jungle-network
comparison src/jungle/test/codesegment/practice/TestPutAttributeCodeSegment.java @ 26:1d7f52c3b3d9
fix variables name
author | one |
---|---|
date | Mon, 01 Jul 2013 04:16:03 +0900 |
parents | 2232263d449b |
children |
comparison
equal
deleted
inserted
replaced
25:2232263d449b | 26:1d7f52c3b3d9 |
---|---|
36 } | 36 } |
37 | 37 |
38 | 38 |
39 public void run() { | 39 public void run() { |
40 System.out.println("--TestPutAttributeCodeSegment--"); | 40 System.out.println("--TestPutAttributeCodeSegment--"); |
41 System.out.println("type = " + arg1.type); | |
42 System.out.println("index = " + arg1.index); | |
43 System.out.println("data = " + arg1.getVal()); | |
44 System.out.println(((Value)arg1.getVal()).getType()); | |
45 | |
46 DefaultTreeOperationContainer convertedOpContainer = arg1.asClass(DefaultTreeOperationContainer.class); | 41 DefaultTreeOperationContainer convertedOpContainer = arg1.asClass(DefaultTreeOperationContainer.class); |
47 TreeOperation convertedOp = null; | 42 TreeOperation convertedOp = null; |
48 try { | 43 try { |
49 convertedOp = convertedOpContainer.convert(); | 44 convertedOp = convertedOpContainer.convert(); |
50 } catch (IOException e) { | 45 } catch (IOException e) { |
51 e.printStackTrace(); | 46 e.printStackTrace(); |
52 } | 47 } |
53 Jungle jungle = new JungleManager().getJungle(); | 48 Jungle jungle = new JungleManager().getJungle(); |
54 JungleTree tree = jungle.getTreeByName("tree"); | 49 JungleTree tree = jungle.getTreeByName("tree"); |
55 JungleTreeEditor ed = tree.getTreeEditor(); | 50 JungleTreeEditor editor = tree.getTreeEditor(); |
56 DefaultNodePath root = new DefaultNodePath(); | 51 DefaultNodePath root = new DefaultNodePath(); |
57 Either<Error,JungleTreeEditor> r = ed.addNewChildAt(root, 0); | 52 Either<Error,JungleTreeEditor> either = editor.addNewChildAt(root, 0); |
58 if(r.isA()) { | |
59 throw new IllegalStateException(); | |
60 } | |
61 ed = r.b(); | |
62 ed.success(); | |
63 | |
64 | |
65 | |
66 NetworkDefaultJungleTreeEditor nEditor = (NetworkDefaultJungleTreeEditor) tree.getTreeEditor(); | |
67 Either<Error,JungleTreeEditor> either = edit(nEditor, convertedOp); | |
68 if(either.isA()) { | 53 if(either.isA()) { |
69 throw new IllegalStateException(); | 54 throw new IllegalStateException(); |
70 } | 55 } |
71 JungleTreeEditor editor = either.b(); | 56 editor = either.b(); |
57 editor.success(); | |
58 NetworkDefaultJungleTreeEditor nEditor = (NetworkDefaultJungleTreeEditor) tree.getTreeEditor(); | |
59 either = edit(nEditor, convertedOp); | |
60 if(either.isA()) { | |
61 throw new IllegalStateException(); | |
62 } | |
63 editor = either.b(); | |
72 editor.success(); | 64 editor.success(); |
73 if (arg1.index >= 10) { | 65 if (arg1.index >= 10) { |
74 new ShowAttribute(); | 66 new ShowAttribute(); |
75 ods.update("local","show",1); | 67 ods.update("local","show",1); |
76 } else { | 68 } else { |