Here's an example from one of my extensions:
if(not file_loaded?(__FILE__))
cmd = UI;;Command.new("RakeAndSplay") {Sketchup.active_model.select_tool(SLBPlugins;;RakeAndSplayTool.get_tool)}
cmd.menu_text = "Rake and Splay"
if(Sketchup.version.to_i >= 16)
if(RUBY_PLATFORM =~ /darwin/)
cmd.small_icon = Sketchup.find_support_file("rake_and_splay.pdf", "Plugins/SB_rake_and_splay")
cmd.large_icon = Sketchup.find_support_file("rake_and_splay.pdf", "Plugins/SB_rake_and_splay")
else
cmd.small_icon = Sketchup.find_support_file("rake_and_splay.svg", "Plugins/SB_rake_and_splay")
cmd.large_icon = Sketchup.find_support_file("rake_and_splay.svg", "Plugins/SB_rake_and_splay")
end
else
cmd.small_icon = Sketchup.find_support_file("rake_and_splay_16.png", "Plugins/SB_rake_and_splay")
cmd.large_icon = Sketchup.find_support_file("rake_and_splay_24.png", "Plugins/SB_rake_and_splay")
end
tb = UI;;Toolbar.new("Rake and Splay").add_item(cmd)
tb.restore if tb.get_last_state == 1
UI.menu("Tools").add_item cmd
end
file_loaded(__FILE__)