tecscde 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rubocop.yml +125 -0
- data/.rubocop_todo.yml +188 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +6 -0
- data/LICENSE +46 -0
- data/LICENSE.ja +32 -0
- data/README.ja.md +200 -0
- data/README.md +35 -0
- data/Rakefile +27 -0
- data/bin/tecscde +64 -0
- data/glade/tecscde-cell-property.glade +205 -0
- data/glade/tecscde-celltype-property.glade +172 -0
- data/glade/tecscde-celltype.glade +414 -0
- data/glade/tecscde-export.glade +161 -0
- data/glade/test-cell-plugin.rb +51 -0
- data/glade/test-cell-property.rb +35 -0
- data/glade/test-export.rb +35 -0
- data/glade/test-palette.rb +26 -0
- data/lib/tcflow.rb +148 -0
- data/lib/tecscde.rb +65 -0
- data/lib/tecscde/NewCell.png +0 -0
- data/lib/tecscde/SelectArrow.png +0 -0
- data/lib/tecscde/attr_tree_view.rb +253 -0
- data/lib/tecscde/cell_plugin_dialog.glade +294 -0
- data/lib/tecscde/cell_plugin_dialog.rb +89 -0
- data/lib/tecscde/celltype_tree_view.rb +105 -0
- data/lib/tecscde/change_set_control.rb +35 -0
- data/lib/tecscde/change_set_control/change_set.rb +32 -0
- data/lib/tecscde/change_set_control/change_set_manager.rb +62 -0
- data/lib/tecscde/command.rb +35 -0
- data/lib/tecscde/control.rb +491 -0
- data/lib/tecscde/highlighted_objects.rb +180 -0
- data/lib/tecscde/logger.rb +74 -0
- data/lib/tecscde/main_view_and_model.rb +80 -0
- data/lib/tecscde/palette.glade +553 -0
- data/lib/tecscde/palette.rb +174 -0
- data/lib/tecscde/preferences.glade +117 -0
- data/lib/tecscde/preferences.rb +44 -0
- data/lib/tecscde/tecs_model.rb +1137 -0
- data/lib/tecscde/tecs_model/hbar.rb +68 -0
- data/lib/tecscde/tecs_model/tm_c_port.rb +122 -0
- data/lib/tecscde/tecs_model/tm_c_port_array.rb +98 -0
- data/lib/tecscde/tecs_model/tm_cell.rb +496 -0
- data/lib/tecscde/tecs_model/tm_e_port.rb +126 -0
- data/lib/tecscde/tecs_model/tm_e_port_array.rb +78 -0
- data/lib/tecscde/tecs_model/tm_join.rb +293 -0
- data/lib/tecscde/tecs_model/tm_join_bar.rb +146 -0
- data/lib/tecscde/tecs_model/tm_port.rb +238 -0
- data/lib/tecscde/tecs_model/tm_port_array.rb +246 -0
- data/lib/tecscde/tecs_model/tm_region.rb +107 -0
- data/lib/tecscde/tecs_model/tm_uneditable.rb +68 -0
- data/lib/tecscde/tecs_model/vbar.rb +68 -0
- data/lib/tecscde/templates/_cell_info.cde.erb +15 -0
- data/lib/tecscde/templates/_join_info.cde.erb +28 -0
- data/lib/tecscde/templates/main.cde.erb +49 -0
- data/lib/tecscde/tm_object.rb +91 -0
- data/lib/tecscde/version.rb +4 -0
- data/lib/tecscde/view.rb +58 -0
- data/lib/tecscde/view/cairo_matrix.rb +90 -0
- data/lib/tecscde/view/canvas.rb +59 -0
- data/lib/tecscde/view/constants.rb +114 -0
- data/lib/tecscde/view/main_view.rb +1245 -0
- data/lib/tecsflow.rb +475 -0
- data/lib/tecsflow/C_parser.tab.rb +2471 -0
- data/lib/tecsflow/C_parser.y.rb +1087 -0
- data/lib/tecsflow/classes.rb +421 -0
- data/lib/tecsgen.rb +581 -0
- data/lib/tecsgen/core/C_parser.tab.rb +2477 -0
- data/lib/tecsgen/core/C_parser.y +1032 -0
- data/lib/tecsgen/core/bnf-deb.tab.rb +5193 -0
- data/lib/tecsgen/core/bnf.tab.rb +5193 -0
- data/lib/tecsgen/core/bnf.y +2211 -0
- data/lib/tecsgen/core/componentobj.rb +7901 -0
- data/lib/tecsgen/core/ctypes.rb +226 -0
- data/lib/tecsgen/core/expression.rb +1031 -0
- data/lib/tecsgen/core/gen_xml.rb +374 -0
- data/lib/tecsgen/core/generate.rb +5206 -0
- data/lib/tecsgen/core/location.rb +116 -0
- data/lib/tecsgen/core/messages.rb +101 -0
- data/lib/tecsgen/core/optimize.rb +456 -0
- data/lib/tecsgen/core/plugin.rb +332 -0
- data/lib/tecsgen/core/pluginModule.rb +165 -0
- data/lib/tecsgen/core/syntaxobj.rb +1234 -0
- data/lib/tecsgen/core/tecs_lang.rb +306 -0
- data/lib/tecsgen/core/tecsgen.rb +453 -0
- data/lib/tecsgen/core/tecsinfo.rb +860 -0
- data/lib/tecsgen/core/tool_info.rb +258 -0
- data/lib/tecsgen/core/types.rb +1632 -0
- data/lib/tecsgen/core/unjoin_plugin.rb +218 -0
- data/lib/tecsgen/core/value.rb +650 -0
- data/lib/tecsgen/messages/messages_console_en_US.rb +1171 -0
- data/lib/tecsgen/messages/messages_console_ja_JP.rb +1171 -0
- data/lib/tecsgen/messages/messages_file_en_US.rb +334 -0
- data/lib/tecsgen/messages/messages_file_ja_JP.rb +163 -0
- data/lib/tecsgen/plugin/ATK1AlarmPlugin.rb +196 -0
- data/lib/tecsgen/plugin/ATK1DelayTaskPlugin.rb +106 -0
- data/lib/tecsgen/plugin/ATK1EventPlugin.rb +147 -0
- data/lib/tecsgen/plugin/ATK1ISRPlugin.rb +174 -0
- data/lib/tecsgen/plugin/ATK1KernelPlugin.rb +287 -0
- data/lib/tecsgen/plugin/ATK1ResourcePlugin.rb +124 -0
- data/lib/tecsgen/plugin/ATK1TaskPlugin.rb +220 -0
- data/lib/tecsgen/plugin/C2TECSBridgePlugin.rb +210 -0
- data/lib/tecsgen/plugin/CellPlugin.rb +61 -0
- data/lib/tecsgen/plugin/CelltypePlugin.rb +72 -0
- data/lib/tecsgen/plugin/CompositePlugin.rb +66 -0
- data/lib/tecsgen/plugin/DomainPlugin.rb +89 -0
- data/lib/tecsgen/plugin/HRP2AlarmHandlerPlugin.rb +76 -0
- data/lib/tecsgen/plugin/HRP2Cache.rb +1 -0
- data/lib/tecsgen/plugin/HRP2CyclicHandlerPlugin.rb +75 -0
- data/lib/tecsgen/plugin/HRP2DataqueuePlugin.rb +68 -0
- data/lib/tecsgen/plugin/HRP2EventflagPlugin.rb +68 -0
- data/lib/tecsgen/plugin/HRP2FixedSizeMemoryPoolPlugin.rb +68 -0
- data/lib/tecsgen/plugin/HRP2HandlerPlugin.rb +117 -0
- data/lib/tecsgen/plugin/HRP2KernelObjectPlugin.rb +372 -0
- data/lib/tecsgen/plugin/HRP2ObjectPlugin.rb +94 -0
- data/lib/tecsgen/plugin/HRP2Plugin.rb +140 -0
- data/lib/tecsgen/plugin/HRP2PostHook.rb +111 -0
- data/lib/tecsgen/plugin/HRP2PriorityDataqueuePlugin.rb +66 -0
- data/lib/tecsgen/plugin/HRP2RPCPlugin.rb +319 -0
- data/lib/tecsgen/plugin/HRP2SVCPlugin.rb +473 -0
- data/lib/tecsgen/plugin/HRP2SemaphorePlugin.rb +67 -0
- data/lib/tecsgen/plugin/HRP2TaskPlugin.rb +200 -0
- data/lib/tecsgen/plugin/HRPHandlerPlugin.rb +125 -0
- data/lib/tecsgen/plugin/HRPKernelObjectManager.rb +72 -0
- data/lib/tecsgen/plugin/HRPKernelObjectPlugin.rb +333 -0
- data/lib/tecsgen/plugin/HRPObjectPlugin.rb +93 -0
- data/lib/tecsgen/plugin/HRPPlugin.rb +356 -0
- data/lib/tecsgen/plugin/HRPRPCPlugin.rb +407 -0
- data/lib/tecsgen/plugin/HRPSVCPlugin.rb +859 -0
- data/lib/tecsgen/plugin/HRPTaskPlugin.rb +107 -0
- data/lib/tecsgen/plugin/Mruby2CBridgePlugin.rb +86 -0
- data/lib/tecsgen/plugin/MrubyBridgeCellPlugin.rb +264 -0
- data/lib/tecsgen/plugin/MrubyBridgeCelltypePlugin.rb +293 -0
- data/lib/tecsgen/plugin/MrubyBridgeCompositePlugin.rb +49 -0
- data/lib/tecsgen/plugin/MrubyBridgePlugin.rb +67 -0
- data/lib/tecsgen/plugin/MrubyBridgeSignaturePlugin.rb +1307 -0
- data/lib/tecsgen/plugin/MrubyInfoBridgePlugin.rb +14 -0
- data/lib/tecsgen/plugin/MrubyInfoBridgeSignaturePlugin.rb +994 -0
- data/lib/tecsgen/plugin/MultiPlugin.rb +57 -0
- data/lib/tecsgen/plugin/NotifierPlugin.rb +1217 -0
- data/lib/tecsgen/plugin/OpaqueMarshalerPlugin.rb +81 -0
- data/lib/tecsgen/plugin/OpaqueRPCPlugin.rb +323 -0
- data/lib/tecsgen/plugin/RPCPlugin.rb +266 -0
- data/lib/tecsgen/plugin/RepeatCellPlugin.rb +166 -0
- data/lib/tecsgen/plugin/RepeatJoinPlugin.rb +130 -0
- data/lib/tecsgen/plugin/SharedOpaqueRPCPlugin.rb +357 -0
- data/lib/tecsgen/plugin/SharedRPCPlugin.rb +329 -0
- data/lib/tecsgen/plugin/SignaturePlugin.rb +77 -0
- data/lib/tecsgen/plugin/TECS2CBridgePlugin.rb +178 -0
- data/lib/tecsgen/plugin/TECSInfoPlugin.rb +280 -0
- data/lib/tecsgen/plugin/ThroughPlugin.rb +333 -0
- data/lib/tecsgen/plugin/TracePlugin.rb +484 -0
- data/lib/tecsgen/plugin/lib/GenHRP2Marshaler.rb +761 -0
- data/lib/tecsgen/plugin/lib/GenOpaqueMarshaler.rb +1107 -0
- data/lib/tecsgen/plugin/lib/GenParamCopy.rb +365 -0
- data/lib/tecsgen/plugin/lib/GenTransparentMarshaler.rb +683 -0
- data/lib/tecsgen/plugin/lib/MrubyBridgeCelltypePluginModule.rb +283 -0
- data/lib/tecsgen/plugin/lib/MrubyBridgeSignaturePluginModule.rb +277 -0
- data/lib/tecsgen/version.rb +6 -0
- data/samples/FigureSamples/active/active.cde +104 -0
- data/samples/FigureSamples/active/active.cdl +20 -0
- data/samples/FigureSamples/active/active.pdf +0 -0
- data/samples/FigureSamples/active/active.png +0 -0
- data/samples/FigureSamples/active/gen/tmp_C_src.c +36 -0
- data/samples/FigureSamples/active/gen/tmp_cygwin_tecs.h +1908 -0
- data/samples/FigureSamples/active/gen/tmp_plugin_post_code.cdl +0 -0
- data/samples/FigureSamples/allocator/allocator-internal.png +0 -0
- data/samples/FigureSamples/allocator/allocator.cde +171 -0
- data/samples/FigureSamples/allocator/allocator.cdl +58 -0
- data/samples/FigureSamples/allocator/allocator.png +0 -0
- data/samples/FigureSamples/basic/Makefile +87 -0
- data/samples/FigureSamples/basic/SimpleSample-trace.cdl +50 -0
- data/samples/FigureSamples/basic/SimpleSample.cde +91 -0
- data/samples/FigureSamples/basic/SimpleSample.cdl +47 -0
- data/samples/FigureSamples/basic/basic.cde +93 -0
- data/samples/FigureSamples/basic/basic.cdl +46 -0
- data/samples/FigureSamples/basic/basic.png +0 -0
- data/samples/FigureSamples/callback/callback.cde +130 -0
- data/samples/FigureSamples/callback/callback.cdl +29 -0
- data/samples/FigureSamples/callback/callback.png +0 -0
- data/samples/FigureSamples/carray/carray.cde +144 -0
- data/samples/FigureSamples/carray/carray.cdl +38 -0
- data/samples/FigureSamples/carray/carray.png +0 -0
- data/samples/FigureSamples/cearray/cearray.cde +314 -0
- data/samples/FigureSamples/cearray/cearray.cdl +60 -0
- data/samples/FigureSamples/cearray/cearray.png +0 -0
- data/samples/FigureSamples/composite/composite-internal.png +0 -0
- data/samples/FigureSamples/composite/composite.cde +216 -0
- data/samples/FigureSamples/composite/composite.cdl +95 -0
- data/samples/FigureSamples/composite/composite.png +0 -0
- data/samples/FigureSamples/earray/earray.cde +142 -0
- data/samples/FigureSamples/earray/earray.cdl +38 -0
- data/samples/FigureSamples/earray/earray.png +0 -0
- data/samples/FigureSamples/join/Makefile +87 -0
- data/samples/FigureSamples/join/join.cde +132 -0
- data/samples/FigureSamples/join/join.cdl +40 -0
- data/samples/FigureSamples/join/join.png +0 -0
- data/samples/FigureSamples/relay/Makefile +99 -0
- data/samples/FigureSamples/relay/relay-internal.png +0 -0
- data/samples/FigureSamples/relay/relay.cde +284 -0
- data/samples/FigureSamples/relay/relay.cdl +52 -0
- data/samples/FigureSamples/relay/relay.png +0 -0
- data/samples/FigureSamples/rpc/Makefile +123 -0
- data/samples/FigureSamples/rpc/rpc-expand.png +0 -0
- data/samples/FigureSamples/rpc/rpc.cde +245 -0
- data/samples/FigureSamples/rpc/rpc.png +0 -0
- data/samples/FigureSamples/rpc/rpc_sample.cdl +53 -0
- data/samples/SimpleSample/Makefile +25 -0
- data/samples/SimpleSample/SimpleSample/Makefile +86 -0
- data/samples/SimpleSample/SimpleSample/Makefile-trace +91 -0
- data/samples/SimpleSample/SimpleSample/README.txt +106 -0
- data/samples/SimpleSample/SimpleSample/SimpleSample-trace.cdl +50 -0
- data/samples/SimpleSample/SimpleSample/SimpleSample.cdl +45 -0
- data/samples/SimpleSample/SimpleSample/src/tSample.c +77 -0
- data/samples/SimpleSample/SimpleSample/src/tSimple.c +48 -0
- data/samples/SimpleSample/SimpleSample/src/tecs-types.h +27 -0
- data/samples/SimpleSample/SimpleSampleOpaqueRPC/Makefile +51 -0
- data/samples/SimpleSample/SimpleSampleOpaqueRPC/Makefile-trace +91 -0
- data/samples/SimpleSample/SimpleSampleOpaqueRPC/README.txt +106 -0
- data/samples/SimpleSample/SimpleSampleOpaqueRPC/SimpleSample-trace.cdl +80 -0
- data/samples/SimpleSample/SimpleSampleOpaqueRPC/SimpleSample.cdl +77 -0
- data/samples/SimpleSample/SimpleSampleOpaqueRPC/rSample/Makefile +112 -0
- data/samples/SimpleSample/SimpleSampleOpaqueRPC/rSimple/Makefile +109 -0
- data/samples/SimpleSample/SimpleSampleOpaqueRPC/src/tSample.c +80 -0
- data/samples/SimpleSample/SimpleSampleOpaqueRPC/src/tSimple.c +47 -0
- data/samples/SimpleSample/SimpleSampleOpaqueRPC/src/tTaskMain.c +66 -0
- data/samples/SimpleSample/SimpleSampleOpaqueRPC/src/tecs-types.h +27 -0
- data/samples/SimpleSample/SimpleSampleTransparentRPC/Makefile +125 -0
- data/samples/SimpleSample/SimpleSampleTransparentRPC/Makefile-trace +130 -0
- data/samples/SimpleSample/SimpleSampleTransparentRPC/SimpleSample-trace.cdl +54 -0
- data/samples/SimpleSample/SimpleSampleTransparentRPC/SimpleSample.cdl +53 -0
- data/samples/SimpleSample/SimpleSampleTransparentRPC/src/tSample.c +80 -0
- data/samples/SimpleSample/SimpleSampleTransparentRPC/src/tSimple.c +54 -0
- data/tecscde.gemspec +41 -0
- metadata +353 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# まずは決まり文句
|
|
2
|
+
require "gtk2"
|
|
3
|
+
|
|
4
|
+
builder = Gtk::Builder.new
|
|
5
|
+
builder.add_from_file(File.expand_path(File.join(__dir__, "../lib/tecscde/cell_plugin_dialog.glade"))) # 読み込むgladeファイルを指定
|
|
6
|
+
|
|
7
|
+
# p builder
|
|
8
|
+
# p builder.objects
|
|
9
|
+
|
|
10
|
+
# 後で処理を書くウィジェットは下のような形で、変数に代入しておくのよ
|
|
11
|
+
main_window = builder["dialog_cell_plugin"]
|
|
12
|
+
# @btn_quit = builder["quit"]
|
|
13
|
+
label_cell_name = builder["label_cell_name"]
|
|
14
|
+
|
|
15
|
+
builder.objects.each{|obj|
|
|
16
|
+
p obj
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
COL_NAME = 0
|
|
20
|
+
COL_OPTION = 1
|
|
21
|
+
|
|
22
|
+
plugin_list = builder["treeview_plugin_list"]
|
|
23
|
+
liststore = Gtk::ListStore.new(String, String)
|
|
24
|
+
plugin_list.set_model(liststore)
|
|
25
|
+
|
|
26
|
+
# create renderer for text
|
|
27
|
+
renderer = Gtk::CellRendererText.new
|
|
28
|
+
|
|
29
|
+
# set column information
|
|
30
|
+
col = Gtk::TreeViewColumn.new("Plugin", renderer, :text => COL_NAME)
|
|
31
|
+
plugin_list.append_column(col)
|
|
32
|
+
|
|
33
|
+
col = Gtk::TreeViewColumn.new("Option", renderer, :text => COL_OPTION)
|
|
34
|
+
plugin_list.append_column(col)
|
|
35
|
+
|
|
36
|
+
liststore.set_sort_column_id(COL_NAME)
|
|
37
|
+
|
|
38
|
+
# ウィンドウのクローズボタンが押されたら終了
|
|
39
|
+
main_window.signal_connect("destroy") do
|
|
40
|
+
Gtk.main_quit
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# 終了ボタンがクリックされたら終了
|
|
44
|
+
# btn_quit.signal_connect("clicked") do
|
|
45
|
+
# Gtk.main_quit
|
|
46
|
+
# end
|
|
47
|
+
|
|
48
|
+
# メインウィンドウの表示
|
|
49
|
+
main_window.show_all
|
|
50
|
+
|
|
51
|
+
Gtk.main
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#! /usr/bin/ruby
|
|
2
|
+
|
|
3
|
+
p __FILE__
|
|
4
|
+
|
|
5
|
+
# まずは決まり文句
|
|
6
|
+
require "gtk2"
|
|
7
|
+
p 0
|
|
8
|
+
|
|
9
|
+
builder = Gtk::Builder.new
|
|
10
|
+
builder.add_from_file("tecscde-cell-property.glade") # 読み込むgladeファイルを指定
|
|
11
|
+
|
|
12
|
+
p 1
|
|
13
|
+
# p builder
|
|
14
|
+
# p builder.objects
|
|
15
|
+
|
|
16
|
+
# 後で処理を書くウィジェットは下のような形で、変数に代入しておくのよ
|
|
17
|
+
main_window = builder["dialog_cell_property"]
|
|
18
|
+
|
|
19
|
+
p 2
|
|
20
|
+
# ウィンドウのクローズボタンが押されたら終了
|
|
21
|
+
main_window.signal_connect("destroy") do
|
|
22
|
+
Gtk.main_quit
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# 終了ボタンがクリックされたら終了
|
|
26
|
+
# btn_quit.signal_connect("clicked") do
|
|
27
|
+
# Gtk.main_quit
|
|
28
|
+
# end
|
|
29
|
+
|
|
30
|
+
p 3
|
|
31
|
+
# メインウィンドウの表示
|
|
32
|
+
main_window.show_all
|
|
33
|
+
|
|
34
|
+
p 4
|
|
35
|
+
Gtk.main
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#! /usr/bin/ruby
|
|
2
|
+
|
|
3
|
+
p __FILE__
|
|
4
|
+
|
|
5
|
+
# まずは決まり文句
|
|
6
|
+
require "gtk2"
|
|
7
|
+
p 0
|
|
8
|
+
|
|
9
|
+
builder = Gtk::Builder.new
|
|
10
|
+
builder.add_from_file("tecscde-export.glade") # 読み込むgladeファイルを指定
|
|
11
|
+
|
|
12
|
+
p 1
|
|
13
|
+
# p builder
|
|
14
|
+
# p builder.objects
|
|
15
|
+
|
|
16
|
+
# 後で処理を書くウィジェットは下のような形で、変数に代入しておくのよ
|
|
17
|
+
main_window = builder["dialog_export"]
|
|
18
|
+
|
|
19
|
+
p 2
|
|
20
|
+
# ウィンドウのクローズボタンが押されたら終了
|
|
21
|
+
main_window.signal_connect("destroy") do
|
|
22
|
+
Gtk.main_quit
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# 終了ボタンがクリックされたら終了
|
|
26
|
+
# btn_quit.signal_connect("clicked") do
|
|
27
|
+
# Gtk.main_quit
|
|
28
|
+
# end
|
|
29
|
+
|
|
30
|
+
p 3
|
|
31
|
+
# メインウィンドウの表示
|
|
32
|
+
main_window.show_all
|
|
33
|
+
|
|
34
|
+
p 4
|
|
35
|
+
Gtk.main
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# まずは決まり文句
|
|
2
|
+
require "gtk2"
|
|
3
|
+
|
|
4
|
+
builder = Gtk::Builder.new
|
|
5
|
+
builder.add_from_file(File.expand_path("../lib/tecscde/palette.glade", __dir__)) # 読み込むgladeファイルを指定
|
|
6
|
+
|
|
7
|
+
# p builder
|
|
8
|
+
# p builder.objects
|
|
9
|
+
|
|
10
|
+
# 後で処理を書くウィジェットは下のような形で、変数に代入しておくのよ
|
|
11
|
+
main_window = builder["window_palette"]
|
|
12
|
+
|
|
13
|
+
# ウィンドウのクローズボタンが押されたら終了
|
|
14
|
+
main_window.signal_connect("destroy") do
|
|
15
|
+
Gtk.main_quit
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# 終了ボタンがクリックされたら終了
|
|
19
|
+
# btn_quit.signal_connect("clicked") do
|
|
20
|
+
# Gtk.main_quit
|
|
21
|
+
# end
|
|
22
|
+
|
|
23
|
+
# メインウィンドウの表示
|
|
24
|
+
main_window.show_all
|
|
25
|
+
|
|
26
|
+
Gtk.main
|
data/lib/tcflow.rb
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
#
|
|
4
|
+
# TCFlow
|
|
5
|
+
# Clanguage flow analyzer
|
|
6
|
+
#
|
|
7
|
+
# Copyright (C) 2008-2019 by TOPPERS Project
|
|
8
|
+
#--
|
|
9
|
+
# 上記著作権者は,以下の(1)〜(4)の条件を満たす場合に限り,本ソフトウェ
|
|
10
|
+
# ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改
|
|
11
|
+
# 変・再配布(以下,利用と呼ぶ)することを無償で許諾する.
|
|
12
|
+
# (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
|
|
13
|
+
# 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
|
|
14
|
+
# スコード中に含まれていること.
|
|
15
|
+
# (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
|
|
16
|
+
# 用できる形で再配布する場合には,再配布に伴うドキュメント(利用
|
|
17
|
+
# 者マニュアルなど)に,上記の著作権表示,この利用条件および下記
|
|
18
|
+
# の無保証規定を掲載すること.
|
|
19
|
+
# (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
|
|
20
|
+
# 用できない形で再配布する場合には,次のいずれかの条件を満たすこ
|
|
21
|
+
# と.
|
|
22
|
+
# (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著
|
|
23
|
+
# 作権表示,この利用条件および下記の無保証規定を掲載すること.
|
|
24
|
+
# (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに
|
|
25
|
+
# 報告すること.
|
|
26
|
+
# (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
|
|
27
|
+
# 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること.
|
|
28
|
+
# また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理
|
|
29
|
+
# 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを
|
|
30
|
+
# 免責すること.
|
|
31
|
+
#
|
|
32
|
+
# 本ソフトウェアは,無保証で提供されているものである.上記著作権者お
|
|
33
|
+
# よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的
|
|
34
|
+
# に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ
|
|
35
|
+
# アの利用により直接的または間接的に生じたいかなる損害に関しても,そ
|
|
36
|
+
# の責任を負わない.
|
|
37
|
+
#
|
|
38
|
+
# $Id: bnf.y.rb 2850 2018-04-01 12:38:45Z okuma-top $
|
|
39
|
+
#++
|
|
40
|
+
|
|
41
|
+
require 'optparse'
|
|
42
|
+
require_relative "flowlib/classes.rb"
|
|
43
|
+
|
|
44
|
+
$exe_name="tcflow"
|
|
45
|
+
$version="V1.0.0.1"
|
|
46
|
+
$cpp_cmd=nil
|
|
47
|
+
$b_version=false
|
|
48
|
+
$b_summarize = false
|
|
49
|
+
$b_list = false
|
|
50
|
+
$gen_dir = "gen"
|
|
51
|
+
$read_dump = false
|
|
52
|
+
$b_print_all_token = false
|
|
53
|
+
###$debug = true
|
|
54
|
+
begin
|
|
55
|
+
|
|
56
|
+
ARGV.options {|parser|
|
|
57
|
+
parser.banner = "Usage: tcflow [options] files"
|
|
58
|
+
parser.on('-c', '--cpp=cpp_cmd', 'C pre-processor command, if not specified cpp not invoked, ex) "-cpp_cmd=cl /E -I include_path"' ){
|
|
59
|
+
|arg|
|
|
60
|
+
$cpp_cmd = arg
|
|
61
|
+
}
|
|
62
|
+
parser.on('-l', '--list', 'list all functions') {
|
|
63
|
+
$b_list = true
|
|
64
|
+
}
|
|
65
|
+
parser.on('-s', '--summarize', 'summarize for top functions') {
|
|
66
|
+
$b_summarize = true
|
|
67
|
+
}
|
|
68
|
+
parser.on( "-g", "--gen=dir", "generate dir"){ |arg|
|
|
69
|
+
$gen_dir = arg
|
|
70
|
+
}
|
|
71
|
+
parser.on( "-r", "--read-rbdmp", "read ruby dump"){
|
|
72
|
+
$read_dump = true
|
|
73
|
+
}
|
|
74
|
+
parser.on( "-t", "--print-all-token", "print all token"){
|
|
75
|
+
$b_print_all_token = true
|
|
76
|
+
}
|
|
77
|
+
parser.version = "#{$version}"
|
|
78
|
+
parser.release = nil
|
|
79
|
+
parser.parse!
|
|
80
|
+
}
|
|
81
|
+
if ARGV.empty? && $read_dump == false
|
|
82
|
+
ARGV.options{|parser|
|
|
83
|
+
puts "#{$exe_name} : #{$version}"
|
|
84
|
+
puts parser.help
|
|
85
|
+
exit 1
|
|
86
|
+
}
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# $file = open("#{$gen_dir}/FlowC.txt", "w") ##
|
|
90
|
+
|
|
91
|
+
if $read_dump then
|
|
92
|
+
TCFlow::Function.load_funclist "#{$gen_dir}/tcflow.rbdmp"
|
|
93
|
+
else
|
|
94
|
+
require_relative "flowlib/C_parser.tab.rb"
|
|
95
|
+
STDERR.puts "#{$exe_name} : #{$version}"
|
|
96
|
+
ARGV.each{ |file|
|
|
97
|
+
|
|
98
|
+
if /\@(.*)/ =~ file
|
|
99
|
+
file_list = []
|
|
100
|
+
begin
|
|
101
|
+
File.open( $1, "r" ).each{ |f|
|
|
102
|
+
if /^\s*#/ =~ f
|
|
103
|
+
next
|
|
104
|
+
end
|
|
105
|
+
f.strip!
|
|
106
|
+
if f != ""
|
|
107
|
+
file_list << f
|
|
108
|
+
end
|
|
109
|
+
}
|
|
110
|
+
rescue
|
|
111
|
+
STDERR.print "faile to open #{file}"
|
|
112
|
+
exit 1
|
|
113
|
+
end
|
|
114
|
+
else
|
|
115
|
+
file_list = [ file ]
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
file_list.each{ |f|
|
|
119
|
+
# C 言語のパーサインスタンスを生成
|
|
120
|
+
c_parser = TCFLOW_Cparser.new
|
|
121
|
+
|
|
122
|
+
# パース
|
|
123
|
+
c_parser.parse( [ f ], $cpp_cmd )
|
|
124
|
+
|
|
125
|
+
# 終期化
|
|
126
|
+
c_parser.finalize
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
TCFlow::Function.dump_funclist "#{$gen_dir}/tcflow.rbdmp"
|
|
130
|
+
# if $b_summarize
|
|
131
|
+
# TCFlow::Function.print_summarize
|
|
132
|
+
# else
|
|
133
|
+
# TCFlow::Function.print_all_functions
|
|
134
|
+
# end
|
|
135
|
+
|
|
136
|
+
# if $b_list
|
|
137
|
+
# Function.list_all_functions
|
|
138
|
+
# end
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
rescue Exception => evar
|
|
142
|
+
# "stack level too deep" が exerb 版では、表示されなかった。非 exerb 版を利用すべし。
|
|
143
|
+
STDERR.print "fatal error: " + evar.to_s + "\n"
|
|
144
|
+
# "stack level too deep" の場合、大量に表示されるので、コメントアウトしてある
|
|
145
|
+
# p $@
|
|
146
|
+
# ensure
|
|
147
|
+
# $file.close
|
|
148
|
+
end
|
data/lib/tecscde.rb
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
require "gtk2"
|
|
2
|
+
|
|
3
|
+
require "tecscde/version"
|
|
4
|
+
require "tecscde/main_view_and_model"
|
|
5
|
+
|
|
6
|
+
module TECSCDE
|
|
7
|
+
class Error < StandardError; end
|
|
8
|
+
|
|
9
|
+
#=== TECSCDE.message_box
|
|
10
|
+
# Function to open a dialog box displaying the message provided.
|
|
11
|
+
# ok_yn_okcan::
|
|
12
|
+
# RETURN
|
|
13
|
+
def self.message_box(message, ok_yn_okcan)
|
|
14
|
+
dialog = Gtk::Dialog.new("Message",
|
|
15
|
+
nil,
|
|
16
|
+
nil,
|
|
17
|
+
[Gtk::Stock::OK, Gtk::Dialog::RESPONSE_OK])
|
|
18
|
+
|
|
19
|
+
dialog.vbox.add(Gtk::Label.new(message))
|
|
20
|
+
dialog.show_all
|
|
21
|
+
|
|
22
|
+
res = nil
|
|
23
|
+
dialog.run do |response|
|
|
24
|
+
res = response
|
|
25
|
+
end
|
|
26
|
+
dialog.destroy
|
|
27
|
+
res
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def self.confirm?(message, parent = nil)
|
|
31
|
+
dialog = Gtk::Dialog.new(
|
|
32
|
+
"Confirm",
|
|
33
|
+
parent,
|
|
34
|
+
Gtk::Dialog::Flags::MODAL | Gtk::Dialog::Flags::DESTROY_WITH_PARENT,
|
|
35
|
+
[Gtk::Stock::OK, Gtk::ResponseType::OK],
|
|
36
|
+
[Gtk::Stock::CANCEL, Gtk::ResponseType::CANCEL]
|
|
37
|
+
)
|
|
38
|
+
dialog.vbox.add(Gtk::Label.new(message))
|
|
39
|
+
dialog.show_all
|
|
40
|
+
response = dialog.run
|
|
41
|
+
dialog.destroy
|
|
42
|
+
response == Gtk::ResponseType::OK
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def self.quit(model, parent = nil)
|
|
46
|
+
if model.modified?
|
|
47
|
+
if TECSCDE.confirm?("変更を保存せずに終了しますか?")
|
|
48
|
+
Gtk.main_quit
|
|
49
|
+
end
|
|
50
|
+
else
|
|
51
|
+
Gtk.main_quit
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def self.main(tecsgen)
|
|
56
|
+
MainViewAndModel.new(tecsgen)
|
|
57
|
+
Gtk.main
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def self.test
|
|
61
|
+
MainViewAndModel.new.test_main
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
require "tecscde/logger"
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
#
|
|
2
|
+
# TECSCDE - TECS Component Diagram Editor
|
|
3
|
+
#
|
|
4
|
+
# Copyright (C) 2014-2019 by TOPPERS Project
|
|
5
|
+
#
|
|
6
|
+
# The above copyright holders grant permission gratis to use,
|
|
7
|
+
# duplicate, modify, or redistribute (hereafter called use) this
|
|
8
|
+
# software (including the one made by modifying this software),
|
|
9
|
+
# provided that the following four conditions (1) through (4) are
|
|
10
|
+
# satisfied.
|
|
11
|
+
#
|
|
12
|
+
# (1) When this software is used in the form of source code, the above
|
|
13
|
+
# copyright notice, this use conditions, and the disclaimer shown
|
|
14
|
+
# below must be retained in the source code without modification.
|
|
15
|
+
#
|
|
16
|
+
# (2) When this software is redistributed in the forms usable for the
|
|
17
|
+
# development of other software, such as in library form, the above
|
|
18
|
+
# copyright notice, this use conditions, and the disclaimer shown
|
|
19
|
+
# below must be shown without modification in the document provided
|
|
20
|
+
# with the redistributed software, such as the user manual.
|
|
21
|
+
#
|
|
22
|
+
# (3) When this software is redistributed in the forms unusable for the
|
|
23
|
+
# development of other software, such as the case when the software
|
|
24
|
+
# is embedded in a piece of equipment, either of the following two
|
|
25
|
+
# conditions must be satisfied:
|
|
26
|
+
#
|
|
27
|
+
# (a) The above copyright notice, this use conditions, and the
|
|
28
|
+
# disclaimer shown below must be shown without modification in
|
|
29
|
+
# the document provided with the redistributed software, such as
|
|
30
|
+
# the user manual.
|
|
31
|
+
#
|
|
32
|
+
# (b) How the software is to be redistributed must be reported to the
|
|
33
|
+
# TOPPERS Project according to the procedure described
|
|
34
|
+
# separately.
|
|
35
|
+
#
|
|
36
|
+
# (4) The above copyright holders and the TOPPERS Project are exempt
|
|
37
|
+
# from responsibility for any type of damage directly or indirectly
|
|
38
|
+
# caused from the use of this software and are indemnified by any
|
|
39
|
+
# users or end users of this software from any and all causes of
|
|
40
|
+
# action whatsoever.
|
|
41
|
+
#
|
|
42
|
+
# THIS SOFTWARE IS PROVIDED "AS IS." THE ABOVE COPYRIGHT HOLDERS AND
|
|
43
|
+
# THE TOPPERS PROJECT DISCLAIM ANY EXPRESS OR IMPLIED WARRANTIES,
|
|
44
|
+
# INCLUDING, BUT NOT LIMITED TO, ITS APPLICABILITY TO A PARTICULAR
|
|
45
|
+
# PURPOSE. IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS AND THE
|
|
46
|
+
# TOPPERS PROJECT BE LIABLE FOR ANY TYPE OF DAMAGE DIRECTLY OR
|
|
47
|
+
# INDIRECTLY CAUSED FROM THE USE OF THIS SOFTWARE.
|
|
48
|
+
#
|
|
49
|
+
|
|
50
|
+
module TECSCDE
|
|
51
|
+
#== AttrTreeView: show cell list
|
|
52
|
+
# formerly this class is sub-class of Gtk::TreeView
|
|
53
|
+
# currently this class has Gtk::TreeView
|
|
54
|
+
class AttrTreeView
|
|
55
|
+
# @choice_list::{name=>ListStore}
|
|
56
|
+
# @cell::TmCell
|
|
57
|
+
# @ct_attr_list::{ String(attr_name) => String(initializer) }
|
|
58
|
+
# @view::TECSCDE::View::MainView
|
|
59
|
+
# @tree_view::Gtk::TreeView
|
|
60
|
+
|
|
61
|
+
COL_NAME = 0
|
|
62
|
+
COL_TYPE = 1
|
|
63
|
+
COL_VALUE = 2
|
|
64
|
+
|
|
65
|
+
attr_reader :tree_view # Gtk::TreeView
|
|
66
|
+
|
|
67
|
+
#=== initialize
|
|
68
|
+
def initialize(tree_view)
|
|
69
|
+
@tree_view = tree_view
|
|
70
|
+
|
|
71
|
+
combo_list = Gtk::ListStore.new(String)
|
|
72
|
+
iter = combo_list.append
|
|
73
|
+
iter[0] = "a0"
|
|
74
|
+
combo_list = Gtk::ListStore.new(String, String, String)
|
|
75
|
+
# iter = combo_list.append
|
|
76
|
+
# iter[0] = "a0"
|
|
77
|
+
# iter[1] = "b0"
|
|
78
|
+
# iter[2] = "c0"
|
|
79
|
+
# iter = combo_list.append
|
|
80
|
+
# iter[0] = "a1"
|
|
81
|
+
# iter[1] = "b1"
|
|
82
|
+
# iter[2] = "c1"
|
|
83
|
+
|
|
84
|
+
# combo_list2 = Gtk::ListStore.new(String, String, String)
|
|
85
|
+
# iter = combo_list2.append
|
|
86
|
+
# iter[0] = "A0"
|
|
87
|
+
# iter[1] = "B0"
|
|
88
|
+
# iter[2] = "C0"
|
|
89
|
+
# iter = combo_list2.append
|
|
90
|
+
# iter[0] = "A1"
|
|
91
|
+
# iter[1] = "B1"
|
|
92
|
+
# iter[2] = "C1"
|
|
93
|
+
|
|
94
|
+
# create data model
|
|
95
|
+
liststore = Gtk::ListStore.new(String, String, String)
|
|
96
|
+
|
|
97
|
+
# set data model to tree view(self)
|
|
98
|
+
@tree_view.set_model(liststore)
|
|
99
|
+
|
|
100
|
+
# create renderer for text
|
|
101
|
+
renderer = Gtk::CellRendererText.new
|
|
102
|
+
|
|
103
|
+
#----- set column information -----#
|
|
104
|
+
|
|
105
|
+
# ATTRIBUTE column
|
|
106
|
+
col = Gtk::TreeViewColumn.new("attribute", renderer, text: COL_NAME)
|
|
107
|
+
col.set_cell_data_func(renderer) do |_col, renderer, _model, iter|
|
|
108
|
+
if iter[COL_VALUE].nil? || iter[COL_VALUE] == ""
|
|
109
|
+
renderer.foreground = "red"
|
|
110
|
+
elsif @cell.editable?
|
|
111
|
+
renderer.foreground = "black"
|
|
112
|
+
else
|
|
113
|
+
renderer.foreground = "blue"
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
@tree_view.append_column(col)
|
|
117
|
+
|
|
118
|
+
# TYPE column
|
|
119
|
+
col = Gtk::TreeViewColumn.new("type", renderer, text: COL_TYPE)
|
|
120
|
+
col.set_cell_data_func(renderer) do |_col, renderer, _model, _iter|
|
|
121
|
+
if @cell.editable?
|
|
122
|
+
renderer.foreground = "black"
|
|
123
|
+
else
|
|
124
|
+
renderer.foreground = "blue"
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
@tree_view.append_column(col)
|
|
128
|
+
|
|
129
|
+
# VALUE column
|
|
130
|
+
renderer = Gtk::CellRendererCombo.new
|
|
131
|
+
renderer.text_column = 0
|
|
132
|
+
renderer.model = combo_list
|
|
133
|
+
col = Gtk::TreeViewColumn.new("value", renderer, text: COL_VALUE)
|
|
134
|
+
col.set_cell_data_func(renderer) do |_col, renderer, _model, iter|
|
|
135
|
+
# p "iter[0]=#{iter[0]}"
|
|
136
|
+
if @cell.get_attr_list[iter[COL_NAME].to_sym].nil?
|
|
137
|
+
renderer.foreground = "orange"
|
|
138
|
+
elsif @cell.editable?
|
|
139
|
+
renderer.foreground = "black"
|
|
140
|
+
else
|
|
141
|
+
renderer.foreground = "blue"
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if @cell.editable?
|
|
145
|
+
renderer.editable = true
|
|
146
|
+
else
|
|
147
|
+
renderer.editable = false
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if @choice_list[iter[0]]
|
|
151
|
+
renderer.model = @choice_list[iter[0]]
|
|
152
|
+
renderer.has_entry = false
|
|
153
|
+
renderer.text_column = 0
|
|
154
|
+
else
|
|
155
|
+
renderer.model = nil
|
|
156
|
+
renderer.text_column = 0
|
|
157
|
+
renderer.has_entry = true
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# if iter[2] && iter[2] != ""
|
|
161
|
+
# if iter[1] == "ID"
|
|
162
|
+
# renderer.model = combo_list
|
|
163
|
+
# renderer.has_entry = false
|
|
164
|
+
# renderer.text_column = 0
|
|
165
|
+
# elsif iter[1] == "SIZE"
|
|
166
|
+
# renderer.model = combo_list2
|
|
167
|
+
# renderer.has_entry = false
|
|
168
|
+
# renderer.text_column = 1
|
|
169
|
+
# elsif iter[1] == "PRI"
|
|
170
|
+
# renderer.model = combo_list
|
|
171
|
+
# renderer.has_entry = false
|
|
172
|
+
# renderer.text_column = 2
|
|
173
|
+
# else
|
|
174
|
+
# renderer.model = nil
|
|
175
|
+
# renderer.text_column = 0
|
|
176
|
+
# renderer.has_entry = true
|
|
177
|
+
# end
|
|
178
|
+
end
|
|
179
|
+
renderer.signal_connect("edited") do |_w, path, new_text|
|
|
180
|
+
# new_text can be wrong if 'text_column' is changed in each row
|
|
181
|
+
# after selection is changed, before sending signal, many rows are redrawn
|
|
182
|
+
|
|
183
|
+
# p "new_text='#{new_text}'"
|
|
184
|
+
if (iter = @tree_view.model.get_iter(path))
|
|
185
|
+
if new_text.nil? || new_text == ""
|
|
186
|
+
if @ct_attr_list[iter[COL_NAME]]
|
|
187
|
+
iter[COL_VALUE] = @ct_attr_list[iter[COL_NAME]]
|
|
188
|
+
else
|
|
189
|
+
iter[COL_VALUE] = new_text
|
|
190
|
+
end
|
|
191
|
+
if new_text == ""
|
|
192
|
+
new_text = nil
|
|
193
|
+
end
|
|
194
|
+
else
|
|
195
|
+
iter[COL_VALUE] = new_text
|
|
196
|
+
end
|
|
197
|
+
@cell.set_attr(iter[COL_NAME].to_sym, new_text)
|
|
198
|
+
@cell.model.set_undo_point
|
|
199
|
+
@view.paint_canvas
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
@tree_view.append_column(col)
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
#=== AttrTreeView#set_cell
|
|
206
|
+
# cell::TmCell
|
|
207
|
+
def set_cell(cell)
|
|
208
|
+
clear
|
|
209
|
+
@cell = cell
|
|
210
|
+
@choice_list = {}
|
|
211
|
+
@ct_attr_list = {}
|
|
212
|
+
cell_attr_list = cell.get_attr_list
|
|
213
|
+
|
|
214
|
+
ct = @cell.get_celltype
|
|
215
|
+
return unless ct
|
|
216
|
+
#----- register attributes and initializer to tree view model -----#
|
|
217
|
+
ct.get_attribute_list.each do |attr|
|
|
218
|
+
iter = @tree_view.model.append
|
|
219
|
+
name = attr.get_name.to_s
|
|
220
|
+
if attr.get_initializer
|
|
221
|
+
@ct_attr_list[name] = attr.get_initializer.to_CDL_str
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
iter[COL_NAME] = name
|
|
225
|
+
iter[COL_TYPE] = "#{attr.get_type.get_type_str}#{attr.get_type.get_type_str_post}"
|
|
226
|
+
if cell_attr_list[name.to_sym]
|
|
227
|
+
iter[COL_VALUE] = cell_attr_list[name.to_sym]
|
|
228
|
+
elsif attr.get_initializer
|
|
229
|
+
iter[COL_VALUE] = attr.get_initializer.to_CDL_str
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
#----- choice list model -----#
|
|
233
|
+
if attr.get_choice_list
|
|
234
|
+
@choice_list[name] = Gtk::ListStore.new(String)
|
|
235
|
+
attr.get_choice_list.each do |choice|
|
|
236
|
+
iter = @choice_list[name].append
|
|
237
|
+
iter[0] = CDLString.remove_dquote(choice.val)
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
def clear
|
|
244
|
+
@tree_view.model.clear
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
#=== AttrTreeView#set_view
|
|
248
|
+
# view::TECSCDE::View::MainView
|
|
249
|
+
def set_view(view)
|
|
250
|
+
@view = view
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
end
|